csheets.ui.ctrl
Class ActionManager

java.lang.Object
  extended by csheets.ui.ctrl.ActionManager

public class ActionManager
extends Object

A manager for UI actions.

Author:
Einar Pehrson

Nested Class Summary
 class ActionManager.ActionEnabler
          A workbook listener that sets the enabled state of actoins depending on whether the current workbook has been modified and/or is stored in a file.
 
Constructor Summary
ActionManager(CleanSheets app, UIController uiController, FileChooser chooser)
          Creates a new action manager.
 
Method Summary
 BaseAction getAction(String identifier)
          Returns the action with the given identifier
 void registerAction(String identifier, BaseAction action)
          Registers the given action with the manager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionManager

public ActionManager(CleanSheets app,
                     UIController uiController,
                     FileChooser chooser)
Creates a new action manager.

Parameters:
app - the CleanSheets application
uiController - the user interface controller
chooser - a file chooser
Method Detail

getAction

public BaseAction getAction(String identifier)
Returns the action with the given identifier

Parameters:
identifier - the unique identifier of the action
Returns:
the action of the given type

registerAction

public void registerAction(String identifier,
                           BaseAction action)
Registers the given action with the manager

Parameters:
identifier - the unique identifier of the action
action - the action to register