|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CompoundEdit
javax.swing.undo.UndoManager
com.wordpress.tipsforjava.swing.CompoundUndoManager
public class CompoundUndoManager extends UndoManager
This class will merge individual edits into a single larger edit. That is, characters entered sequentially will be grouped together and undone as a group. Any attribute changes will be considered as part of the group and will therefore be undone when the group is undone.
| Nested Class Summary | |
|---|---|
class |
CompoundUndoManager.MyCompoundEdit
|
class |
CompoundUndoManager.RedoAction
|
class |
CompoundUndoManager.UndoAction
|
| Field Summary | |
|---|---|
private CompoundEdit |
compoundEdit
|
private int |
lastLength
|
private int |
lastOffset
|
private CompoundUndoManager.RedoAction |
redoAction
|
private JTextComponent |
textComponent
|
private CompoundUndoManager.UndoAction |
undoAction
|
private UndoManager |
undoManager
|
| Constructor Summary | |
CompoundUndoManager(JTextComponent textComponent)
|
|
| Method Summary | |
|---|---|
void
|
changedUpdate(DocumentEvent e)
|
Action
|
getRedoAction()
|
Action
|
getUndoAction()
|
void
|
insertUpdate(DocumentEvent e)
|
void
|
redo()
|
void
|
removeUpdate(DocumentEvent e)
|
private CompoundEdit
|
startCompoundEdit(UndoableEdit anEdit)
|
void
|
undo()
|
void
|
undoableEditHappened(UndoableEditEvent e)
|
| Methods inherited from class UndoManager | |
|---|---|
| toString, end, getLimit, discardAllEdits, setLimit, undoOrRedo, canUndoOrRedo, undo, canUndo, redo, canRedo, addEdit, getUndoOrRedoPresentationName, getUndoPresentationName, getRedoPresentationName, undoableEditHappened, die, isSignificant, isInProgress, getPresentationName, replaceEdit, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll |
| Methods inherited from class CompoundEdit | |
|---|---|
| toString, end, undo, canUndo, redo, canRedo, addEdit, getUndoPresentationName, getRedoPresentationName, die, isSignificant, isInProgress, getPresentationName, replaceEdit, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll |
| Field Detail |
|---|
private CompoundEdit compoundEdit
private int lastLength
private int lastOffset
private CompoundUndoManager.RedoAction redoAction
private JTextComponent textComponent
private CompoundUndoManager.UndoAction undoAction
private UndoManager undoManager
| Constructor Detail |
|---|
public CompoundUndoManager(JTextComponent textComponent)
| Method Detail |
|---|
public void changedUpdate(DocumentEvent e)
public Action getRedoAction()
public Action getUndoAction()
public void insertUpdate(DocumentEvent e)
public void redo()
public void removeUpdate(DocumentEvent e)
private CompoundEdit startCompoundEdit(UndoableEdit anEdit)
public void undo()
public void undoableEditHappened(UndoableEditEvent e)
Groovy Documentation