com.vividsolutions.jump.workbench.model
Class UndoableCommand
java.lang.Object
com.vividsolutions.jump.workbench.model.UndoableCommand
public abstract class UndoableCommand
- extends java.lang.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
|
Method Summary |
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). |
java.lang.String |
getName()
|
javax.swing.undo.UndoableEdit |
toUndoableEdit()
|
abstract void |
unexecute()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DUMMY
public static final UndoableCommand DUMMY
UndoableCommand
public UndoableCommand(java.lang.String name)
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).
- See Also:
UndoableEditReceiver.reportIrreversibleChange()
unexecute
public abstract void unexecute()
toUndoableEdit
public javax.swing.undo.UndoableEdit toUndoableEdit()
getName
public java.lang.String getName()