Package groovy.ui.text

## Class TextUndoManager

- java.lang.Object
- - javax.swing.undo.AbstractUndoableEdit
  - - javax.swing.undo.CompoundEdit
    - - javax.swing.undo.UndoManager
      - - groovy.ui.text.TextUndoManager

- All Implemented Interfaces:
    `Serializable`, `EventListener`, `UndoableEditListener`, `UndoableEdit`

      @Deprecated
      public class TextUndoManager
      extends UndoManager

  Deprecated.
  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).
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class javax.swing.undo.CompoundEdit

      `edits`

    - ### Fields inherited from class javax.swing.undo.AbstractUndoableEdit

      `RedoName, UndoName`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TextUndoManager()` | Deprecated. Creates a new instance of TextUndoManager.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addPropertyChangeListener​(PropertyChangeListener pcl)` | Deprecated.
    `void` | `die()` | Deprecated.
    `void` | `discardAllEdits()` | Deprecated.
    `protected void` | `firePropertyChangeEvent​(String name, boolean oldValue, boolean newValue)` | Deprecated.
    `boolean` | `hasChanged()` | Deprecated.
    `void` | `redo()` | Deprecated.
    `protected void` | `redoTo​(UndoableEdit edit)` | Deprecated.
    `void` | `removePropertyChangeListener​(PropertyChangeListener pcl)` | Deprecated.
    `void` | `reset()` | Deprecated.
    `protected void` | `trimEdits​(int from, int to)` | Deprecated.
    `void` | `undo()` | Deprecated.
    `void` | `undoableEditHappened​(UndoableEditEvent uee)` | Deprecated.

    - ### Methods inherited from class javax.swing.undo.UndoManager

      `addEdit, canRedo, canUndo, canUndoOrRedo, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, setLimit, toString, trimForLimit, undoOrRedo, undoTo`

    - ### Methods inherited from class javax.swing.undo.CompoundEdit

      `getPresentationName, isInProgress, isSignificant, lastEdit`

    - ### Methods inherited from class javax.swing.undo.AbstractUndoableEdit

      `replaceEdit`

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

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

- - ### Constructor Detail

    - #### TextUndoManager

          public TextUndoManager()

      Deprecated.
      Creates a new instance of TextUndoManager.

  - ### Method Detail

    - #### addPropertyChangeListener

          public void addPropertyChangeListener​(PropertyChangeListener pcl)

      Deprecated.

    - #### die

          public void die()

      Deprecated.
      Specified by:
        `die` in interface `UndoableEdit`
      Overrides:
        `die` in class `CompoundEdit`

    - #### discardAllEdits

          public void discardAllEdits()

      Deprecated.
      Overrides:
        `discardAllEdits` in class `UndoManager`

    - #### firePropertyChangeEvent

          protected void firePropertyChangeEvent​(String name,
                                                 boolean oldValue,
                                                 boolean newValue)

      Deprecated.

    - #### hasChanged

          public boolean hasChanged()

      Deprecated.

    - #### redo

          public void redo()
                    throws CannotRedoException

      Deprecated.
      Specified by:
        `redo` in interface `UndoableEdit`
      Overrides:
        `redo` in class `UndoManager`
      Throws:
        `CannotRedoException`

    - #### redoTo

          protected void redoTo​(UndoableEdit edit)

      Deprecated.
      Overrides:
        `redoTo` in class `UndoManager`

    - #### removePropertyChangeListener

          public void removePropertyChangeListener​(PropertyChangeListener pcl)

      Deprecated.

    - #### reset

          public void reset()

      Deprecated.

    - #### trimEdits

          protected void trimEdits​(int from,
                                   int to)

      Deprecated.
      Overrides:
        `trimEdits` in class `UndoManager`

    - #### undo

          public void undo()
                    throws CannotUndoException

      Deprecated.
      Specified by:
        `undo` in interface `UndoableEdit`
      Overrides:
        `undo` in class `UndoManager`
      Throws:
        `CannotUndoException`

    - #### undoableEditHappened

          public void undoableEditHappened​(UndoableEditEvent uee)

      Deprecated.
      Specified by:
        `undoableEditHappened` in interface `UndoableEditListener`
      Overrides:
        `undoableEditHappened` in class `UndoManager`