net.sf.rej.gui
Interface Undoable

All Known Implementing Classes:
AddClassRefAction, AddConstantPoolInfoAction, AddFieldRefAction, AddMethodRefAction, AddStringInfoAction, CreateCodeAttributeAction, GroupAction, InsertCodeAction, InsertCodeToNewMethodAction, InsertFieldAction, InsertInstructionAction, InsertMethodAction, MarkClassFileModifiedAction, ModifyAttributeDataAction, ModifyClassInfoAction, ModifyClassPropertiesAction, ModifyClassVersionAction, ModifyDescriptor, ModifyDoubleInfoAction, ModifyFieldAction, ModifyFloatInfoAction, ModifyInstructionAction, ModifyIntegerInfoAction, ModifyLongInfoAction, ModifyMethodAction, ModifyNameAndTypeInfoAction, ModifyStringInfoAction, ModifyUTF8InfoAction, MoveInstructionDownAction, MoveInstructionUpAction, ParamModifyAction, RemoveAttributeAction, RemoveFieldAction, RemoveFileAction, RemoveInstructionAction, RemoveLastConstantPoolInfo, RemoveMethodAction, RenameFieldAction, RenameFileAction, RenameMethodAction

public interface Undoable

Interface for all actions that can be undone(UNDOed). The basic idea is that an action knows how to execute itself, and how to undo that execution. The contract of Undoable demands also that { Undoable.execute(); Undoable.undo(); } can be called any number of times. Meaning from the user interface point of view that the user can trigger the action, undo it, redo it, undo it, redo it, undo it as many times as the user wishes. However execute won't be called twice without calling undo in between and undo won't be called twice without calling execute in between.

Author:
KOIVUSAM

Method Summary
 void execute()
          Execute the command/action that fulfills the Undoable contract.
 void undo()
          Undo all the changes caused by a call to the execute() method of this instance.
 

Method Detail

execute

void execute()
Execute the command/action that fulfills the Undoable contract.


undo

void undo()
Undo all the changes caused by a call to the execute() method of this instance.