java.lang.Object
javax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CompoundEdit
javax.swing.undo.UndoManager
com.iamsoft.util.ui.undo.JshiftUndoManager
- All Implemented Interfaces:
ExposedCompoundEdit
,Serializable
,EventListener
,UndoableEditListener
,TreeModel
,UndoableEdit
Adds support for UndoListeners and makes a couple methods public.
- 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 TypeMethodDescriptionboolean
addEdit
(UndoableEdit pEdit) void
addTreeModelListener
(TreeModelListener pListener) void
addUndoOrRedoListener
(UndoOrRedoListener pListener) static SortedMap
decompose
(ExposedCompoundEdit pCompoundEdit) Get a map where the key is an UndoableEdit and the value is another SortedMap with an entry for each sub-edit.Make method public.Make method public.void
void
int
getChildCount
(Object pParent) getEdits()
int
getIndex()
Current location in edit vector.int
getIndexOfChild
(Object pParent, Object pChild) getRoot()
boolean
If false, addEdit will have no effect and will return false.boolean
void
redo()
void
void
removeTreeModelListener
(TreeModelListener pListener) void
removeUndoOrRedoListener
(UndoOrRedoListener pListener) void
setAcceptingEdits
(boolean pAcceptingEdits) toString()
void
undo()
void
valueForPathChanged
(TreePath pPath, Object pNewValue) Methods inherited from class javax.swing.undo.UndoManager
canRedo, canUndo, canUndoOrRedo, discardAllEdits, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redoTo, setLimit, trimEdits, trimForLimit, undoableEditHappened, undoOrRedo, undoTo
Methods inherited from class javax.swing.undo.CompoundEdit
die, getPresentationName, isInProgress, isSignificant, lastEdit
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
replaceEdit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.swing.undo.UndoableEdit
canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit
-
Constructor Details
-
JshiftUndoManager
public JshiftUndoManager()
-
-
Method Details
-
isAcceptingEdits
public boolean isAcceptingEdits()If false, addEdit will have no effect and will return false. -
setAcceptingEdits
public void setAcceptingEdits(boolean pAcceptingEdits) - See Also:
-
getEdits
- Specified by:
getEdits
in interfaceExposedCompoundEdit
-
getIndex
public int getIndex()Current location in edit vector.- See Also:
-
UndoManager.indexOfNextAdd
-
addEdit
- Specified by:
addEdit
in interfaceUndoableEdit
- Overrides:
addEdit
in classUndoManager
-
editToBeUndone
Make method public.- Overrides:
editToBeUndone
in classUndoManager
-
editToBeRedone
Make method public.- Overrides:
editToBeRedone
in classUndoManager
-
undo
public void undo()- Specified by:
undo
in interfaceUndoableEdit
- Overrides:
undo
in classUndoManager
-
redo
public void redo()- Specified by:
redo
in interfaceUndoableEdit
- Overrides:
redo
in classUndoManager
-
addUndoOrRedoListener
-
removeUndoOrRedoListener
-
decompose
Get a map where the key is an UndoableEdit and the value is another SortedMap with an entry for each sub-edit. -
refreshDecomposition
public void refreshDecomposition() -
toString
- Overrides:
toString
in classUndoManager
-
getRoot
-
getChild
-
getChildCount
- Specified by:
getChildCount
in interfaceTreeModel
-
isLeaf
-
valueForPathChanged
- Specified by:
valueForPathChanged
in interfaceTreeModel
-
getIndexOfChild
- Specified by:
getIndexOfChild
in interfaceTreeModel
-
addTreeModelListener
- Specified by:
addTreeModelListener
in interfaceTreeModel
-
removeTreeModelListener
- Specified by:
removeTreeModelListener
in interfaceTreeModel
-
fireTreeStructureChanged
public void fireTreeStructureChanged() -
fireTreeNodesInserted
public void fireTreeNodesInserted()
-