public class Menu extends MenuBase
| Modifier and Type | Class and Description |
|---|---|
static class |
Menu.MENU_TYPE
The type of the menu.
|
| Constructor and Description |
|---|
Menu(String id,
String dialogId,
String title,
String mnemonic,
String accelerator,
String style,
ImageInfo image,
ImageInfo disabledImage,
Menu.MENU_TYPE menuType)
Create a new menu item without an event.
|
Menu(String id,
String dialogId,
String title,
String mnemonic,
String accelerator,
String style,
Menu.MENU_TYPE menuType)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMenu(Menu subMenu)
Add a menu to this menu.
|
void |
addMenuItem(MenuItem menuItem)
Add a menu item to this menu.
|
void |
addSeparator(Separator separator)
Add a separator to this menu.
|
List<MenuBase> |
getChildren() |
int |
getDialogInstance() |
Menu.MENU_TYPE |
getType() |
void |
setChildren(List<MenuBase> children) |
void |
setDialogInstance(int dialogInstance) |
void |
setMenuType(Menu.MENU_TYPE type) |
String |
toString() |
getAccelerator, getApplicationId, getDialogId, getDisabledImage, getId, getImage, getMnemonic, getParent, getStyle, getTitle, setAccelerator, setApplicationId, setDialogId, setDisabledImage, setId, setImage, setMnemonic, setParent, setStyle, setTitle@Deprecated public Menu(String id, String dialogId, String title, String mnemonic, String accelerator, String style, Menu.MENU_TYPE menuType)
id - the ID of the menudialogId - the ID of the dialog which owns the menutitle - the title of the menu or menu itemmnemonic - the mnemonic for the menu or menu itemaccelerator - the accelerator for the menu or menu itemstyle - the style from the dialog modelmenuType - the type of the menupublic Menu(String id, String dialogId, String title, String mnemonic, String accelerator, String style, ImageInfo image, ImageInfo disabledImage, Menu.MENU_TYPE menuType)
id - the ID of the menudialogId - the ID of the dialog which owns the menutitle - the title of the menu or menu itemmnemonic - the mnemonic for the menu or menu itemaccelerator - the accelerator for the menu or menu itemstyle - the style from the dialog modelimage - the image from the dialog modeldisabledImage - the disabled image from the dialog modelmenuType - the type of the menupublic void addMenuItem(MenuItem menuItem)
menuItem - the menu item to addpublic void addSeparator(Separator separator)
separator - the separator to addpublic void addMenu(Menu subMenu)
subMenu - the menu to addpublic int getDialogInstance()
public void setDialogInstance(int dialogInstance)
dialogInstance - the dialogInstance to setpublic Menu.MENU_TYPE getType()
public void setMenuType(Menu.MENU_TYPE type)
type - the menu type to setpublic void setChildren(List<MenuBase> children)
children - the children to setCopyright © 2006–2020 Esito AS. All rights reserved.