lapisx.swing
Class CoalescingUndo
java.lang.Object
lapisx.swing.CoalescingUndo
- public abstract class CoalescingUndo
- extends Object
This class coalesces multiple typed keystrokes into a single undoable event.
To use it, just replace your undo event listener attachment call
document.addUndoableEditListener (undoManager) with a call to
CoalescingUndo.addUndoableEditListener (document, undoManager).
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
installed
protected static boolean installed
UNDO_LISTENER
protected static final String UNDO_LISTENER
- See Also:
- Constant Field Values
CoalescingUndo
public CoalescingUndo()
setUndoableEditListener
public static void setUndoableEditListener(Document doc,
UndoableEditListener undo)
- Attaches an undo listener to a document in such a way that
multiple typed keystrokes are coalesced into a single undoable edit.
Only one undo listener may be attached to a document with this call.
- Parameters:
doc
- Document generating the edit eventsundo
- Listener receiving the edit events, usually an instance of UndoManager
getUndoableEditListener
public static UndoableEditListener getUndoableEditListener(Document doc)
install
protected static void install()