com.vaadin.terminal.gwt.client.ui.
Class MenuItem
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.vaadin.terminal.gwt.client.ui.MenuItem
All Implemented Interfaces:
com.google.gwt.user.client.ui.HasHTML, com.google.gwt.user.client.ui.HasText
- extends com.google.gwt.user.client.ui.UIObject
- implements com.google.gwt.user.client.ui.HasHTML
@Deprecated
public class MenuItem
A widget that can be placed in a
MenuBar
. Menu items can either fire a
Command
when they are clicked, or open a
cascading sub-menu.
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(String text,
boolean asHTML,
com.google.gwt.user.client.Command cmd)
Deprecated. Constructs a new menu item that fires a command when it is selected. |
|
MenuItem(String text,
boolean asHTML,
MenuBar subMenu)
Deprecated. Constructs a new menu item that cascades to a sub-menu when it is selected. |
|
MenuItem(String text,
com.google.gwt.user.client.Command cmd)
Deprecated. Constructs a new menu item that fires a command when it is selected. |
|
MenuItem(String text,
MenuBar subMenu)
Deprecated. Constructs a new menu item that cascades to a sub-menu when it is selected. |
Method Summary | |
---|---|
com.google.gwt.user.client.Command |
getCommand()
Deprecated. Gets the command associated with this item. |
String |
getHTML()
Deprecated. |
MenuBar |
getParentMenu()
Deprecated. Gets the menu that contains this item. |
MenuBar |
getSubMenu()
Deprecated. Gets the sub-menu associated with this item. |
String |
getText()
Deprecated. |
void |
setCommand(com.google.gwt.user.client.Command cmd)
Deprecated. Sets the command associated with this item. |
void |
setHTML(String html)
Deprecated. |
void |
setSubMenu(MenuBar subMenu)
Deprecated. Sets the sub-menu associated with this item. |
void |
setText(String text)
Deprecated. |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, sinkEvents, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
MenuItem
public MenuItem(String text,
com.google.gwt.user.client.Command cmd)
- Parameters:
text
- the item's textcmd
- the command to be fired when it is selected
Deprecated.
Constructs a new menu item that fires a command when it is selected.
MenuItem
public MenuItem(String text,
boolean asHTML,
com.google.gwt.user.client.Command cmd)
- Parameters:
text
- the item's textasHTML
-true
to treat the specified text as htmlcmd
- the command to be fired when it is selected
Deprecated.
Constructs a new menu item that fires a command when it is selected.
MenuItem
public MenuItem(String text,
MenuBar subMenu)
- Parameters:
text
- the item's textsubMenu
- the sub-menu to be displayed when it is selected
Deprecated.
Constructs a new menu item that cascades to a sub-menu when it is selected.
MenuItem
public MenuItem(String text,
boolean asHTML,
MenuBar subMenu)
- Parameters:
text
- the item's textasHTML
-true
to treat the specified text as htmlsubMenu
- the sub-menu to be displayed when it is selected
Deprecated.
Constructs a new menu item that cascades to a sub-menu when it is selected.
Method Detail |
---|
getCommand
public com.google.gwt.user.client.Command getCommand()
- Returns:
- this item's command, or
null
if none exists
Deprecated.
Gets the command associated with this item.
getHTML
public String getHTML()
- Specified by:
getHTML
in interfacecom.google.gwt.user.client.ui.HasHTML
Deprecated.
getParentMenu
public MenuBar getParentMenu()
- Returns:
- the parent menu, or
null
if none exists.
Deprecated.
Gets the menu that contains this item.
getSubMenu
public MenuBar getSubMenu()
- Returns:
- this item's sub-menu, or
null
if none exists
Deprecated.
Gets the sub-menu associated with this item.
getText
public String getText()
- Specified by:
getText
in interfacecom.google.gwt.user.client.ui.HasText
Deprecated.
setCommand
public void setCommand(com.google.gwt.user.client.Command cmd)
- Parameters:
cmd
- the command to be associated with this item
Deprecated.
Sets the command associated with this item.
setHTML
public void setHTML(String html)
- Specified by:
setHTML
in interfacecom.google.gwt.user.client.ui.HasHTML
Deprecated.
setSubMenu
public void setSubMenu(MenuBar subMenu)
- Parameters:
subMenu
- this item's new sub-menu
Deprecated.
Sets the sub-menu associated with this item.
setText
public void setText(String text)
- Specified by:
setText
in interfacecom.google.gwt.user.client.ui.HasText
Deprecated.