@Deprecated public class MenuItem extends com.google.gwt.user.client.ui.UIObject implements com.google.gwt.user.client.ui.HasHTML
MenuBar. Menu items can either fire a
Command when they are clicked, or open a
cascading sub-menu.| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, sinkEvents, toString, unsinkEventspublic MenuItem(String text, com.google.gwt.user.client.Command cmd)
text - the item's textcmd - the command to be fired when it is selectedpublic MenuItem(String text, boolean asHTML, com.google.gwt.user.client.Command cmd)
text - the item's textasHTML - true to treat the specified text as htmlcmd - the command to be fired when it is selectedpublic MenuItem(String text, MenuBar subMenu)
text - the item's textsubMenu - the sub-menu to be displayed when it is selectedpublic MenuItem(String text, boolean asHTML, MenuBar subMenu)
text - the item's textasHTML - true to treat the specified text as htmlsubMenu - the sub-menu to be displayed when it is selectedpublic com.google.gwt.user.client.Command getCommand()
null if none existspublic String getHTML()
getHTML in interface com.google.gwt.user.client.ui.HasHTMLpublic MenuBar getParentMenu()
null if none exists.public MenuBar getSubMenu()
null if none existspublic String getText()
getText in interface com.google.gwt.user.client.ui.HasTextpublic void setCommand(com.google.gwt.user.client.Command cmd)
cmd - the command to be associated with this itempublic void setHTML(String html)
setHTML in interface com.google.gwt.user.client.ui.HasHTMLpublic void setSubMenu(MenuBar subMenu)
subMenu - this item's new sub-menupublic void setText(String text)
setText in interface com.google.gwt.user.client.ui.HasTextCopyright © 2023 Vaadin Ltd. All rights reserved.