|
|||||||||
| 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
com.extjs.gxt.ui.client.widget.menu.MenuItem
public class MenuItem
A base class for all menu items that require menu-related functionality (like
sub-menus) and are not static display items. Item extends the base
functionality of Item by adding menu-specific activation and click
handling.
| 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 |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
MenuItem()
Creates a new item. |
|
MenuItem(java.lang.String text)
Creates a new item with the given text. |
|
MenuItem(java.lang.String text,
com.google.gwt.user.client.ui.AbstractImagePrototype icon)
Creates a new item. |
|
MenuItem(java.lang.String text,
com.google.gwt.user.client.ui.AbstractImagePrototype icon,
SelectionListener<? extends MenuEvent> listener)
Creates a new item. |
|
MenuItem(java.lang.String text,
SelectionListener<? extends MenuEvent> listener)
Creates a new item. |
|
| Method Summary | |
|---|---|
void |
expandMenu()
Expands the item's sub menu. |
com.google.gwt.user.client.ui.AbstractImagePrototype |
getIcon()
Returns the item's icon style. |
Menu |
getSubMenu()
Returns the item's sub menu. |
java.lang.String |
getText()
Returns the item's text. |
void |
setIcon(com.google.gwt.user.client.ui.AbstractImagePrototype icon)
Sets the item's icon style. |
void |
setIconStyle(java.lang.String icon)
Sets the icon style. |
void |
setSubMenu(Menu menu)
Sets the item's sub menu. |
void |
setText(java.lang.String text)
Sets the item's text. |
| Methods inherited from class com.extjs.gxt.ui.client.widget.menu.Item |
|---|
addSelectionListener, getActiveStyle, getHideOnClick, getParentMenu, removeSelectionListener, setActiveStyle, setHideOnClick |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
fireEvent, getParent, isAttached |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MenuItem()
public MenuItem(java.lang.String text)
text - the item's text
public MenuItem(java.lang.String text,
SelectionListener<? extends MenuEvent> listener)
text - the item textlistener - the selection listener
public MenuItem(java.lang.String text,
com.google.gwt.user.client.ui.AbstractImagePrototype icon)
text - the item's texticon - the item's icon
public MenuItem(java.lang.String text,
com.google.gwt.user.client.ui.AbstractImagePrototype icon,
SelectionListener<? extends MenuEvent> listener)
text - the item's texticon - the item's iconlistener - the selection listener| Method Detail |
|---|
public void expandMenu()
public com.google.gwt.user.client.ui.AbstractImagePrototype getIcon()
getIcon in interface IconSupportpublic Menu getSubMenu()
public java.lang.String getText()
public void setIcon(com.google.gwt.user.client.ui.AbstractImagePrototype icon)
<code>
.my-icon {
background: url(images/icons/my-icon.png) no-repeat center left !important;
}
</code>
setIcon in interface IconSupporticon - the iconpublic void setIconStyle(java.lang.String icon)
IconSupport
setIconStyle in interface IconSupporticon - a CSS style namepublic void setSubMenu(Menu menu)
menu - the sub menupublic void setText(java.lang.String text)
text - the text
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||