artofillusion
Class UndoStack

java.lang.Object
  extended by artofillusion.UndoStack

public class UndoStack
extends java.lang.Object

This class maintains a stack of UndoRecords for a window. It also automatically records the redo records generated when they are executed.


Constructor Summary
UndoStack()
           
 
Method Summary
 void addRecord(UndoRecord record)
          Add an UndoRecord to the stack.
 boolean canRedo()
          Determine whether there are any redo records available, so that a Redo command could be executed.
 boolean canUndo()
          Determine whether there are any undo records available, so that an Undo command could be executed.
 void executeRedo()
          Execute the redo record at the top of the stack.
 void executeUndo()
          Execute the undo record at the top of the stack.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UndoStack

public UndoStack()
Method Detail

canUndo

public boolean canUndo()
Determine whether there are any undo records available, so that an Undo command could be executed.


canRedo

public boolean canRedo()
Determine whether there are any redo records available, so that a Redo command could be executed.


addRecord

public void addRecord(UndoRecord record)
Add an UndoRecord to the stack.


executeUndo

public void executeUndo()
Execute the undo record at the top of the stack.


executeRedo

public void executeRedo()
Execute the redo record at the top of the stack.



Copyright © 1999-2011 by Peter Eastman.