Package docking

# Class UndoRedoKeeper

java.lang.Object
docking.UndoRedoKeeper

public class UndoRedoKeeper extends Object
Handles tracking undo and redo events. Clients may wish to hold on to this class in order to clear the undo/redo queue.

Style Edits
`JTextPane`s allow for styles (color, bold, etc) to be applied to their text. The default undo/redo events may arrive singly, not in bulk. Thus, when the user presses undo, each style change is undo, one at a time. This is intuitive when the user controls the application of style. However, when style is applied programmatically, it can be odd to see that the user-type text does not change, but just the coloring applied to that text.

To address this issue, this class takes the approach of combining all style edits into a single bulk edit. Then, as the user presses undo, all style edits can be removed together, as well as any neighboring text edits. Put simply, this class tracks style edits such that an undo operation will undo all style changes, as well as a single text edit.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UndoRedoKeeper()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clear()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### UndoRedoKeeper

    public UndoRedoKeeper()

- ## Method Details

  - ### clear

    public void clear()