java.lang.Object
org.autogui.swing.util.KeyUndoManager
- All Implemented Interfaces:
FocusListener,KeyListener,EventListener,UndoableEditListener
public class KeyUndoManager
extends Object
implements KeyListener, UndoableEditListener, FocusListener
the class provides Undo and Redo actions for text panes.
usage:
KeyUndoManager km = new KeyUndoManager();
km.putListenersAndActionsTo(editorPane);
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classa composition of undoable-editsstatic classthe action for undo or redo -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected KeyUndoManager.DynamicCompoundEditprotected KeyUndoManager.UndoActionprotected KeyUndoManager.UndoActionprotected UndoManagerprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidbooleanvoidvoidvoidvoidvoidvoidvoid
-
Field Details
-
undoManager
-
edits
-
whileKeyTyping
protected boolean whileKeyTyping -
undoAction
-
redoAction
-
-
Constructor Details
-
KeyUndoManager
public KeyUndoManager() -
KeyUndoManager
-
-
Method Details
-
getUndoManager
-
getUndoAction
-
getRedoAction
-
putListenersAndActionsTo
-
addListenersTo
-
updateDocument
-
putUndoActionsTo
-
keyTyped
- Specified by:
keyTypedin interfaceKeyListener
-
keyPressed
- Specified by:
keyPressedin interfaceKeyListener
-
isRegularKeyType
-
keyReleased
- Specified by:
keyReleasedin interfaceKeyListener
-
undoableEditHappened
- Specified by:
undoableEditHappenedin interfaceUndoableEditListener
-
checkEnabled
public void checkEnabled() -
focusGained
- Specified by:
focusGainedin interfaceFocusListener
-
focusLost
- Specified by:
focusLostin interfaceFocusListener
-