Package docking.menu
Class MenuBarManager
- java.lang.Object
-
- docking.menu.MenuBarManager
-
- All Implemented Interfaces:
MenuGroupListener
public class MenuBarManager extends java.lang.Object implements MenuGroupListener
Manages the main menu bar on the main frame.
-
-
Constructor Summary
Constructors Constructor Description MenuBarManager(MenuHandler actionHandler, MenuGroupMap menuGroupMap)Constructs a new MenuBarManager
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAction(DockingActionIf action)Adds an action to the menu.voidclearActions()voiddispose()Releases all resources and makes this object unusable.javax.swing.JMenuBargetMenuBar()Returns a JMenuBar for all the actions.voidmenuGroupChanged(java.lang.String[] menuPath, java.lang.String group)Handles changes to the Menu GroupvoidremoveAction(DockingActionIf action)Removes an action from the menu.
-
-
-
Constructor Detail
-
MenuBarManager
public MenuBarManager(MenuHandler actionHandler, MenuGroupMap menuGroupMap)
Constructs a new MenuBarManager
-
-
Method Detail
-
clearActions
public void clearActions()
-
addAction
public void addAction(DockingActionIf action)
Adds an action to the menu.- Parameters:
action- the action to be added.groupMgr- the MenuGroupMap
-
removeAction
public void removeAction(DockingActionIf action)
Removes an action from the menu.- Parameters:
action- the action to be removed.
-
dispose
public void dispose()
Releases all resources and makes this object unusable.
-
getMenuBar
public javax.swing.JMenuBar getMenuBar()
Returns a JMenuBar for all the actions.
-
menuGroupChanged
public void menuGroupChanged(java.lang.String[] menuPath, java.lang.String group)Handles changes to the Menu Group- Specified by:
menuGroupChangedin interfaceMenuGroupListener- Parameters:
menuPath- the menu path whose group changed.group- the new group for the given menuPath.
-
-