T - the type of elements
public abstract class AbstractArrayListModel<T> extends AbstractListModel<ElementWrapper <T>>
listenerList| Constructor and Description |
|---|
AbstractArrayListModel()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(T element, int index)
Add the given element to the model.
|
void |
addAll(Collection
Add the given elements to the model
|
ElementWrapper |
getElementAt(int index)
|
T |
getRealElementAt(int index)
Retrieve the real element (not the wrapper element retrieved with getElementAt) for the denoted position.
|
int |
getSize()
|
abstract String |
getValue(T element)
Get a String representation of the denoted element that should be shown within the list.
|
void |
remove(int index)
Remove the element at the denoted index from the model.
|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListenerpublic abstract StringgetValue(T element)
element - an element.
public void add(T element, int index)
element - the element to add.
index - the index where to insert.
public void remove(int index)
index - the index of the element to remove.
public void addAll(Collection<T> insElements, int index)
insElements - the elements to add.
index - the index where to insert.
public int getSize()
public ElementWrapper<T> getElementAt(int index)
public T getRealElementAt(int index)
index - the position.