charvax.swing
Interface ListModel
- ComboBoxModel, MutableComboBoxModel
- AbstractListModel, DefaultComboBoxModel, DefaultListModel
public interface ListModel
This interface defines the methods by which components such as JList
get the value of each cell in a list, and the length of the list.
Conceptually, the model is a Vector; indices vary from 0 to
getSize() - 1
.
addListDataListener
public void addListDataListener(ListDataListener l)
Register an object that will be notified when the list contents
change.
getElementAt
public Object getElementAt(int index)
Returns the value at the specified index.
getSize
public int getSize()
Returns the length of the list.
removeListDataListener
public void removeListDataListener(ListDataListener l)
Remove the specified ListDataListener.