public abstract class UndoableCommand
extends java.lang.Object
UndoableEdit
Modifier and Type | Field and Description |
---|---|
static UndoableCommand |
DUMMY |
Constructor and Description |
---|
UndoableCommand(java.lang.String name)
UndoableCommand with a name to be shown in the user interface.
|
UndoableCommand(java.lang.String name,
Layer layer)
UndoableCommand with a name and a layer parameter.
|
Modifier and Type | Method and Description |
---|---|
protected void |
dispose()
Releases resources and make the edit action unsignificant, so that
it will be ignored in the undo chain.
|
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).
|
Layer |
getLayer() |
java.lang.String |
getName() |
boolean |
isCanceled() |
void |
setLayer(Layer layer) |
javax.swing.undo.UndoableEdit |
toUndoableEdit() |
abstract void |
unexecute() |
public static final UndoableCommand DUMMY
public UndoableCommand(java.lang.String name)
public UndoableCommand(java.lang.String name, Layer layer)
public void setLayer(Layer layer)
public Layer getLayer()
protected void dispose()
public boolean isCanceled()
public abstract void execute()
public abstract void unexecute()
public javax.swing.undo.UndoableEdit toUndoableEdit()
public java.lang.String getName()