|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.ComplexPanel
com.github.gwtbootstrap.client.ui.base.ComplexWidget
com.github.gwtbootstrap.client.ui.base.IconAnchor
com.github.gwtbootstrap.client.ui.Button
public class Button
Button with optional icon.
<b:Button icon="TRASH" type="ERROR" toggle="true" loadingText="I'm loading..." completeText="Oh hoh, I completed the action!">Delete</b:Button>
All arguments are optional.
ButtonGroup
,
ButtonToolbar
,
DropdownButton
,
SplitDropdownButton
,
NavbarButton
Nested Class Summary | |
---|---|
class |
Button.LoadingStateBehavior
A simple class to encapsulate the button state managing from the user. |
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets |
---|
HasWidgets.ForIsWidget |
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel |
---|
IndexedPanel.ForIsWidget |
Field Summary |
---|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
Button()
Creates an empty Button. |
|
Button(ClickHandler handler)
Creates an Button with ClickHandler |
|
Button(String caption)
Creates a Button with the given caption. |
|
Button(String caption,
ClickHandler handler)
Create Button with click handler. |
|
Button(String caption,
IconType icon)
Creates a Button with the given caption and icon. |
|
Button(String caption,
IconType icon,
ClickHandler handler)
Creates a Button with the given caption and icon and ClickHandler. |
Methods inherited from class com.github.gwtbootstrap.client.ui.base.IconAnchor |
---|
getHref, getTabIndex, getTargetHistoryToken, getText, onAttach, onBrowserEvent, setAccessKey, setCaret, setEmptyHref, setFocus, setHref, setIcon, setIconSize, setTabIndex, setTargetHistoryToken, setText |
Methods inherited from class com.github.gwtbootstrap.client.ui.base.ComplexWidget |
---|
add, addStyle, insert, removeStyle, setHideOn, setShowOn, setStyle |
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel |
---|
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove |
Methods inherited from class com.google.gwt.user.client.ui.Panel |
---|
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, 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 |
Methods inherited from interface com.google.gwt.user.client.ui.HasWidgets |
---|
clear, iterator, remove |
Constructor Detail |
---|
public Button()
public Button(ClickHandler handler)
handler
- Butotn ClickHandlerpublic Button(String caption)
caption
- the caption of the Buttonpublic Button(String caption, ClickHandler handler)
caption
- the caption of the Buttonhandler
- Button Click Handlerpublic Button(String caption, IconType icon)
caption
- the caption of the Buttonicon
- the Icon on the caption's leftpublic Button(String caption, IconType icon, ClickHandler handler)
caption
- the caption of the Buttonicon
- the Icon on the caption's lefthandler
- the ClickHandler of the Button.Method Detail |
---|
public void setType(ButtonType type)
Different types give the button a different look.
setType
in interface HasType<ButtonType>
type
- the type of the Button.public void setSize(ButtonSize size)
size
- the size of the Button.public boolean isEnabled()
A disabled widget cannot be used.
isEnabled
in interface HasEnabled
isEnabled
in class IconAnchor
false
if the Button is disabled.public void setEnabled(boolean enabled)
A disabled widget cannot be used.
setEnabled
in interface HasEnabled
setEnabled
in class IconAnchor
enabled
- false
if the Button should be disabled. Default:
true
public void setToggle(boolean toggle)
toggle
- true
will enable this behavior.
false
will disable it or do nothing if it never
was enabled.public boolean isToggle()
public boolean isToggled()
public void setLoadingText(String text)
text
- Button.LoadingStateBehavior
public void setCompleteText(String text)
text
- Button.LoadingStateBehavior
public Button.LoadingStateBehavior state()
public HandlerRegistration addClickHandler(ClickHandler handler)
addClickHandler
in interface HasClickHandlers
addClickHandler
in class IconAnchor
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler)
addDoubleClickHandler
in interface HasDoubleClickHandlers
public HandlerRegistration addDragEndHandler(DragEndHandler handler)
addDragEndHandler
in interface HasDragEndHandlers
public HandlerRegistration addDragEnterHandler(DragEnterHandler handler)
addDragEnterHandler
in interface HasDragEnterHandlers
public HandlerRegistration addDragLeaveHandler(DragLeaveHandler handler)
addDragLeaveHandler
in interface HasDragLeaveHandlers
public HandlerRegistration addDragHandler(DragHandler handler)
addDragHandler
in interface HasDragHandlers
public HandlerRegistration addDragOverHandler(DragOverHandler handler)
addDragOverHandler
in interface HasDragOverHandlers
public HandlerRegistration addDragStartHandler(DragStartHandler handler)
addDragStartHandler
in interface HasDragStartHandlers
public HandlerRegistration addDropHandler(DropHandler handler)
addDropHandler
in interface HasDropHandlers
public HandlerRegistration addFocusHandler(FocusHandler handler)
addFocusHandler
in interface HasFocusHandlers
public HandlerRegistration addBlurHandler(BlurHandler handler)
addBlurHandler
in interface HasBlurHandlers
public HandlerRegistration addGestureStartHandler(GestureStartHandler handler)
addGestureStartHandler
in interface HasGestureStartHandlers
public HandlerRegistration addGestureChangeHandler(GestureChangeHandler handler)
addGestureChangeHandler
in interface HasGestureChangeHandlers
public HandlerRegistration addGestureEndHandler(GestureEndHandler handler)
addGestureEndHandler
in interface HasGestureEndHandlers
public HandlerRegistration addKeyUpHandler(KeyUpHandler handler)
addKeyUpHandler
in interface HasKeyUpHandlers
public HandlerRegistration addKeyDownHandler(KeyDownHandler handler)
addKeyDownHandler
in interface HasKeyDownHandlers
public HandlerRegistration addKeyPressHandler(KeyPressHandler handler)
addKeyPressHandler
in interface HasKeyPressHandlers
public HandlerRegistration addMouseDownHandler(MouseDownHandler handler)
addMouseDownHandler
in interface HasMouseDownHandlers
public HandlerRegistration addMouseUpHandler(MouseUpHandler handler)
addMouseUpHandler
in interface HasMouseUpHandlers
public HandlerRegistration addMouseOutHandler(MouseOutHandler handler)
addMouseOutHandler
in interface HasMouseOutHandlers
public HandlerRegistration addMouseOverHandler(MouseOverHandler handler)
addMouseOverHandler
in interface HasMouseOverHandlers
public HandlerRegistration addMouseMoveHandler(MouseMoveHandler handler)
addMouseMoveHandler
in interface HasMouseMoveHandlers
public HandlerRegistration addMouseWheelHandler(MouseWheelHandler handler)
addMouseWheelHandler
in interface HasMouseWheelHandlers
public HandlerRegistration addTouchStartHandler(TouchStartHandler handler)
addTouchStartHandler
in interface HasTouchStartHandlers
public HandlerRegistration addTouchMoveHandler(TouchMoveHandler handler)
addTouchMoveHandler
in interface HasTouchMoveHandlers
public HandlerRegistration addTouchEndHandler(TouchEndHandler handler)
addTouchEndHandler
in interface HasTouchEndHandlers
public HandlerRegistration addTouchCancelHandler(TouchCancelHandler handler)
addTouchCancelHandler
in interface HasTouchCancelHandlers
public ButtonType getType()
public ButtonSize getSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |