C - the data type of the button's contentspublic class ButtonBase<C> extends CellWidget<C> implements HasEnabled, Focusable, IsCollapsible, HasAllFocusHandlers, HasMouseDownHandlers, HasMouseUpHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasClickHandlers, HasAllKeyHandlers
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabledDEBUG_ID_PREFIX| Modifier | Constructor and Description |
|---|---|
protected |
ButtonBase(ButtonCellBase<C> cell)
Construct a new
ButtonBase with the specified cell and an initial
value of null. |
protected |
ButtonBase(ButtonCellBase<C> cell,
C initialValue)
Construct a new
ButtonBase with the specified cell and initial
value. |
| Modifier and Type | Method and Description |
|---|---|
HandlerRegistration |
addBlurHandler(BlurHandler handler)
Adds a
BlurEvent handler. |
HandlerRegistration |
addClickHandler(ClickHandler handler)
Adds a
ClickEvent handler. |
HandlerRegistration |
addFocusHandler(FocusHandler handler)
Adds a
FocusEvent handler. |
HandlerRegistration |
addKeyDownHandler(KeyDownHandler handler)
Adds a
KeyDownEvent handler. |
HandlerRegistration |
addKeyPressHandler(KeyPressHandler handler)
Adds a
KeyPressEvent handler. |
HandlerRegistration |
addKeyUpHandler(KeyUpHandler handler)
Adds a
KeyUpEvent handler. |
HandlerRegistration |
addMouseDownHandler(MouseDownHandler handler)
Adds a
MouseDownEvent handler. |
HandlerRegistration |
addMouseOutHandler(MouseOutHandler handler)
Adds a
MouseOutEvent handler. |
HandlerRegistration |
addMouseOverHandler(MouseOverHandler handler)
Adds a
MouseOverEvent handler. |
HandlerRegistration |
addMouseUpHandler(MouseUpHandler handler)
Adds a
MouseUpEvent handler. |
ButtonCellBase.Decoration |
getDecoration()
Get the decoration style of the button.
|
int |
getTabIndex()
Gets the widget's position in the tab index.
|
(package private) static <C extends ButtonCellBase<?>> |
initializeCell(C cell)
Initialize the tab index of the cell and return it.
|
boolean |
isCollapseLeft()
Check whether or not the left-side of the UI component is collapsed
(sharing border with the component to its left).
|
boolean |
isCollapseRight()
right Check whether or not the left-side of the UI component is collapsed
(sharing border with the component to its left).
|
boolean |
isEnabled()
Returns true if the widget is enabled, false if not.
|
void |
setAccessKey(char key)
Sets the widget's 'access key'.
|
void |
setCollapseLeft(boolean isCollapsed)
Sets whether the left-side of the UI component is collapsed (sharing border
with the component to its left).
|
void |
setCollapseRight(boolean isCollapsed)
Sets whether the right-side of the UI component is collapsed (sharing
border with the component to its right).
|
void |
setDecoration(ButtonCellBase.Decoration decoration)
Set the
ButtonCellBase.Decoration of the button. |
void |
setEnabled(boolean enabled)
Sets whether this widget is enabled.
|
void |
setFocus(boolean focused)
Explicitly focus/unfocus this widget.
|
void |
setTabIndex(int index)
Sets the widget's position in the tab index.
|
addValueChangeHandler, asEditor, getCell, getKeyProvider, getValue, onBrowserEvent, redraw, setValue, setValue, setValueaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEventsaddStyleDependentName, 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, unsinkEventsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfireEventprotected ButtonBase(ButtonCellBase<C> cell)
ButtonBase with the specified cell and an initial
value of null.cell - the cell to wrapprotected ButtonBase(ButtonCellBase<C> cell, C initialValue)
ButtonBase with the specified cell and initial
value.cell - the cell to wrapinitialValue - the initial value of the Cellstatic <C extends ButtonCellBase<?>> C initializeCell(C cell)
C - the cell typecell - the cellpublic HandlerRegistration addBlurHandler(BlurHandler handler)
HasBlurHandlersBlurEvent handler.addBlurHandler in interface HasBlurHandlershandler - the blur handlerHandlerRegistration used to remove this handlerpublic HandlerRegistration addClickHandler(ClickHandler handler)
HasClickHandlersClickEvent handler.addClickHandler in interface HasClickHandlershandler - the click handlerHandlerRegistration used to remove this handlerpublic HandlerRegistration addFocusHandler(FocusHandler handler)
HasFocusHandlersFocusEvent handler.addFocusHandler in interface HasFocusHandlershandler - the focus handlerHandlerRegistration used to remove this handlerpublic HandlerRegistration addKeyDownHandler(KeyDownHandler handler)
HasKeyDownHandlersKeyDownEvent handler.addKeyDownHandler in interface HasKeyDownHandlershandler - the key down handlerHandlerRegistration used to remove this handlerpublic HandlerRegistration addKeyPressHandler(KeyPressHandler handler)
HasKeyPressHandlersKeyPressEvent handler.addKeyPressHandler in interface HasKeyPressHandlershandler - the key press handlerHandlerRegistration used to remove this handlerpublic HandlerRegistration addKeyUpHandler(KeyUpHandler handler)
HasKeyUpHandlersKeyUpEvent handler.addKeyUpHandler in interface HasKeyUpHandlershandler - the key up handlerHandlerRegistration used to remove this handlerpublic HandlerRegistration addMouseDownHandler(MouseDownHandler handler)
HasMouseDownHandlersMouseDownEvent handler.addMouseDownHandler in interface HasMouseDownHandlershandler - the mouse down handlerHandlerRegistration used to remove this handlerpublic HandlerRegistration addMouseOutHandler(MouseOutHandler handler)
HasMouseOutHandlersMouseOutEvent handler.addMouseOutHandler in interface HasMouseOutHandlershandler - the mouse out handlerHandlerRegistration used to remove this handlerpublic HandlerRegistration addMouseOverHandler(MouseOverHandler handler)
HasMouseOverHandlersMouseOverEvent handler.addMouseOverHandler in interface HasMouseOverHandlershandler - the mouse over handlerHandlerRegistration used to remove this handlerpublic HandlerRegistration addMouseUpHandler(MouseUpHandler handler)
HasMouseUpHandlersMouseUpEvent handler.addMouseUpHandler in interface HasMouseUpHandlershandler - the mouse up handlerHandlerRegistration used to remove this handlerpublic ButtonCellBase.Decoration getDecoration()
public int getTabIndex()
FocusablegetTabIndex in interface Focusablepublic boolean isCollapseLeft()
IsCollapsibleisCollapseLeft in interface IsCollapsiblepublic boolean isCollapseRight()
IsCollapsibleisCollapseRight in interface IsCollapsiblepublic boolean isEnabled()
HasEnabledisEnabled in interface HasEnabledpublic void setAccessKey(char key)
FocusablesetAccessKey in interface Focusablekey - the widget's access keypublic void setCollapseLeft(boolean isCollapsed)
IsCollapsiblesetCollapseLeft in interface IsCollapsibleisCollapsed - true if collapsed, false if notpublic void setCollapseRight(boolean isCollapsed)
IsCollapsiblesetCollapseRight in interface IsCollapsibleisCollapsed - true if collapsed, false if notpublic void setDecoration(ButtonCellBase.Decoration decoration)
ButtonCellBase.Decoration of the button.decoration - the button decorationpublic void setEnabled(boolean enabled)
HasEnabledsetEnabled in interface HasEnabledenabled - true to enable the widget, false
to disable itpublic void setFocus(boolean focused)
Focusablepublic void setTabIndex(int index)
Focusable-1 will cause this widget to
be removed from the tab order.setTabIndex in interface Focusableindex - the widget's tab index