charvax.swing
public class DefaultListModel extends AbstractListModel implements ListModel
_listeners
Constructor and Description |
---|
DefaultListModel()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index_,
java.lang.Object elem_)
Inserts the specified object at the specified position in this list.
|
void |
addElement(java.lang.Object obj_)
Add the specified object to the end of the list.
|
void |
clear()
Clear the contents of the list.
|
boolean |
contains(java.lang.Object elem_)
Returns true if the specified element is in the list.
|
java.lang.Object |
getElementAt(int index_)
Returns the value at the specified index.
|
int |
getSize()
Returns the length of the list.
|
int |
indexOf(java.lang.Object elem_)
Returns the index of the first occurrence of the specified object.
|
void |
removeAllElements()
Removes all elements from this list and sets its size to zero.
|
void |
removeElementAt(int index_)
Deletes the component at the specified index.
|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, removeListDataListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListDataListener, removeListDataListener
public java.lang.Object getElementAt(int index_)
getElementAt
in interface ListModel
public int getSize()
public void clear()
public boolean contains(java.lang.Object elem_)
public void add(int index_, java.lang.Object elem_)
public void addElement(java.lang.Object obj_)
public void removeElementAt(int index_)
public void removeAllElements()
public int indexOf(java.lang.Object elem_)