charvax.swing
Class DefaultListModel
- ListModel
public class DefaultListModel
This class implements the Vector API. It actually delegates to an ArrayList.
void | add(int index_, Object elem_) - Inserts the specified object at the specified position in this list.
|
void | addElement(Object obj_) - Add the specified object to the end of the list.
|
void | clear() - Clear the contents of the list.
|
boolean | contains(Object elem_) - Returns true if the specified element is in the list.
|
Object | getElementAt(int index_) - Returns the value at the specified index.
|
int | getSize() - Returns the length of the list.
|
int | indexOf(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.
|
DefaultListModel
public DefaultListModel()
Default constructor
add
public void add(int index_,
Object elem_)
Inserts the specified object at the specified position in this list.
addElement
public void addElement(Object obj_)
Add the specified object to the end of the list.
clear
public void clear()
Clear the contents of the list.
contains
public boolean contains(Object elem_)
Returns true if the specified element is in the list.
getElementAt
public Object getElementAt(int index_)
Returns the value at the specified index.
- getElementAt in interface ListModel
getSize
public int getSize()
Returns the length of the list.
- getSize in interface ListModel
indexOf
public int indexOf(Object elem_)
Returns the index of the first occurrence of the specified object.
removeAllElements
public void removeAllElements()
Removes all elements from this list and sets its size to zero.
removeElementAt
public void removeElementAt(int index_)
Deletes the component at the specified index.