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, removeListDataListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListDataListener, removeListDataListener
public DefaultListModel(boolean down)
public Object remove(int i) throws ArrayIndexOutOfBoundsException
ListModel
i
- Índice del elemento que se quiere eliminarArrayIndexOutOfBoundsException
- Si el índice está fuera del arrayListModel.remove(int)
public void insertAt(int i, Object o)
ListModel
i
- 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 ListModel
ListModel.getSize()
public Object getElementAt(int arg0)
getElementAt
in interface ListModel
ListModel.getElementAt(int)
public void add(Object o)
ListModel
o
- element to be appended to this VectorListModel.add(java.lang.Object)
public Vector getObjects()
ListModel
ListModel.getObjects()