Class UndoableCommand
- java.lang.Object
-
- org.locationtech.jts.jump.workbench.model.UndoableCommand
-
public abstract class UndoableCommand extends Object
An action that can be rolled back. Similar to an UndoableEdit, but assumes that the action is yet to be executed, whereas an UndoableEdit assumes that the action has already been executed (i.e. it has a #redo method but not a #do method).- See Also:
UndoableEdit
-
-
Field Summary
Fields Modifier and Type Field Description static UndoableCommand
DUMMY
-
Constructor Summary
Constructors Constructor Description UndoableCommand(String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
dispose()
Releases resources.abstract void
execute()
If there is an exception that leaves this UndoableCommand execution partially complete and non-unexecutable, be sure to call #reportIrreversibleChange() on the UndoableEditReceiver (which can be obtained from the LayerManager).String
getName()
UndoableEdit
toUndoableEdit()
abstract void
unexecute()
-
-
-
Field Detail
-
DUMMY
public static final UndoableCommand DUMMY
-
-
Constructor Detail
-
UndoableCommand
public UndoableCommand(String name)
-
-
Method Detail
-
dispose
protected void dispose()
Releases resources.
-
execute
public abstract void execute()
If there is an exception that leaves this UndoableCommand execution partially complete and non-unexecutable, be sure to call #reportIrreversibleChange() on the UndoableEditReceiver (which can be obtained from the LayerManager).
-
unexecute
public abstract void unexecute()
-
toUndoableEdit
public UndoableEdit toUndoableEdit()
-
getName
public String getName()
-
-