public class DefaultListModel extends javax.swing.AbstractListModel implements ListModel
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(java.lang.Object o)
Appends the specified element to the end of this Vector
|
java.lang.Object |
getElementAt(int arg0) |
java.util.Vector |
getObjects()
Obtains the objects that are in the model
|
int |
getSize() |
void |
insertAt(int i,
java.lang.Object o)
Inserts the specified element at the specified position in this Vector.
|
java.lang.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
public DefaultListModel(boolean down)
public java.lang.Object remove(int i) throws java.lang.ArrayIndexOutOfBoundsException
ListModel
i
- Índice del elemento que se quiere eliminarjava.lang.ArrayIndexOutOfBoundsException
- Si el índice está fuera del arrayListModel.remove(int)
public void insertAt(int i, java.lang.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 javax.swing.ListModel
ListModel.getSize()
public java.lang.Object getElementAt(int arg0)
getElementAt
in interface javax.swing.ListModel
ListModel.getElementAt(int)
public void add(java.lang.Object o)
ListModel
o
- element to be appended to this VectorListModel.add(java.lang.Object)
public java.util.Vector getObjects()
ListModel
ListModel.getObjects()