public class StableCompoundEdit extends Object implements UndoableEdit
CompoundEdit
but guarantees
stability of internal state even if undo()/redo() throws an exception.Constructor and Description |
---|
StableCompoundEdit() |
Modifier and Type | Method and Description |
---|---|
boolean |
addEdit(UndoableEdit anEdit) |
boolean |
canRedo() |
boolean |
canUndo() |
void |
die() |
void |
end() |
List<UndoableEdit> |
getEdits() |
String |
getPresentationName() |
String |
getRedoPresentationName() |
String |
getUndoPresentationName() |
boolean |
isInProgress() |
boolean |
isSignificant() |
protected UndoableEdit |
lastEdit() |
void |
redo() |
boolean |
replaceEdit(UndoableEdit anEdit) |
String |
toString() |
void |
undo() |
public final List<UndoableEdit> getEdits()
public void die()
die
in interface UndoableEdit
public void undo() throws CannotUndoException
undo
in interface UndoableEdit
CannotUndoException
public boolean canUndo()
canUndo
in interface UndoableEdit
public void redo() throws CannotRedoException
redo
in interface UndoableEdit
CannotRedoException
public boolean canRedo()
canRedo
in interface UndoableEdit
public boolean addEdit(UndoableEdit anEdit)
addEdit
in interface UndoableEdit
public boolean replaceEdit(UndoableEdit anEdit)
replaceEdit
in interface UndoableEdit
public boolean isSignificant()
isSignificant
in interface UndoableEdit
public String getPresentationName()
getPresentationName
in interface UndoableEdit
public String getUndoPresentationName()
getUndoPresentationName
in interface UndoableEdit
public String getRedoPresentationName()
getRedoPresentationName
in interface UndoableEdit
public void end()
public boolean isInProgress()
protected UndoableEdit lastEdit()