antsnest.undo
Class UndoManager

java.lang.Object
  extended by antsnest.undo.UndoManager

public class UndoManager
extends Object

Responsible for managing undo/redo actions

Author:
Chris Clohosy

Constructor Summary
UndoManager(ApplicationTasks appTasks, JComponent[] undoComponents, JComponent[] redoComponents)
          Constructs the manager
 
Method Summary
 AntProject getLastState()
          Gets the last state of a project
 AntProject getNextState()
          Gets the next state of a project
 void projectChanged()
          Called when a project has been edited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UndoManager

public UndoManager(ApplicationTasks appTasks,
                   JComponent[] undoComponents,
                   JComponent[] redoComponents)
Constructs the manager

Parameters:
appTasks - an object that can perform application tasks
undoComponents - components that execute undo
redoComponents - components that execute redo
Method Detail

projectChanged

public void projectChanged()
Called when a project has been edited


getLastState

public AntProject getLastState()
Gets the last state of a project

Returns:
an AntProject, the previous version

getNextState

public AntProject getNextState()
Gets the next state of a project

Returns:
an AntProject, the next version