visad.bio
Class StateManager

java.lang.Object
  extended by visad.bio.StateManager

public class StateManager
extends java.lang.Object

StateManager contains information needed to recreate a VisBio program state, in the case of a program crash or other error.


Constructor Summary
StateManager(VisBio biovis)
          Constructs a VisBio state management object.
StateManager(VisBio biovis, java.lang.String state, java.lang.String oldState)
          Constructs a VisBio state management object.
 
Method Summary
 void checkCrash()
          Checks whether the state file already exists, and if so, asks the user whether to restore the previous state.
 void checkSave()
          Checks whether the program state has been saved, and if not, prompts the user to save.
 void destroy()
          Deletes state-related temp files.
 void restoreState()
          Restores the latest state from the temp file.
 void restoreState(java.io.File stateFile)
          Restores the state from the given state file.
 void saveState()
          Saves the current state to the temp file.
 void saveState(java.io.File stateFile)
          Saves the current state to the temp file.
 void undo()
          Restores the previous state from the backup temp file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateManager

public StateManager(VisBio biovis)
Constructs a VisBio state management object.


StateManager

public StateManager(VisBio biovis,
                    java.lang.String state,
                    java.lang.String oldState)
Constructs a VisBio state management object.

Method Detail

restoreState

public void restoreState()
Restores the latest state from the temp file.


undo

public void undo()
Restores the previous state from the backup temp file.


saveState

public void saveState()
Saves the current state to the temp file.


restoreState

public void restoreState(java.io.File stateFile)
Restores the state from the given state file.


saveState

public void saveState(java.io.File stateFile)
Saves the current state to the temp file.


checkCrash

public void checkCrash()
Checks whether the state file already exists, and if so, asks the user whether to restore the previous state.


checkSave

public void checkSave()
Checks whether the program state has been saved, and if not, prompts the user to save.


destroy

public void destroy()
Deletes state-related temp files.