public class MenuHelper extends Object
MenuAction
from JMenuBar
s.
This automatically handles creation and removal of submenus as appropriate.
Modifier and Type | Class and Description |
---|---|
static class |
MenuHelper.SortedMenuItem |
Constructor and Description |
---|
MenuHelper(CommonPaths commonPaths,
JMenuBar menuBar) |
Modifier and Type | Method and Description |
---|---|
void |
addMenuAction(MenuAction action)
Add a menu item as specified though the
MenuAction argument. |
void |
removeMenuAction(MenuAction action)
Remove a existing menu item as specified though the
MenuAction
argument. |
void |
saveMenuStates() |
public MenuHelper(CommonPaths commonPaths, JMenuBar menuBar)
public void addMenuAction(MenuAction action)
MenuAction
argument.public void removeMenuAction(MenuAction action)
MenuAction
argument.IllegalArgumentException
- if the path specified in
MenuAction.getPath()
can not be foundpublic void saveMenuStates()
Copyright © 2017. All rights reserved.