Groovy 1.7.10

## groovy.ui.text
[Java] Class TextUndoManager

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

    public class TextUndoManager
    extends UndoManager

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
`TextUndoManager()` Creates a new instance of TextUndoManager.

Method Summary
`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)`

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

Methods inherited from class CompoundEdit
toString, end, addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, redo, undo, isInProgress, replaceEdit, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll

Methods inherited from class AbstractUndoableEdit
toString, addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, redo, replaceEdit, undo, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Constructor Detail

### TextUndoManager

    public TextUndoManager()

  Creates a new instance of TextUndoManager.

Method Detail

### addPropertyChangeListener

    public void addPropertyChangeListener(PropertyChangeListener pcl)

### die

    public void die()

### discardAllEdits

    public void discardAllEdits()

### firePropertyChangeEvent

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

### hasChanged

    public boolean hasChanged()

### redo

    public void redo()

### redoTo

    protected void redoTo(UndoableEdit edit)

### removePropertyChangeListener

    public void removePropertyChangeListener(PropertyChangeListener pcl)

### reset

    public void reset()

### trimEdits

    protected void trimEdits(int from, int to)

### undo

    public void undo()

### undoableEditHappened

    public void undoableEditHappened(UndoableEditEvent uee)

Copyright © 2003-2010 The Codehaus. All rights reserved.