Package jsyntaxpane
Class CompoundUndoMan
- java.lang.Object
-
- javax.swing.undo.AbstractUndoableEdit
-
- javax.swing.undo.CompoundEdit
-
- javax.swing.undo.UndoManager
-
- jsyntaxpane.CompoundUndoMan
-
- All Implemented Interfaces:
java.io.Serializable,java.util.EventListener,javax.swing.event.UndoableEditListener,javax.swing.undo.UndoableEdit
public class CompoundUndoMan extends javax.swing.undo.UndoManagerA 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CompoundUndoMan(SyntaxDocument doc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidstartCombine()Start to combine the next operations together.voidundoableEditHappened(javax.swing.event.UndoableEditEvent e)Whenever an UndoableEdit happens the edit will either be absorbed by the current compound edit or a new compound edit will be started-
Methods 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
-
-
-
-
Constructor Detail
-
CompoundUndoMan
public CompoundUndoMan(SyntaxDocument doc)
-
-
Method Detail
-
undoableEditHappened
public void undoableEditHappened(javax.swing.event.UndoableEditEvent e)
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 interfacejavax.swing.event.UndoableEditListener- Overrides:
undoableEditHappenedin classjavax.swing.undo.UndoManager
-
startCombine
public void startCombine()
Start to combine the next operations together. Only the next operation is combined. The flag is then automatically reset.
-
-