|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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).
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 | |
---|---|
setLimit, getRedoPresentationName, getUndoPresentationName, addEdit, canRedo, canUndo, undo, undoableEditHappened, redo, getUndoOrRedoPresentationName, canUndoOrRedo, discardAllEdits, getLimit, undoOrRedo, toString, end, isSignificant, isInProgress, getPresentationName, die, replaceEdit, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll |
Methods inherited from class CompoundEdit | |
---|---|
getRedoPresentationName, getUndoPresentationName, isSignificant, isInProgress, addEdit, canRedo, canUndo, undo, getPresentationName, die, redo, toString, end, replaceEdit, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll |
Constructor Detail |
---|
public 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)
Copyright © 2003-2013 The Codehaus. All rights reserved.