pop.gui
Class ActionManager

java.lang.Object
  |
  +--pop.gui.ActionManager

public class ActionManager
extends java.lang.Object

Keeps track of actions performed. Creates all Actions as subclasses of AbstractStep, and enables/disables these actions as necessary to insure steps are performed in proper order.


Constructor Summary
ActionManager()
          Only usable constructor.
 
Method Summary
 boolean data_completed()
          True if data are complete.
 void destroy()
          Only way to destroy an old ActionManager prior to creating a new one.
 javax.swing.Action detailed_action()
          The action for detailed results.
 javax.swing.Action fertility_action()
          The action for fertility data.
 PopulationSizes initial_population_sizes(int category)
          Returns initial population sizes for the specified category if population data entry is completed; null otherwise.
 javax.swing.Action load_action()
          The action for loading a model from a file.
 javax.swing.Action migration_action()
          The action for migration data.
 javax.swing.Action mortality_action()
          The action for mortality data.
 javax.swing.Action population_action()
          The action for initial population data.
 Results results()
          Returns results if model has been run.
 javax.swing.Action run_action()
          The action for running the model.
 boolean run_completed()
          True if model has been run.
 javax.swing.Action save_action()
          The action for saving a model to a file.
 javax.swing.Action setup_action()
          The action that sets up the model.
 boolean setup_completed()
          True if setup is complete.
 void special(AbstractStep action)
          Special version of success() to handle unusual action requests.
protected  void success(AbstractStep action)
          A way for my actions to signal successful completion.
 javax.swing.Action summary_action()
          The action for summary results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionManager

public ActionManager()
Only usable constructor. Special note: this is a "Singleton"; just one may be instantiated at a time.
Method Detail

success

protected void success(AbstractStep action)
A way for my actions to signal successful completion. No response is made to actions I did not create.
Parameters:
action - - the action that is completed

special

public void special(AbstractStep action)
Special version of success() to handle unusual action requests. No response is made to actions I did not create.
Parameters:
action - - the action that is completed

setup_completed

public boolean setup_completed()
True if setup is complete.

data_completed

public boolean data_completed()
True if data are complete.

initial_population_sizes

public PopulationSizes initial_population_sizes(int category)
Returns initial population sizes for the specified category if population data entry is completed; null otherwise.

run_completed

public boolean run_completed()
True if model has been run.

destroy

public void destroy()
Only way to destroy an old ActionManager prior to creating a new one. NOTE: not a static method; must have actual reference to invoke.

setup_action

public javax.swing.Action setup_action()
The action that sets up the model.

population_action

public javax.swing.Action population_action()
The action for initial population data.

fertility_action

public javax.swing.Action fertility_action()
The action for fertility data.

mortality_action

public javax.swing.Action mortality_action()
The action for mortality data.

migration_action

public javax.swing.Action migration_action()
The action for migration data.

run_action

public javax.swing.Action run_action()
The action for running the model.

summary_action

public javax.swing.Action summary_action()
The action for summary results.

detailed_action

public javax.swing.Action detailed_action()
The action for detailed results.

save_action

public javax.swing.Action save_action()
The action for saving a model to a file.

load_action

public javax.swing.Action load_action()
The action for loading a model from a file.

results

public Results results()
Returns results if model has been run.