public class UndoableListModel extends EnhancedListModel
Modifier and Type | Class and Description |
---|---|
static class |
UndoableListModel.UndoOrRedo
Enum describing whether action is being undone or redone.
|
EnhancedListModel.Direction
listenerList
Constructor and Description |
---|
UndoableListModel() |
UndoableListModel(Collection<?> pColl) |
Modifier and Type | Method and Description |
---|---|
void |
fireContentsChanged(Object pSrc,
int pIdx0,
int pIdx1)
TODO: Protect this method.
|
protected void |
fireIntervalAdded(Object pSrc,
int pIdx0,
int pIdx1) |
protected void |
fireIntervalRemoved(Object pSrc,
int pIdx0,
int pIdx1) |
Object[] |
getDelta()
Deprecated.
Needed for CCU.
|
int |
getIndex()
Where in history is the list.
|
UndoableEdit |
getNextRedo()
The last edit that was undone or null if no such edit exists.
|
UndoableEdit |
getNextUndo()
The last edit that was (re)done or null if no such edit exists.
|
static void |
main(String[] pArgs)
Create an UndoableListModel, add some items and perform a few undos and redos.
|
addAll, getIndices, insertAll, isEventFiringEnabled, move, moveAll, moveAll, removeAll, removeAll, setEventFiringEnabled, toArray
add, addElement, capacity, clear, contains, copyInto, elementAt, elements, ensureCapacity, firstElement, get, getElementAt, getSize, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, removeAllElements, removeElement, removeElementAt, removeRange, set, setElementAt, setSize, size, toArray, toString, trimToSize
addListDataListener, getListDataListeners, getListeners, removeListDataListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListDataListener, getElementAt, getSize, removeListDataListener
public UndoableListModel()
public UndoableListModel(Collection<?> pColl)
public int getIndex()
@Deprecated public Object[] getDelta()
public UndoableEdit getNextUndo()
public UndoableEdit getNextRedo()
public void fireContentsChanged(Object pSrc, int pIdx0, int pIdx1)
fireContentsChanged
in class EnhancedListModel
protected void fireIntervalAdded(Object pSrc, int pIdx0, int pIdx1)
fireIntervalAdded
in class EnhancedListModel
protected void fireIntervalRemoved(Object pSrc, int pIdx0, int pIdx1)
fireIntervalRemoved
in class EnhancedListModel
public static void main(String[] pArgs)
Copyright © 2023. All rights reserved.