Package jsyntaxpane
Class CompoundUndoMan
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CompoundEdit
javax.swing.undo.UndoManager
jsyntaxpane.CompoundUndoMan
- All Implemented Interfaces:
Serializable,EventListener,UndoableEditListener,UndoableEdit
A revised UndoManager that groups undos based on positions. If the change is relatively next to the
previous change, like when continuous typing, then the undoes are grouped together.
This is cutomized from the
http://www.camick.com/java/source/CompoundUndoMan.java
from the blog:
http://tips4java.wordpress.com/2008/10/27/compound-undo-manager/
- See Also:
-
Field Summary
Fields inherited from class javax.swing.undo.CompoundEdit
editsFields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidStart to combine the next operations together.voidWhenever an UndoableEdit happens the edit will either be absorbed by the current compound edit or a new compound edit will be startedMethods inherited from class javax.swing.undo.UndoManager
addEdit, canRedo, canUndo, canUndoOrRedo, discardAllEdits, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redo, redoTo, setLimit, toString, trimEdits, trimForLimit, undo, undoOrRedo, undoToMethods inherited from class javax.swing.undo.CompoundEdit
die, getPresentationName, isInProgress, isSignificant, lastEditMethods inherited from class javax.swing.undo.AbstractUndoableEdit
replaceEdit
-
Constructor Details
-
CompoundUndoMan
-
-
Method Details
-
undoableEditHappened
Whenever an UndoableEdit happens the edit will either be absorbed by the current compound edit or a new compound edit will be started- Specified by:
undoableEditHappenedin interfaceUndoableEditListener- Overrides:
undoableEditHappenedin classUndoManager
-
startCombine
public void startCombine()Start to combine the next operations together. Only the next operation is combined. The flag is then automatically reset.
-