T
- The type of the elements of this model.public class EnhancedListModel<T> extends DefaultListModel<T> implements ReorderableListModel<T>
Modifier and Type | Class and Description |
---|---|
static class |
EnhancedListModel.Direction
Enum for indicating direction of movement of items in list.
|
listenerList
Constructor and Description |
---|
EnhancedListModel() |
EnhancedListModel(Collection<? extends T> pContents) |
Modifier and Type | Method and Description |
---|---|
void |
addAll(Collection<? extends T> pObjects)
Add all elements in a collection.
|
void |
fireContentsChanged(Object pSrc,
int pIdx0,
int pIdx1)
TODO: Protect method.
|
protected void |
fireIntervalAdded(Object pSrc,
int pIdx0,
int pIdx1) |
protected void |
fireIntervalRemoved(Object pSrc,
int pIdx0,
int pIdx1) |
int[] |
getIndices(Collection<?> pColl)
Any elements not present in list marked with -1.
|
void |
insertAll(Collection<? extends T> pObjects,
int pIdx)
Inserts all elements in a collection.
|
protected boolean |
isEventFiringEnabled()
ListModelEvents are fired if this is true.
|
void |
move(Object pObject,
EnhancedListModel.Direction pDir)
Move specified object up or down.
|
void |
moveAll(Collection<?> pObjects,
EnhancedListModel.Direction pDir)
Move specified objects up or down.
|
void |
moveAll(int[] pIndices,
EnhancedListModel.Direction pDir)
Shifts elements at specified locations in specified direction.
|
boolean |
removeAll(Collection<?> pColl)
Remove all elements in a collection.
|
void |
removeAll(int[] pIndices)
Remove specified indices.
|
protected void |
setEventFiringEnabled(boolean pEventFiringEnabled) |
Object[] |
toArray(Object[] pType) |
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 EnhancedListModel()
public EnhancedListModel(Collection<? extends T> pContents)
protected boolean isEventFiringEnabled()
protected void setEventFiringEnabled(boolean pEventFiringEnabled)
isEventFiringEnabled()
public void moveAll(int[] pIndices, EnhancedListModel.Direction pDir)
moveAll
in interface Reorderable
public void moveAll(Collection<?> pObjects, EnhancedListModel.Direction pDir)
public void move(Object pObject, EnhancedListModel.Direction pDir)
public int[] getIndices(Collection<?> pColl)
public void addAll(Collection<? extends T> pObjects)
public void insertAll(Collection<? extends T> pObjects, int pIdx)
public void removeAll(int[] pIndices)
public boolean removeAll(Collection<?> pColl)
public void fireContentsChanged(Object pSrc, int pIdx0, int pIdx1)
fireContentsChanged
in class AbstractListModel<T>
protected void fireIntervalAdded(Object pSrc, int pIdx0, int pIdx1)
fireIntervalAdded
in class AbstractListModel<T>
protected void fireIntervalRemoved(Object pSrc, int pIdx0, int pIdx1)
fireIntervalRemoved
in class AbstractListModel<T>
Copyright © 2023. All rights reserved.