- java.lang.Object
-
- javax.swing.AbstractListModel<UndoableEdit>
-
- com.iamsoft.util.ui.undo.HistoryListModel
-
- All Implemented Interfaces:
Serializable,ListModel<UndoableEdit>
public class HistoryListModel extends AbstractListModel<UndoableEdit>
Displays undo history for undo manager at front of a list model.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.AbstractListModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description HistoryListModel(IamsoftUndoManager pUndoMgr)HistoryListModel(ListModel<? extends IamsoftUndoManager> pUndoMgrListModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanRedo()booleancanUndo()DategetDateForEdit(UndoableEdit pEdit)UndoableEditgetElementAt(int pIdx)intgetIndex()Index of next edit.StringgetRedoPresentationName()intgetSize()protected ListModel<? extends IamsoftUndoManager>getUndoMgrListModel()StringgetUndoPresentationName()voidredo()voidredoTo(UndoableEdit pEdit)voidundo()voidundoTo(UndoableEdit pEdit)-
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
-
-
-
Constructor Detail
-
HistoryListModel
public HistoryListModel(IamsoftUndoManager pUndoMgr)
-
HistoryListModel
public HistoryListModel(ListModel<? extends IamsoftUndoManager> pUndoMgrListModel)
- Parameters:
pUndoMgrListModel- List model for a group of undo managers.
-
-
Method Detail
-
getUndoMgrListModel
protected ListModel<? extends IamsoftUndoManager> getUndoMgrListModel()
-
getElementAt
public UndoableEdit getElementAt(int pIdx)
-
getDateForEdit
public Date getDateForEdit(UndoableEdit pEdit)
-
getSize
public int getSize()
-
getIndex
public int getIndex()
Index of next edit.
-
canRedo
public boolean canRedo()
-
canUndo
public boolean canUndo()
-
redo
public void redo()
-
redoTo
public void redoTo(UndoableEdit pEdit)
-
undo
public void undo()
-
undoTo
public void undoTo(UndoableEdit pEdit)
-
getUndoPresentationName
public String getUndoPresentationName()
-
getRedoPresentationName
public String getRedoPresentationName()
-
-