planetj.dataengine.display
Class ActionManager

java.lang.Object
  |
  +--planetj.dataengine.display.ActionManager

public class ActionManager
extends Object

The ActionManager manages what actions are registered.


Method Summary
 AbstractAction getAction(ActionDisplayDescriptor descriptor)
          Gets the action associated with the given descriptor.
 AbstractAction getAction(String type, String name)
          Gets the action for the given action type and name.
 ActionDisplayDescriptor getDefaultDescriptor(String displayType, String actionType, String actionName)
          Gets the default registered descriptor for the given display type, action name, and action type.
 List getRegisteredNamesForType(String type)
          Gets the names of actions registered for the given type.
 IRenderer getRenderer(String displayType, String actionType, String actionName)
          Gets the renderer for the given display type, action name, and action type.
 void registerAction(String type, String name, AbstractAction action)
          Puts the action for the given action type and name.
 void registerDefaultDescriptor(String displayType, String actionType, String actionName, ActionDisplayDescriptor descriptor)
          Puts the action for the given action type and name.
 void registerRenderer(String displayType, String actionType, String actionName, IRenderer renderer)
          Puts the action for the given action type and name.
static void setSingleton(ActionManager actionMgr)
          Allows a subclass of the ActionManager to be set as the singleton instance.
static ActionManager singleton()
          Gets the singleton instance of the ActionManager
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAction

public AbstractAction getAction(String type,
                                String name)
Gets the action for the given action type and name.

Returns:
action.

getAction

public AbstractAction getAction(ActionDisplayDescriptor descriptor)
Gets the action associated with the given descriptor.

Parameters:
descriptor -

getDefaultDescriptor

public ActionDisplayDescriptor getDefaultDescriptor(String displayType,
                                                    String actionType,
                                                    String actionName)
Gets the default registered descriptor for the given display type, action name, and action type.

Returns:
IRenderer.

getRegisteredNamesForType

public List getRegisteredNamesForType(String type)
Gets the names of actions registered for the given type.

Parameters:
type -

getRenderer

public IRenderer getRenderer(String displayType,
                             String actionType,
                             String actionName)
Gets the renderer for the given display type, action name, and action type.

Returns:
IRenderer.

registerAction

public void registerAction(String type,
                           String name,
                           AbstractAction action)
Puts the action for the given action type and name.

Returns:
action.

registerDefaultDescriptor

public void registerDefaultDescriptor(String displayType,
                                      String actionType,
                                      String actionName,
                                      ActionDisplayDescriptor descriptor)
Puts the action for the given action type and name.

Returns:
action.

registerRenderer

public void registerRenderer(String displayType,
                             String actionType,
                             String actionName,
                             IRenderer renderer)
Puts the action for the given action type and name.

Returns:
action.

setSingleton

public static void setSingleton(ActionManager actionMgr)
Allows a subclass of the ActionManager to be set as the singleton instance. The singleton instance isn't synchronized, so this method must be invoked before the singleton is accessed.

Parameters:
actionMgr - new singleton instance

singleton

public static ActionManager singleton()
Gets the singleton instance of the ActionManager