2.17.2: 2011-06-17

net.sf.basedb.clients.web.extensions.menu
Interface MenuItemAction

All Superinterfaces:
Action
All Known Implementing Classes:
FixedMenuItemFactory, MenuItemBean

public interface MenuItemAction
extends Action

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:

Version:
2.7
Author:
nicklas
Last modified
$Date: 2009-03-24 09:22:28 +0100 (Tue, 24 Mar 2009) $

Nested Class Summary
static class MenuItemAction.MenuType
           
 
Method Summary
 String getIcon()
          Get an absolute reference to an image that will be displayed in the menu.
 String getMenuId()
          The ID of the menu where this menu item belongs, or null if it belongs to the top-level menu.
 String getOnClick()
          A javascript action that is executed when the user clicks the menu.
 String getStyle()
          Extra CSS style attributes that will be added to the style attribute of the menu item div.
 String getSubmenuId()
          The ID of a new submenu.
 String getTitle()
          Get the title of the menu.
 String getTooltip()
          A tooltip that is shown as a yellow popup when the user points the mouse at the menu item.
 MenuItemAction.MenuType getType()
          The type of menu item.
 boolean isEnabled()
          If the menu item should be enabled or disabled.
 boolean isVisible()
          If the menu item should be visible or not.
 

Method Detail

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.


getSubmenuId

String getSubmenuId()
The ID of a new submenu. This value is required when the menu item is a MenuItemAction.MenuType.SUBMENU, and is ignored otherwise.


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 the style 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.


getOnClick

String getOnClick()
A javascript action that is executed when the user clicks the menu. BASE has builtin scripts for opening a page in a popup window or opening a page in the main window:

Returns:
The javascript action

2.17.2: 2011-06-17