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
edits
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Start to combine the next operations together.void
Whenever 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, undoTo
Methods inherited from class javax.swing.undo.CompoundEdit
die, getPresentationName, isInProgress, isSignificant, lastEdit
Methods 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:
undoableEditHappened
in interfaceUndoableEditListener
- Overrides:
undoableEditHappened
in classUndoManager
-
startCombine
public void startCombine()Start to combine the next operations together. Only the next operation is combined. The flag is then automatically reset.
-