- 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 boolean
canRedo()
boolean
canUndo()
Date
getDateForEdit(UndoableEdit pEdit)
UndoableEdit
getElementAt(int pIdx)
int
getIndex()
Index of next edit.String
getRedoPresentationName()
int
getSize()
protected ListModel<? extends IamsoftUndoManager>
getUndoMgrListModel()
String
getUndoPresentationName()
void
redo()
void
redoTo(UndoableEdit pEdit)
void
undo()
void
undoTo(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()
-
-