ptolemy.kernel.undo
Class UndoActionsList

java.lang.Object
  extended by ptolemy.kernel.undo.UndoActionsList
All Implemented Interfaces:
UndoAction

public class UndoActionsList
extends java.lang.Object
implements UndoAction

This class contains a sequential list of UndoAction instances that can be executed in order.

Since:
Ptolemy II 8.0
Version:
$Id: UndoActionsList.java 57044 2010-01-27 22:41:05Z cxh $
Author:
Edward A. Lee
Accepted Rating:
Red (cxh)
Proposed Rating:
Yellow (eal)

Field Summary
private  java.util.List<UndoAction> _actionList
          The list of actions to execute.
 
Constructor Summary
UndoActionsList(UndoAction firstAction)
          Create an undo action with the specified action to be executed first.
 
Method Summary
 void add(UndoAction action)
          Append a new entry to the list.
 void execute()
          Execute the action.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_actionList

private java.util.List<UndoAction> _actionList
The list of actions to execute.

Constructor Detail

UndoActionsList

public UndoActionsList(UndoAction firstAction)
Create an undo action with the specified action to be executed first.

Parameters:
firstAction - The action to execute first.
Method Detail

add

public void add(UndoAction action)
Append a new entry to the list.

Parameters:
action - The entry to append.

execute

public void execute()
             throws java.lang.Exception
Execute the action.

Specified by:
execute in interface UndoAction
Throws:
java.lang.Exception - If something goes wrong.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object