public abstract class Item extends Component implements HasSelectionHandlers<Item>, ActivateEvent.HasActivateHandlers<Item>, DeactivateEvent.HasDeactivateHandlers<Item>, HasBeforeSelectionHandlers<Item>
Modifier and Type | Class and Description |
---|---|
static interface |
Item.ItemAppearance |
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
DEBUG_ID_PREFIX
Constructor and Description |
---|
Item(Item.ItemAppearance appearance) |
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addActivateHandler(ActivateEvent.ActivateHandler<Item> handler)
Adds a
ActivateEvent handler. |
HandlerRegistration |
addBeforeSelectionHandler(BeforeSelectionHandler<Item> handler) |
HandlerRegistration |
addDeactivateHandler(DeactivateEvent.DeactivateHandler<Item> handler)
Adds a
DeactivateEvent handler. |
HandlerRegistration |
addSelectionHandler(SelectionHandler<Item> handler) |
Item.ItemAppearance |
getAppearance() |
boolean |
getHideOnClick()
Returns the hide on click state.
|
boolean |
isCanActivate()
Returns true if the widget can be activated.
|
void |
setCanActivate(boolean canActivate)
Sets whether the item can be activated (defaults to false).
|
void |
setHideOnClick(boolean hideOnClick)
True to hide the containing menu after this item is clicked (defaults to
true).
|
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleOnOver, clearSizeCache, disable, disableEvents, enable, enableEvents, fireEvent, focus, getData, getElement, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hide, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isRendered, isStateful, isVisible, isVisible, mask, mask, onBrowserEvent, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
fireEvent
public Item(Item.ItemAppearance appearance)
public HandlerRegistration addActivateHandler(ActivateEvent.ActivateHandler<Item> handler)
ActivateEvent.HasActivateHandlers
ActivateEvent
handler.addActivateHandler
in interface ActivateEvent.HasActivateHandlers<Item>
handler
- the handlerpublic HandlerRegistration addDeactivateHandler(DeactivateEvent.DeactivateHandler<Item> handler)
DeactivateEvent.HasDeactivateHandlers
DeactivateEvent
handler.addDeactivateHandler
in interface DeactivateEvent.HasDeactivateHandlers<Item>
handler
- the handlerpublic HandlerRegistration addSelectionHandler(SelectionHandler<Item> handler)
addSelectionHandler
in interface HasSelectionHandlers<Item>
public HandlerRegistration addBeforeSelectionHandler(BeforeSelectionHandler<Item> handler)
addBeforeSelectionHandler
in interface HasBeforeSelectionHandlers<Item>
public Item.ItemAppearance getAppearance()
public boolean getHideOnClick()
public boolean isCanActivate()
public void setCanActivate(boolean canActivate)
canActivate
- true to activatepublic void setHideOnClick(boolean hideOnClick)
hideOnClick
- true to hide, otherwise falseCopyright © 2015. All rights reserved.