public class DefaultListModel extends AbstractListModel implements ListModel
listenerList| Constructor and Description |
|---|
DefaultListModel(boolean down)
Crea un nuevo DefaultListModel con un parámetro que indica si la lista
se crea en el orden que se van introcuciendo(true) o al contrario.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Object o)
Appends the specified element to the end of this Vector
|
Object |
getElementAt(int arg0) |
Vector |
getObjects()
Obtains the objects that are in the model
|
int |
getSize() |
void |
insertAt(int i,
Object o)
Inserts the specified element at the specified position in this Vector.
|
Object |
remove(int i)
Removes the element at the specified position in this Vector. shifts any
subsequent elements to the left (subtracts one from their indices).
|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListDataListener, removeListDataListenerpublic DefaultListModel(boolean down)
public Object remove(int i) throws ArrayIndexOutOfBoundsException
ListModeli - Índice del elemento que se quiere eliminarArrayIndexOutOfBoundsException - Si el índice está fuera del arrayListModel.remove(int)public void insertAt(int i,
Object o)
ListModeli - index at which the specified element is to be inserted.o - element to be inserted.ListModel.insertAt(int,
java.lang.Object)public int getSize()
getSize in interface ListModelListModel.getSize()public Object getElementAt(int arg0)
getElementAt in interface ListModelListModel.getElementAt(int)public void add(Object o)
ListModelo - element to be appended to this VectorListModel.add(java.lang.Object)public Vector getObjects()
ListModelListModel.getObjects()