|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.menu.Item
public abstract class Item
The base class for all items that render into menus. BaseItem provides default rendering, activated state management.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary | |
---|---|
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). |
protected Menu |
parentMenu
The item's containing menu. |
Fields inherited from class com.extjs.gxt.ui.client.widget.Component |
---|
afterRender, attachables, baseStyle, disabled, disabledStyle, disableTextSelection, dummy, focusable, hidden, mask, maskMessage, maskMessageStyleName, monitorWindowResize, rendered, resizeHandler, setElementRender, stateId, swallowEvents, toolTip, windowResizeDelay, windowResizeTask |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
Item()
|
Method Summary | |
---|---|
protected void |
activate(boolean autoExpand)
|
void |
addSelectionListener(SelectionListener<? extends MenuEvent> listener)
Adds a selection listener. |
protected void |
deactivate()
|
protected void |
expandMenu(boolean autoActivate)
|
java.lang.String |
getActiveStyle()
Returns the active style. |
boolean |
getHideOnClick()
Returns the hide on click state. |
Menu |
getParentMenu()
Returns the item's containing menu. |
protected void |
handleClick(ComponentEvent be)
|
boolean |
isCanActivate()
Returns true if the component can be activated. |
protected void |
onClick(ComponentEvent be)
|
protected void |
onDisable()
|
protected void |
onEnable()
|
protected boolean |
onEscape()
|
void |
removeSelectionListener(SelectionListener<? extends ComponentEvent> listener)
Removes a previously added listener. |
void |
setActiveStyle(java.lang.String activeStyle)
The CSS class to use when the item becomes activated (defaults to "x-menu-item-active"). |
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(ComponentEvent ce)
|
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onUnload, setLayoutData |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean canActivate
protected boolean hideOnClick
protected Menu parentMenu
Constructor Detail |
---|
public Item()
Method Detail |
---|
public void addSelectionListener(SelectionListener<? extends MenuEvent> listener)
listener
- the listener to addpublic java.lang.String getActiveStyle()
public boolean getHideOnClick()
public Menu getParentMenu()
public boolean isCanActivate()
public void removeSelectionListener(SelectionListener<? extends ComponentEvent> listener)
listener
- the listener to be removedpublic void setActiveStyle(java.lang.String activeStyle)
activeStyle
- the active stylepublic void setCanActivate(boolean canActivate)
canActivate
- true to activatepublic void setHideOnClick(boolean hideOnClick)
hideOnClick
- true to hide, otherwise falseprotected void activate(boolean autoExpand)
protected boolean onEscape()
protected void deactivate()
protected void expandMenu(boolean autoActivate)
protected void handleClick(ComponentEvent be)
protected void onClick(ComponentEvent be)
protected void onDisable()
onDisable
in class Component
protected void onEnable()
onEnable
in class Component
protected boolean shouldDeactivate(ComponentEvent ce)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |