Package ptolemy.kernel.undo
Class UndoActionsList
- java.lang.Object
-
- 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$
- Author:
- Edward A. Lee
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Yellow (eal)
-
-
Constructor Summary
Constructors Constructor Description UndoActionsList(UndoAction firstAction)
Create an undo action with the specified action to be executed first.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(UndoAction action)
Append a new entry to the list.void
execute()
Execute the action.java.lang.String
toString()
-
-
-
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 interfaceUndoAction
- Throws:
java.lang.Exception
- If something goes wrong.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-