public abstract class Item extends Component implements ActivateEvent.HasActivateHandlers<Item>, DeactivateEvent.HasDeactivateHandlers<Item>
Modifier and Type | Class and Description |
---|---|
static interface |
Item.ItemAppearance |
Modifier and Type | Field and Description |
---|---|
protected boolean |
canActivate
True if this item can be visually activated (defaults to false).
|
protected boolean |
hideOnClick
True to hide the containing menu after this item is clicked (defaults to
true).
|
adjustSize, allowTextSelection, cacheSizes, disableContextMenu, disabled, disabledStyle, ensureVisibilityOnSizing, height, hidden, lastSize, layer, left, mask, maskMessage, monitorWindowResize, pageX, pageY, resizeHandler, shim, tabIndex, toolTip, toolTipConfig, top, width, windowResizeDelay, windowResizeTask
Constructor and Description |
---|
Item(Item.ItemAppearance appearance) |
Modifier and Type | Method and Description |
---|---|
protected void |
activate(boolean autoExpand) |
HandlerRegistration |
addActivateHandler(ActivateEvent.ActivateHandler<Item> handler)
Adds a
ActivateEvent handler. |
HandlerRegistration |
addBeforeSelectionHandler(<any> handler) |
HandlerRegistration |
addDeactivateHandler(DeactivateEvent.DeactivateHandler<Item> handler)
Adds a
DeactivateEvent handler. |
HandlerRegistration |
addSelectionHandler(<any> handler) |
protected void |
deactivate() |
protected void |
expandMenu(boolean autoActivate) |
Item.ItemAppearance |
getAppearance() |
boolean |
getHideOnClick()
Returns the hide on click state.
|
protected void |
handleClick(NativeEvent be) |
boolean |
isCanActivate()
Returns true if the widget can be activated.
|
boolean |
isHideOnClick()
Return true if the widget can be hidden on click
|
protected void |
onAttach() |
protected void |
onClick(NativeEvent be) |
protected void |
onDisable() |
protected void |
onEnable() |
protected boolean |
onEscape() |
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).
|
protected boolean |
shouldDeactivate(NativeEvent ce) |
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addGestureRecognizer, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleDependentName, addStyleOnOver, adjustPosition, adjustSize, applyState, assertAfterRender, assertPreRender, blur, clearSizeCache, disable, disableContextMenu, disableEvents, enable, enableEvents, fireCancellableEvent, fireEvent, focus, getData, getElement, getFocusEl, getFocusSupport, getGestureRecognizer, getGestureRecognizerCount, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getPositionEl, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hide, hideShadow, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isMonitorWindowResize, isRendered, isStateful, isVisible, isVisible, mask, mask, notifyHide, notifyShow, onAfterFirstAttach, onBlur, onBrowserEvent, onDetach, onFocus, onHide, onHideContextMenu, onLoad, onPosition, onResize, onRightClick, onShow, onShowContextMenu, onTouch, onUnload, onWindowResize, removeStyleDependentName, removeStyleOnOver, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setMonitorWindowResize, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setStyleDependentName, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
protected boolean canActivate
protected boolean hideOnClick
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(<any> handler)
public HandlerRegistration addBeforeSelectionHandler(<any> handler)
public Item.ItemAppearance getAppearance()
public boolean getHideOnClick()
public boolean isCanActivate()
public boolean isHideOnClick()
public void setCanActivate(boolean canActivate)
canActivate
- true to activatepublic void setHideOnClick(boolean hideOnClick)
hideOnClick
- true to hide, otherwise falseprotected void activate(boolean autoExpand)
protected void deactivate()
protected void expandMenu(boolean autoActivate)
protected void handleClick(NativeEvent be)
protected void onClick(NativeEvent be)
protected boolean onEscape()
protected boolean shouldDeactivate(NativeEvent ce)
Copyright © 2018. All rights reserved.