- 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
public class IamsoftUndoManager extends UndoManager implements ListModel<UndoableEdit>
List model implementation of undo manager. TODO: merge with JshiftUndoManager.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.undo.CompoundEdit
edits
-
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
-
-
Constructor Summary
Constructors Constructor Description IamsoftUndoManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddEdit(UndoableEdit pEdit)voidaddListDataListener(ListDataListener pListener)UndoableEditeditToBeRedone()Expand visibility.UndoableEditeditToBeUndone()Expand visibility.voidfireLastEditChanged()Call after closing a new compound edit.DategetDateForEdit(UndoableEdit pEdit)UndoableEditgetElementAt(int pIdx)intgetIndex()Current location in edit vector.intgetSize()booleanisAcceptingEdits()If 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, undoOrRedo
-
Methods inherited from class javax.swing.undo.CompoundEdit
die, getPresentationName, isInProgress, isSignificant, lastEdit
-
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
replaceEdit
-
-
-
-
Method Detail
-
isAcceptingEdits
public boolean isAcceptingEdits()
If false, addEdit will have no effect and will return false.
-
setAcceptingEdits
public void setAcceptingEdits(boolean pAcceptingEdits)
- See Also:
isAcceptingEdits()
-
getIndex
public int getIndex()
Current location in edit vector.
-
addEdit
public boolean addEdit(UndoableEdit pEdit)
- Specified by:
addEditin interfaceUndoableEdit- Overrides:
addEditin classUndoManager
-
getDateForEdit
public Date getDateForEdit(UndoableEdit pEdit)
-
editToBeUndone
public UndoableEdit editToBeUndone()
Expand visibility.- Overrides:
editToBeUndonein classUndoManager
-
editToBeRedone
public UndoableEdit editToBeRedone()
Expand visibility.- Overrides:
editToBeRedonein classUndoManager
-
undo
public void undo()
- Specified by:
undoin interfaceUndoableEdit- Overrides:
undoin classUndoManager
-
undoTo
public void undoTo(UndoableEdit pEdit)
TODO: Why?- Overrides:
undoToin classUndoManager
-
redo
public void redo()
- Specified by:
redoin interfaceUndoableEdit- Overrides:
redoin classUndoManager
-
redoTo
public void redoTo(UndoableEdit pEdit)
TODO: why?- Overrides:
redoToin classUndoManager
-
getElementAt
public UndoableEdit getElementAt(int pIdx)
- Specified by:
getElementAtin interfaceListModel<UndoableEdit>
-
getSize
public int getSize()
- Specified by:
getSizein interfaceListModel<UndoableEdit>
-
addListDataListener
public void addListDataListener(ListDataListener pListener)
- Specified by:
addListDataListenerin interfaceListModel<UndoableEdit>
-
removeListDataListener
public void removeListDataListener(ListDataListener pListener)
- Specified by:
removeListDataListenerin interfaceListModel<UndoableEdit>
-
fireLastEditChanged
public void fireLastEditChanged()
Call after closing a new compound edit.
-
-