public interface UndoableEdit
Modifier and Type | Method and Description |
---|---|
boolean |
addEdit(UndoableEdit edit)
Incorporates another editing action into this one, thus forming a
combined action.
|
boolean |
canRedo()
Determines whether it would be possible to redo this editing
action.
|
boolean |
canUndo()
Determines whether it would be possible to undo this editing
action.
|
void |
die()
Informs this edit action that it will no longer be used.
|
String |
getPresentationName()
Returns a human-readable, localized name that describes this
editing action and can be displayed to the user.
|
String |
getRedoPresentationName()
Returns the redo presentation name.
|
String |
getUndoPresentationName()
Returns the undo presentation name.
|
boolean |
isSignificant()
Determines whether this editing action is significant enough for
being seperately undoable by the user.
|
void |
redo()
Redoes this editing action.
|
boolean |
replaceEdit(UndoableEdit edit)
Incorporates another editing action into this one, thus forming a
combined action that replaces the argument action.
|
void |
undo()
Undoes this editing action.
|
boolean addEdit(UndoableEdit edit)
edit
- the editing action to be incorporated.true
if the edit was combined successfully, and
false
if it could not be combined.boolean canRedo()
boolean canUndo()
void die()
UndoManager
before this
action is removed from the edit queue.String getPresentationName()
String getRedoPresentationName()
String getUndoPresentationName()
boolean isSignificant()
true
to indicate that the action is
significant enough for being separately undoable, or
false
otherwise.void redo() throws CannotRedoException
CannotRedoException
- if the edit cannot be undone.canRedo()
,
undo()
boolean replaceEdit(UndoableEdit edit)
edit
- the editing action to be replaced.true
if the edit is successfully replaced, and
false
otherwise.void undo() throws CannotUndoException
CannotUndoException
- if the edit cannot be undone.canUndo()
,
redo()