public interface UndoDelegateContext extends Changeable
Used to take control of the undo/redo stack. Normally, undo/redo is done by registering an Object "context" with
the UndoManager
, and then adding undo actions. The context is normally an opaque object used only for
equality purposes to keep the undo stacks of different parts of the UI separate.
If the context you register with the undo manager just so happens to implement this interface, however, then the undo stack and undo actions are not used. Instead, the undo actions delegate to the methods defined on this interface. Note that this interface extends from Changeable, and should fire change events when the "answers" to the can* methods has changed.
Modifier and Type | Method and Description |
---|---|
boolean |
canRedo()
Controls whether or not the redo action will be enabled.
|
boolean |
canUndo()
Controls whether or not the undo action will be enabled.
|
java.lang.String |
getRedoDescription() |
java.lang.String |
getUndoDescription() |
void |
redo()
Perform the redo action.
|
void |
undo()
Perform the undo action.
|
addChangeListener, removeChangeListener
boolean canUndo()
boolean canRedo()
void undo()
void redo()
java.lang.String getUndoDescription()
java.lang.String getRedoDescription()