public interface UndoManager
UndoManager manages a list of undo actions, providing a way to
undo or redo the appropriate edits.
A built-in implementation of this class is provided. Users to not need to
implement this interface. A PDFNotesBean contains an instance of
the UndoManager and can be referenced with
PDFNotesBean.getUndoManager().
PDFNotesBean.getUndoManager()| Modifier and Type | Method and Description |
|---|---|
void |
addUndoListener(UndoListener listener)
Registers an
UndoListener to be notified when the undo
action list is modified. |
void |
clearUndoList()
Removes all undo and redo
UndoActions from the list. |
UndoAction |
getNextRedoAction()
Returns the next redo
UndoAction. |
UndoAction |
getNextUndoAction()
Returns the next undo
UndoAction. |
void |
redo()
Causes the next redo
UndoAction to be executed. |
void |
setEnabled(boolean enabled)
Enables or disables the
UndoManager. |
void |
undo()
Causes the next undo
UndoAction to be executed. |
void addUndoListener(UndoListener listener)
UndoListener to be notified when the undo
action list is modified.listener - the UndoListener to registervoid undo()
UndoAction to be executed.void redo()
UndoAction to be executed.void clearUndoList()
UndoActions from the list.void setEnabled(boolean enabled)
UndoManager. By default, the
UndoManager is on. If there are memory concerns, the
UndoManager can be disabled so that undo and redo
UndoActions are no longer stored in memory and
the current undo list is also cleared.enabled - Set false to disable the UndoManager or true to enable it.UndoAction getNextUndoAction()
UndoAction.UndoActionUndoAction getNextRedoAction()
UndoAction.UndoAction