org.oddjob.arooa.design.actions
Class ConfigurableMenus

java.lang.Object
  extended by org.oddjob.arooa.design.actions.ConfigurableMenus
All Implemented Interfaces:
ActionRegistry, MenuProvider, PopupMenuProvider

public class ConfigurableMenus
extends Object
implements ActionRegistry, MenuProvider

Organises a Hierarchy of menus for a Swing view.

Author:
rob

Constructor Summary
ConfigurableMenus()
           
 
Method Summary
 void addContextMenuItem(String group, ArooaAction action)
          Add a pop-up menu item for an action.
 void addContextSubMenu(String group, ActionMenu menu)
          At a sub menu to the pop-up menu for given group.
 void addMainMenu(ActionMenu menu)
          Add a menu to the menu bar.
 void addMenuItem(String menuId, String group, ArooaAction action)
          Add a menu item for an action.
 void addSubMenu(String menuId, String group, ActionMenu menu)
          Add a sub menu to a menu on the menu bar.
 JMenu[] getJMenuBar()
          Get the menus that are the menu bar.
 JPopupMenu getPopupMenu()
          Get the pop-up menu.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurableMenus

public ConfigurableMenus()
Method Detail

addContextMenuItem

public void addContextMenuItem(String group,
                               ArooaAction action)
Description copied from interface: ActionRegistry
Add a pop-up menu item for an action.

Specified by:
addContextMenuItem in interface ActionRegistry

addContextSubMenu

public void addContextSubMenu(String group,
                              ActionMenu menu)
Description copied from interface: ActionRegistry
At a sub menu to the pop-up menu for given group. If a menu has already been registered by the given menu's id then the previous definition may be re-used.

Specified by:
addContextSubMenu in interface ActionRegistry

addMainMenu

public void addMainMenu(ActionMenu menu)
Description copied from interface: ActionRegistry
Add a menu to the menu bar.

Specified by:
addMainMenu in interface ActionRegistry

addMenuItem

public void addMenuItem(String menuId,
                        String group,
                        ArooaAction action)
Description copied from interface: ActionRegistry
Add a menu item for an action.

Specified by:
addMenuItem in interface ActionRegistry

addSubMenu

public void addSubMenu(String menuId,
                       String group,
                       ActionMenu menu)
Description copied from interface: ActionRegistry
Add a sub menu to a menu on the menu bar.

Specified by:
addSubMenu in interface ActionRegistry
Parameters:
menuId - The id of the menu to add to.

getJMenuBar

public JMenu[] getJMenuBar()
Description copied from interface: MenuProvider
Get the menus that are the menu bar.

Specified by:
getJMenuBar in interface MenuProvider
Returns:

getPopupMenu

public JPopupMenu getPopupMenu()
Description copied from interface: PopupMenuProvider
Get the pop-up menu.

Specified by:
getPopupMenu in interface PopupMenuProvider
Returns: