org.jppf.ui.actions
Class AbstractActionHandler

java.lang.Object
  extended by org.jppf.ui.actions.AbstractActionHandler
All Implemented Interfaces:
ActionHandler
Direct Known Subclasses:
JTreeTableActionHandler

public abstract class AbstractActionHandler
extends Object
implements ActionHandler

Abstract implementation of the ActionManager interface.

Author:
Laurent Cohen

Field Summary
protected  Map<String,UpdatableAction> actionMap
          Mapping of actions to their name.
protected  List<Object> selectedElements
          List of elements selected in the managed component.
 
Constructor Summary
AbstractActionHandler()
           
 
Method Summary
 UpdatableAction getAction(String name)
          Get the action with the specified name.
 List<Object> getSelectedElements()
          Get the selected elements in the JTreeTable handled by this action manager.
 void putAction(String name, UpdatableAction action)
          Add an action with the specified name to this action manager.
 void updateActions()
          Update the state of all actions registered with this ActionHandler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actionMap

protected Map<String,UpdatableAction> actionMap
Mapping of actions to their name.


selectedElements

protected List<Object> selectedElements
List of elements selected in the managed component.

Constructor Detail

AbstractActionHandler

public AbstractActionHandler()
Method Detail

putAction

public void putAction(String name,
                      UpdatableAction action)
Add an action with the specified name to this action manager.

Specified by:
putAction in interface ActionHandler
Parameters:
name - the name of the action to add.
action - the action to add.
See Also:
ActionHandler.putAction(java.lang.String, org.jppf.ui.actions.UpdatableAction)

getAction

public UpdatableAction getAction(String name)
Get the action with the specified name.

Specified by:
getAction in interface ActionHandler
Parameters:
name - the name of the action to find.
Returns:
an Action or null if the specified name could not be found.
See Also:
ActionHandler.getAction(java.lang.String)

getSelectedElements

public List<Object> getSelectedElements()
Get the selected elements in the JTreeTable handled by this action manager.

Specified by:
getSelectedElements in interface ActionHandler
Returns:
a list of objects.
See Also:
ActionHandler.getSelectedElements()

updateActions

public void updateActions()
Update the state of all actions registered with this ActionHandler.

Specified by:
updateActions in interface ActionHandler
See Also:
ActionHandler.updateActions()


Copyright © 2005-2010 JPPF Team.