charvax.swing
Interface ListModel

All Known Subinterfaces:
ComboBoxModel, MutableComboBoxModel
All Known Implementing Classes:
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.


Method Summary
 void addListDataListener(ListDataListener l)
          Register an object that will be notified when the list contents change.
 java.lang.Object getElementAt(int index)
          Returns the value at the specified index.
 int getSize()
          Returns the length of the list.
 void removeListDataListener(ListDataListener l)
          Remove the specified ListDataListener.
 

Method Detail

addListDataListener

void addListDataListener(ListDataListener l)
Register an object that will be notified when the list contents change.


getElementAt

java.lang.Object getElementAt(int index)
Returns the value at the specified index.


getSize

int getSize()
Returns the length of the list.


removeListDataListener

void removeListDataListener(ListDataListener l)
Remove the specified ListDataListener.