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 and description |
|---|
TextUndoManager
()Creates a new instance of TextUndoManager. |
| 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) |
| Methods inherited from class | Name |
|---|---|
class UndoManager |
addEdit, canRedo, canUndo, canUndoOrRedo, die, discardAllEdits, end, equals, getClass, getLimit, getPresentationName, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, hashCode, isInProgress, isSignificant, notify, notifyAll, redo, replaceEdit, setLimit, toString, undo, undoOrRedo, undoableEditHappened, wait, wait, wait |
class CompoundEdit |
addEdit, canRedo, canUndo, die, end, equals, getClass, getPresentationName, getRedoPresentationName, getUndoPresentationName, hashCode, isInProgress, isSignificant, notify, notifyAll, redo, replaceEdit, toString, undo, wait, wait, wait |
Copyright © 2003-2019 The Apache Software Foundation. All rights reserved.