Package docking.menu
Class MenuManager
java.lang.Object
docking.menu.MenuManager
Class to manage a hierarchy of menus.
- 
Constructor SummaryConstructorsConstructorDescriptionMenuManager(String name, char mnemonicKey, String group, boolean usePopupPath, MenuHandler menuHandler, MenuGroupMap menuGroupMap) Constructs a new MenuManager
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAction(DockingActionIf action) Adds an action to this menu.voiddispose()getGroup()getMenu()Returns a Menu hierarchy of all the actionsstatic chargetMnemonicKey(String str) Parses the mnemonic key from the menu items text.Returns a JPopupMenu for the action hierarchybooleanisEmpty()Tests if this menu is empty.voidmenuGroupChanged(String[] theMenuPath, int i, String localGroup) Notification that a menu item has changed groups.booleanremoveAction(DockingActionIf action) static StringstripMnemonicAmp(String text) Removes the Mnemonic indicator character (&) from the texttoString()
- 
Constructor Details
- 
Method Details- 
addActionAdds an action to this menu. Can create subMenus depending on the menuPath of the action- Parameters:
- action- the action to be added
 
- 
getAction
- 
getMnemonicKeyParses the mnemonic key from the menu items text.- Parameters:
- str- the menu item text
- Returns:
- the mnemonic key for encoded in the actions menu text. Returns 0 if there is none.
 
- 
stripMnemonicAmpRemoves the Mnemonic indicator character (&) from the text- Parameters:
- text- the text to strip
- Returns:
- the stripped mnemonic
 
- 
isEmptypublic boolean isEmpty()Tests if this menu is empty.
- 
getMenuReturns a Menu hierarchy of all the actions- Returns:
- the menu
 
- 
getMenuItem- See Also:
 
- 
getGroup- See Also:
 
- 
getSubGroup
- 
disposepublic void dispose()
- 
getPopupMenuReturns a JPopupMenu for the action hierarchy- Returns:
- the popup menu
 
- 
removeAction
- 
toString
- 
getMenuHandler
- 
getMenuItemText
 
-