dsto.dfc.swing.panels
Class StandardCommandViews
java.lang.Object
dsto.dfc.swing.panels.StandardCommandViews
- All Implemented Interfaces:
- CommandSource
- Direct Known Subclasses:
- ClientCommandViews
public class StandardCommandViews
- extends Object
- implements CommandSource
StandardCommandViews encapsulates the main, toolbar, and context menus.
It allows addition and removal of commands to all menus with a single
method call.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StandardCommandViews
public StandardCommandViews()
getCommandView
public CommandView getCommandView(String viewName)
- CommandSource interface
- Specified by:
getCommandView
in interface CommandSource
- Parameters:
viewName
- The name of the view to be retrieved. Usually one of
CommandView.MAIN_MENU_VIEW, CommandView.CONTEXT_MENU_VIEW or
CommandView.TOOLBAR_VIEW, but custom views may be supported also.
- Returns:
- The command view instance or null if view is not defined.
setDefaultCommand
public void setDefaultCommand(Command command)
- end CommandSource interface
addCommands
public void addCommands(Collection commands)
addCommand
public void addCommand(Command command)
removeCommands
public void removeCommands(Collection commands)
Copyright © 2008 Commonwealth of Australia