Release Planner v1.0

rp.cmd
Class CommandFactory

java.lang.Object
  |
  +--rp.cmd.CommandFactory

public class CommandFactory
extends java.lang.Object

Keeps track of all commands in the system and allocates them and related objects on demand.

Version:
$Revision: 1.3 $, $Date: 2002/04/12 19:08:48 $

Constructor Summary
CommandFactory()
           
 
Method Summary
static Command cloneCommand(Command proto)
          Clone a command
static Command get(java.lang.String cmdName)
          Get a cloned Command object of the given name
static javax.swing.Action getAction(java.lang.String cmdName)
          Get a javax.swing.Action initialized appropriately to execute the named command when the action is triggerred
static javax.swing.JMenuItem getMenuItem(java.lang.String cmdName)
          Get a javax.swing.JMenuItem initialized appropriately to execute the named command when the menu is triggerred
static void setEnabled(java.lang.String cmdName, boolean enabled)
          Set the global enables status of the named command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandFactory

public CommandFactory()
Method Detail

cloneCommand

public static Command cloneCommand(Command proto)
Clone a command


get

public static Command get(java.lang.String cmdName)
Get a cloned Command object of the given name


getAction

public static javax.swing.Action getAction(java.lang.String cmdName)
Get a javax.swing.Action initialized appropriately to execute the named command when the action is triggerred


getMenuItem

public static javax.swing.JMenuItem getMenuItem(java.lang.String cmdName)
Get a javax.swing.JMenuItem initialized appropriately to execute the named command when the menu is triggerred


setEnabled

public static void setEnabled(java.lang.String cmdName,
                              boolean enabled)
Set the global enables status of the named command. Propagates the settings appropriately to all Actions and JMenuItems that were allocated from this class.


Release Planner v1.0