java.lang.Object
javax.swing.AbstractListModel
ledestin.swing.ListComboBoxModel
- All Implemented Interfaces:
- javax.swing.ComboBoxModel, javax.swing.ListModel, java.io.Serializable
- public class ListComboBoxModel
- extends javax.swing.AbstractListModel
- implements javax.swing.ComboBoxModel
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
data
java.util.List data
selected
java.lang.Object selected
ListComboBoxModel
public ListComboBoxModel(java.util.List data)
getSize
public int getSize()
- Description copied from interface:
javax.swing.ListModel
- Return the number of data elements in the list.
- Specified by:
getSize in interface javax.swing.ListModel
getElementText
protected java.lang.String getElementText(java.lang.Object element)
- This method must be overriden depending on the type of the objects
in the data.
getElementAt
public java.lang.Object getElementAt(int index)
- Description copied from interface:
javax.swing.ListModel
- Retrieves a data element at a specified index.
- Specified by:
getElementAt in interface javax.swing.ListModel
getSelectedItem
public java.lang.Object getSelectedItem()
- Description copied from interface:
javax.swing.ComboBoxModel
- Returns the currently selected item in the combo box.
- Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel
setSelectedItem
public void setSelectedItem(java.lang.Object anItem)
- Description copied from interface:
javax.swing.ComboBoxModel
- Sets the selected item in the combo box. Classes implementing this
interface should fire a javax.swing.event.ListDataEvent to all registered
javax.swing.event.ListDataListeners to indicate that the selection has changed.
- Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel
fireContentsChanged
public void fireContentsChanged()