Interface MenuItemAction
- All Superinterfaces:
Action
- All Known Implementing Classes:
FixedMenuItemFactory
,MenuItemBean
An action for extensions to the menu system. The extension point
will add menu items to the
Extensions
menu.
There are three types of menu items:
- A regular menu item, which is usually associated with some kind of action when the user clicks on it.
- A separator item. It's just for visual appearance. It is never associated with any action.
- A submenu item, which opens up a submenu when the user
selects it. A submenu must specify a
getSubmenuId()
. Regular menu items can be put into the submenu item by specifying the same id forgetMenuId()
.
- Version:
- 2.7
- Author:
- nicklas
- Last modified
- $Date: 2020-03-02 09:10:33 +0100 (mån, 02 mars 2020) $
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetClazz()
Class attribute to add to the main menu tag.getIcon()
Get an absolute reference to an image that will be displayed in the menu.getId()
ID attribute of the main menu tag.The ID of the menu where this menu item belongs, or null if it belongs to the top-level menu.getStyle()
Extra CSS style attributes that will be added to thestyle
attribute of the menu item div.The ID of a new submenu.getTitle()
Get the title of the menu.A tooltip that is shown as a yellow popup when the user points the mouse at the menu item.getType()
The type of menu item.boolean
If the menu item should be enabled or disabled.boolean
If the menu item should be visible or not.
-
Method Details
-
getId
String getId()ID attribute of the main menu tag. You need to set this value to reference the menu item in a javascript.- Returns:
- The ID, or null
- Since:
- 3.3
-
getClazz
String getClazz()Class attribute to add to the main menu tag.- Since:
- 3.3
-
getType
MenuItemAction.MenuType getType()The type of menu item. -
getMenuId
String getMenuId()The ID of the menu where this menu item belongs, or null if it belongs to the top-level menu. -
getTitle
String getTitle()Get the title of the menu. -
getTooltip
String getTooltip()A tooltip that is shown as a yellow popup when the user points the mouse at the menu item.- Returns:
- The tooltip or null to not display any tooltip
-
getIcon
String getIcon()Get an absolute reference to an image that will be displayed in the menu. It is recommended that the image is 9 pixels wide and 12 pixels high to line up with the icons used by the BASE core menus.- Returns:
- A reference to an image, or null if no image should be used
-
getStyle
String getStyle()Extra CSS style attributes that will be added to thestyle
attribute of the menu item div.- Returns:
- Style attributes, or null
-
isEnabled
boolean isEnabled()If the menu item should be enabled or disabled. -
isVisible
boolean isVisible()If the menu item should be visible or not.
-