com.github.gwtbootstrap.client.ui
Class SubmitButton

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.FocusWidget
              extended by com.github.gwtbootstrap.client.ui.SubmitButton
All Implemented Interfaces:
HasType<ButtonType>, HasAllDragAndDropHandlers, HasAllFocusHandlers, HasAllGestureHandlers, HasAllKeyHandlers, HasAllMouseHandlers, HasAllTouchHandlers, HasBlurHandlers, HasChangeHandlers, HasClickHandlers, HasDoubleClickHandlers, HasDragEndHandlers, HasDragEnterHandlers, HasDragHandlers, HasDragLeaveHandlers, HasDragOverHandlers, HasDragStartHandlers, HasDropHandlers, HasFocusHandlers, HasGestureChangeHandlers, HasGestureEndHandlers, HasGestureStartHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasTouchCancelHandlers, HasTouchEndHandlers, HasTouchMoveHandlers, HasTouchStartHandlers, HasAttachHandlers, HasValueChangeHandlers<String>, HasHandlers, EventListener, TakesValue<String>, Focusable, HasEnabled, HasFocus, HasName, HasText, HasValue<String>, HasVisibility, IsWidget, SourcesClickEvents, SourcesFocusEvents, SourcesKeyboardEvents, SourcesMouseEvents

public class SubmitButton
extends FocusWidget
implements HasType<ButtonType>, HasValue<String>, HasText, HasName, HasChangeHandlers

A SubmitButton for Bootstrap form.

Since:
2.0.4.0
Author:
ohashi keisuke

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
  SubmitButton()
          Creates an submit button with no caption.
protected SubmitButton(Element element)
          This constructor may be used by subclasses to explicitly use an existing element.
  SubmitButton(SafeHtml html)
          Creates a button with the given HTML caption.
  SubmitButton(SafeHtml html, ClickHandler handler)
          Creates a button with the given HTML caption and click listener.
  SubmitButton(String text)
          Creates a button with the given Text caption.
  SubmitButton(String text, ClickHandler handler)
          Creates a button with the given Text caption and click listener.
 
Method Summary
 HandlerRegistration addChangeHandler(ChangeHandler handler)
          
 HandlerRegistration addValueChangeHandler(ValueChangeHandler<String> handler)
           
 void click()
          Programmatic equivalent of the user clicking the button.
 String getName()
          
 String getText()
          
 String getValue()
          
 void setName(String name)
          
 void setSize(ButtonSize size)
          Sets the size of the Button.
 void setText(String text)
          
 void setType(ButtonType type)
          Sets the type of the Button.
 void setValue(String value)
          
 void setValue(String value, boolean fireEvents)
          
 
Methods inherited from class com.google.gwt.user.client.ui.FocusWidget
addBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getFocusImpl, getTabIndex, isEnabled, onAttach, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setEnabled, setFocus, setTabIndex
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

SubmitButton

public SubmitButton()
Creates an submit button with no caption.


SubmitButton

protected SubmitButton(Element element)
This constructor may be used by subclasses to explicitly use an existing element. This element must be a <input type="submit"> element.

Parameters:
element - the element to be used

SubmitButton

public SubmitButton(SafeHtml html,
                    ClickHandler handler)
Creates a button with the given HTML caption and click listener.

Parameters:
html - the HTML caption
handler - the click handler

SubmitButton

public SubmitButton(SafeHtml html)
Creates a button with the given HTML caption.

Parameters:
html - the HTML caption

SubmitButton

public SubmitButton(String text,
                    ClickHandler handler)
Creates a button with the given Text caption and click listener.

Parameters:
text - the Text caption
handler - the click handler

SubmitButton

public SubmitButton(String text)
Creates a button with the given Text caption.

Parameters:
text - the Text caption
Method Detail

click

public void click()
Programmatic equivalent of the user clicking the button.


setType

public void setType(ButtonType type)
Sets the type of the Button.

Different types give the button a different look.

Specified by:
setType in interface HasType<ButtonType>
Parameters:
type - the type of the Button.

setSize

public void setSize(ButtonSize size)
Sets the size of the Button.

Parameters:
size - the size of the Button.

addChangeHandler

public HandlerRegistration addChangeHandler(ChangeHandler handler)

Specified by:
addChangeHandler in interface HasChangeHandlers

addValueChangeHandler

public HandlerRegistration addValueChangeHandler(ValueChangeHandler<String> handler)
Specified by:
addValueChangeHandler in interface HasValueChangeHandlers<String>
See Also:
HasValueChangeHandlers.addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler)

setName

public void setName(String name)

Specified by:
setName in interface HasName

getName

public String getName()

Specified by:
getName in interface HasName

getText

public String getText()

Specified by:
getText in interface HasText

setText

public void setText(String text)

Specified by:
setText in interface HasText

getValue

public String getValue()

Specified by:
getValue in interface TakesValue<String>
Specified by:
getValue in interface HasValue<String>

setValue

public void setValue(String value)

Specified by:
setValue in interface TakesValue<String>
Specified by:
setValue in interface HasValue<String>

setValue

public void setValue(String value,
                     boolean fireEvents)

Specified by:
setValue in interface HasValue<String>


Copyright © 2012 gwtbootstrap. All Rights Reserved.