com.qoppa.pdfNotes.undo
Interface UndoManager


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().

Author:
Qoppa Software
See Also:
PDFNotesBean.getUndoManager()

Method Summary
 void addUndoListener(UndoListener listener)
          Registers an UndoListener to be notified when the undo action list is modified.
 void clearUndoList()
          Clears the undo 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.
 

Method Detail

addUndoListener

void addUndoListener(UndoListener listener)
Registers an UndoListener to be notified when the undo action list is modified.

Parameters:
listener - the UndoListener to register

undo

void undo()
Causes the next undo UndoAction to be executed.


redo

void redo()
Causes the next redo UndoAction to be executed.


clearUndoList

void clearUndoList()
Clears the undo list.


setEnabled

void setEnabled(boolean enabled)
Enables or disables the UndoManager. When the UndoManager is disabled, the undo list is also cleared.

Parameters:
enabled - if true the UndoManager will be enabled, false otherwise

getNextUndoAction

UndoAction getNextUndoAction()
Returns the next undo UndoAction.

Returns:
the next undo UndoAction

getNextRedoAction

UndoAction getNextRedoAction()
Returns the next redo UndoAction.

Returns:
the next redo UndoAction