java.lang.Object
javax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CompoundEdit
javax.swing.undo.UndoManager
com.iamsoft.util.ui.undo.IamsoftUndoManager
- All Implemented Interfaces:
Serializable,EventListener,UndoableEditListener,ListModel<UndoableEdit>,UndoableEdit
List model implementation of undo manager.
TODO: merge with JshiftUndoManager.
- 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) voidaddListDataListener(ListDataListener pListener) Expand visibility.Expand visibility.voidCall after closing a new compound edit.getDateForEdit(UndoableEdit pEdit) getElementAt(int pIdx) intgetIndex()Current location in edit vector.intgetSize()booleanIf false, addEdit will have no effect and will return false.voidredo()voidredoTo(UndoableEdit pEdit) TODO: why?voidremoveListDataListener(ListDataListener pListener) voidsetAcceptingEdits(boolean pAcceptingEdits) voidundo()voidundoTo(UndoableEdit pEdit) TODO: Why?Methods inherited from class javax.swing.undo.UndoManager
canRedo, canUndo, canUndoOrRedo, discardAllEdits, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, setLimit, toString, trimEdits, trimForLimit, undoableEditHappened, undoOrRedoMethods inherited from class javax.swing.undo.CompoundEdit
die, getPresentationName, isInProgress, isSignificant, lastEditMethods inherited from class javax.swing.undo.AbstractUndoableEdit
replaceEdit
-
Constructor Details
-
IamsoftUndoManager
public IamsoftUndoManager()
-
-
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:
-
getIndex
public int getIndex()Current location in edit vector. -
addEdit
- Specified by:
addEditin interfaceUndoableEdit- Overrides:
addEditin classUndoManager
-
getDateForEdit
-
editToBeUndone
Expand visibility.- Overrides:
editToBeUndonein classUndoManager
-
editToBeRedone
Expand visibility.- Overrides:
editToBeRedonein classUndoManager
-
undo
public void undo()- Specified by:
undoin interfaceUndoableEdit- Overrides:
undoin classUndoManager
-
undoTo
TODO: Why?- Overrides:
undoToin classUndoManager
-
redo
public void redo()- Specified by:
redoin interfaceUndoableEdit- Overrides:
redoin classUndoManager
-
redoTo
TODO: why?- Overrides:
redoToin classUndoManager
-
getElementAt
- Specified by:
getElementAtin interfaceListModel<UndoableEdit>
-
getSize
public int getSize()- Specified by:
getSizein interfaceListModel<UndoableEdit>
-
addListDataListener
- Specified by:
addListDataListenerin interfaceListModel<UndoableEdit>
-
removeListDataListener
- Specified by:
removeListDataListenerin interfaceListModel<UndoableEdit>
-
fireLastEditChanged
public void fireLastEditChanged()Call after closing a new compound edit.
-