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.DebugIdImplEnabled
IndexedPanel.ForIsWidget
HasWidgets.ForIsWidget
DEBUG_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, setVisibleOn
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, iterator, remove
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fireEvent
forEach, spliterator
protected AbstractButton()
protected AbstractButton(ButtonType type)
public boolean isActive()
HasActive
public void setActive(boolean active)
HasActive
public void setEnabled(boolean enabled)
setEnabled
in interface HasEnabled
public boolean isEnabled()
isEnabled
in interface HasEnabled
public HandlerRegistration addClickHandler(ClickHandler handler)
addClickHandler
in interface HasClickHandlers
public void setType(ButtonType type)
setType
in interface HasType<ButtonType>
type
- Type of buttonpublic ButtonType getType()
HasType
getType
in interface HasType<ButtonType>
public void setSize(ButtonSize size)
setSize
in interface HasSize<ButtonSize>
size
- Size of buttonpublic ButtonSize getSize()
HasSize
getSize
in interface HasSize<ButtonSize>
public void setDataTargetWidgets(List<Widget> widgets)
setDataTargetWidgets
in interface HasDataTarget
public void setDataTargetWidget(Widget widget)
setDataTargetWidget
in interface HasDataTarget
public void setDataTarget(String dataTarget)
HasDataTarget
setDataTarget
in interface HasDataTarget
dataTarget
- data target stringpublic String getDataTarget()
HasDataTarget
getDataTarget
in interface HasDataTarget
public int getTabIndex()
getTabIndex
in interface Focusable
public void setAccessKey(char key)
setAccessKey
in interface Focusable
public void setTabIndex(int index)
setTabIndex
in interface Focusable
public HandlerRegistration addMouseDownHandler(MouseDownHandler handler)
addMouseDownHandler
in interface HasMouseDownHandlers
public HandlerRegistration addMouseMoveHandler(MouseMoveHandler handler)
addMouseMoveHandler
in interface HasMouseMoveHandlers
public HandlerRegistration addMouseOutHandler(MouseOutHandler handler)
addMouseOutHandler
in interface HasMouseOutHandlers
public HandlerRegistration addMouseOverHandler(MouseOverHandler handler)
addMouseOverHandler
in interface HasMouseOverHandlers
public HandlerRegistration addMouseUpHandler(MouseUpHandler handler)
addMouseUpHandler
in interface HasMouseUpHandlers
public HandlerRegistration addMouseWheelHandler(MouseWheelHandler handler)
addMouseWheelHandler
in interface HasMouseWheelHandlers
public 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.