public abstract class AbstractButton extends ComplexWidget implements HasEnabled, HasActive, HasType<ButtonType>, HasSize<ButtonSize>, HasDataTarget, HasClickHandlers, Focusable, HasAllMouseHandlers
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractButton.ButtonStateHandler |
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabledIndexedPanel.ForIsWidgetHasWidgets.ForIsWidgetDEBUG_ID_PREFIX| Modifier | Constructor and Description |
|---|---|
protected |
AbstractButton()
Creates button with DEFAULT type.
|
protected |
AbstractButton(ButtonType type) |
| Modifier and Type | Method and Description |
|---|---|
HandlerRegistration |
addClickHandler(ClickHandler handler) |
HandlerRegistration |
addMouseDownHandler(MouseDownHandler handler) |
HandlerRegistration |
addMouseMoveHandler(MouseMoveHandler handler) |
HandlerRegistration |
addMouseOutHandler(MouseOutHandler handler) |
HandlerRegistration |
addMouseOverHandler(MouseOverHandler handler) |
HandlerRegistration |
addMouseUpHandler(MouseUpHandler handler) |
HandlerRegistration |
addMouseWheelHandler(MouseWheelHandler handler) |
void |
click() |
protected abstract Element |
createElement() |
String |
getDataTarget()
Gets the data target of the widget
|
ButtonSize |
getSize()
Get the size of the widget
|
int |
getTabIndex() |
ButtonType |
getType()
Gets the type of the widget
|
boolean |
isActive()
Gets whether or not the widget has the active styles
|
boolean |
isEnabled() |
void |
setAccessKey(char key) |
void |
setActive(boolean active)
Sets the widget with the active styles or not
|
void |
setBlock(boolean block)
Makes button a block level element that spawns full width of parent.
|
void |
setDataDismiss(ButtonDismiss dismiss)
Sets dismiss type of button.
|
void |
setDataLoadingText(String loadingText) |
void |
setDataTarget(String dataTarget)
Sets the data target for the widget
|
void |
setDataTargetWidget(Widget widget) |
void |
setDataTargetWidgets(List<Widget> widgets) |
void |
setEnabled(boolean enabled) |
void |
setFocus(boolean focused) |
void |
setSize(ButtonSize size)
Sets size of button.
|
void |
setTabIndex(int index) |
void |
setType(ButtonType type)
Sets type of button.
|
AbstractButton.ButtonStateHandler |
state() |
void |
toggle() |
add, getId, getPull, insert, insert, remove, setColor, setHiddenOn, setId, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPull, setVisibleOnadd, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, iterator, removeadd, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, 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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfireEventforEach, spliteratorprotected AbstractButton()
protected AbstractButton(ButtonType type)
public boolean isActive()
HasActivepublic void setActive(boolean active)
HasActivepublic void setEnabled(boolean enabled)
setEnabled in interface HasEnabledpublic boolean isEnabled()
isEnabled in interface HasEnabledpublic HandlerRegistration addClickHandler(ClickHandler handler)
addClickHandler in interface HasClickHandlerspublic void setType(ButtonType type)
setType in interface HasType<ButtonType>type - Type of buttonpublic ButtonType getType()
HasTypegetType in interface HasType<ButtonType>public void setSize(ButtonSize size)
setSize in interface HasSize<ButtonSize>size - Size of buttonpublic ButtonSize getSize()
HasSizegetSize in interface HasSize<ButtonSize>public void setDataTargetWidgets(List<Widget> widgets)
setDataTargetWidgets in interface HasDataTargetpublic void setDataTargetWidget(Widget widget)
setDataTargetWidget in interface HasDataTargetpublic void setDataTarget(String dataTarget)
HasDataTargetsetDataTarget in interface HasDataTargetdataTarget - data target stringpublic String getDataTarget()
HasDataTargetgetDataTarget in interface HasDataTargetpublic int getTabIndex()
getTabIndex in interface Focusablepublic void setAccessKey(char key)
setAccessKey in interface Focusablepublic void setTabIndex(int index)
setTabIndex in interface Focusablepublic HandlerRegistration addMouseDownHandler(MouseDownHandler handler)
addMouseDownHandler in interface HasMouseDownHandlerspublic HandlerRegistration addMouseMoveHandler(MouseMoveHandler handler)
addMouseMoveHandler in interface HasMouseMoveHandlerspublic HandlerRegistration addMouseOutHandler(MouseOutHandler handler)
addMouseOutHandler in interface HasMouseOutHandlerspublic HandlerRegistration addMouseOverHandler(MouseOverHandler handler)
addMouseOverHandler in interface HasMouseOverHandlerspublic HandlerRegistration addMouseUpHandler(MouseUpHandler handler)
addMouseUpHandler in interface HasMouseUpHandlerspublic HandlerRegistration addMouseWheelHandler(MouseWheelHandler handler)
addMouseWheelHandler in interface HasMouseWheelHandlerspublic void setBlock(boolean block)
block - True for block level elementpublic void setDataDismiss(ButtonDismiss dismiss)
public void setDataLoadingText(String loadingText)
public void toggle()
public AbstractButton.ButtonStateHandler state()
public void click()
protected abstract Element createElement()
Copyright © 2017. All rights reserved.