Interface UndoManager

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • canUndo

         abstract boolean canUndo()

        Returns whether there are edits that can be undone or not. If this returns false a call to undo will throw an exception.

        Returns:

        true if an undo operation is possible, false otherwise.

      • canRedo

         abstract boolean canRedo()

        Returns whether there are edits that can be redone or not. If this returns false a call to redo will throw an exception.

        Returns:

        true if a redo operation is possible, false otherwise.

      • undo

         abstract void undo()

        Undoes the last edit or throws an exception if an undo operation is not possible. It's recommended that you check whether an undo operation is available using (canUndo) before calling this method. Undoing may be unavailable if there are no edits on the undo stack or if the latest edit on the undo stack cannot be undone. When undoing an edit, the edit is moved to the internal redo stack.

      • redo

         abstract void redo()

        Redoes the next edit or throws an exception if a redo operation is not possible. It's recommended that you check whether a redo operation is available using (canRedo) before calling this method. Redoing may be unavailable if there are no edits on the redo stack or if the latest edit on the redo stack cannot be redone. When redoing an edit, the edit is moved to the internal undo stack.

      • clearHistory

         abstract void clearHistory()

        Clears the history of all currently recorded edits. After calling this method, this will have no edits that can be undone or redone.