Package: groovy.ui.text

## [Java] Class TextUndoManager

- groovy.ui.text.TextUndoManager

- To use this, simply drop this as an UndoableEditListener into your document, and then create actions to call undo/redo as needed (checking can undo/redo first, of course).

  Authors:
    Evan "Hippy" Slatis

- - ### Constructor Summary

    Constructors
    Constructor and description
    `TextUndoManager ()` Creates a new instance of TextUndoManager.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `addPropertyChangeListener(PropertyChangeListener pcl)`
    `` | `void` | `die()`
    `` | `void` | `discardAllEdits()`
    `` | `protected void` | `firePropertyChangeEvent(String name, boolean oldValue, boolean newValue)`
    `` | `boolean` | `hasChanged()`
    `` | `void` | `redo()`
    `` | `protected void` | `redoTo(UndoableEdit edit)`
    `` | `void` | `removePropertyChangeListener(PropertyChangeListener pcl)`
    `` | `void` | `reset()`
    `` | `protected void` | `trimEdits(int from, int to)`
    `` | `void` | `undo()`
    `` | `void` | `undoableEditHappened(UndoableEditEvent uee)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class UndoManager` | `getLimit, addEdit, undoableEditHappened, undo, canUndo, redo, canRedo, getUndoPresentationName, getRedoPresentationName, discardAllEdits, undoOrRedo, canUndoOrRedo, getUndoOrRedoPresentationName, toString, end, setLimit, die, isSignificant, getPresentationName, isInProgress, replaceEdit, equals, hashCode, getClass, notify, notifyAll, wait, wait, wait`
    `class CompoundEdit` | `addEdit, undo, canUndo, redo, canRedo, die, isSignificant, getPresentationName, getUndoPresentationName, getRedoPresentationName, isInProgress, toString, end, replaceEdit, equals, hashCode, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### public TextUndoManager()

      Creates a new instance of TextUndoManager.

  - ### Method Detail

    - #### public void addPropertyChangeListener(PropertyChangeListener pcl)

    - #### public void die()

    - #### public void discardAllEdits()

    - #### protected void firePropertyChangeEvent(String name, boolean oldValue, boolean newValue)

    - #### public boolean hasChanged()

    - #### public void redo()

    - #### protected void redoTo(UndoableEdit edit)

    - #### public void removePropertyChangeListener(PropertyChangeListener pcl)

    - #### public void reset()

    - #### protected void trimEdits(int from, int to)

    - #### public void undo()

    - #### public void undoableEditHappened(UndoableEditEvent uee)