dsto.dfc.swing.panels
Class StandardCommandViews

java.lang.Object
  extended by 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.


Constructor Summary
StandardCommandViews()
           
 
Method Summary
 void addCommand(Command command)
           
 void addCommands(Collection commands)
           
 CommandView getCommandView(String viewName)
          CommandSource interface
 void removeCommands(Collection commands)
           
 void setDefaultCommand(Command command)
          end CommandSource interface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardCommandViews

public StandardCommandViews()
Method Detail

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