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
editsFields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddEdit(UndoableEdit pEdit) voidaddTreeModelListener(TreeModelListener pListener) voidaddUndoOrRedoListener(UndoOrRedoListener pListener) static SortedMapdecompose(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.voidvoidintgetChildCount(Object pParent) getEdits()intgetIndex()Current location in edit vector.intgetIndexOfChild(Object pParent, Object pChild) getRoot()booleanIf false, addEdit will have no effect and will return false.booleanvoidredo()voidvoidremoveTreeModelListener(TreeModelListener pListener) voidremoveUndoOrRedoListener(UndoOrRedoListener pListener) voidsetAcceptingEdits(boolean pAcceptingEdits) toString()voidundo()voidvalueForPathChanged(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, undoToMethods inherited from class javax.swing.undo.CompoundEdit
die, getPresentationName, isInProgress, isSignificant, lastEditMethods inherited from class javax.swing.undo.AbstractUndoableEdit
replaceEditMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
getEditsin interfaceExposedCompoundEdit
-
getIndex
public int getIndex()Current location in edit vector.- See Also:
-
UndoManager.indexOfNextAdd
-
addEdit
- Specified by:
addEditin interfaceUndoableEdit- Overrides:
addEditin classUndoManager
-
editToBeUndone
Make method public.- Overrides:
editToBeUndonein classUndoManager
-
editToBeRedone
Make method public.- Overrides:
editToBeRedonein classUndoManager
-
undo
public void undo()- Specified by:
undoin interfaceUndoableEdit- Overrides:
undoin classUndoManager
-
redo
public void redo()- Specified by:
redoin interfaceUndoableEdit- Overrides:
redoin 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:
toStringin classUndoManager
-
getRoot
-
getChild
-
getChildCount
- Specified by:
getChildCountin interfaceTreeModel
-
isLeaf
-
valueForPathChanged
- Specified by:
valueForPathChangedin interfaceTreeModel
-
getIndexOfChild
- Specified by:
getIndexOfChildin interfaceTreeModel
-
addTreeModelListener
- Specified by:
addTreeModelListenerin interfaceTreeModel
-
removeTreeModelListener
- Specified by:
removeTreeModelListenerin interfaceTreeModel
-
fireTreeStructureChanged
public void fireTreeStructureChanged() -
fireTreeNodesInserted
public void fireTreeNodesInserted()
-