|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractListModel
org.jdesktop.swingx.combobox.ListComboBoxModel<E>
E
- the type of elements maintained by the list backing this modelpublic class ListComboBoxModel<E>
A ComboBoxModel
for List
s.
Field Summary | |
---|---|
static java.lang.String |
UPDATE
A key used to notify the model that the backing List has changed. |
Constructor Summary | |
---|---|
ListComboBoxModel(java.util.List<E> list)
Creates a ListComboBoxModel backed by the supplied list . |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
|
E |
getElementAt(int index)
|
E |
getSelectedItem()
|
int |
getSize()
|
void |
setSelectedItem(java.lang.Object item)
Set the selected item. |
Methods inherited from class javax.swing.AbstractListModel |
---|
addListDataListener, getListDataListeners, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.ListModel |
---|
addListDataListener, removeListDataListener |
Field Detail |
---|
public static final java.lang.String UPDATE
List
has changed.
Constructor Detail |
---|
public ListComboBoxModel(java.util.List<E> list)
ListComboBoxModel
backed by the supplied list
.
list
- the list backing this model
java.lang.NullPointerException
- if list
is null
Method Detail |
---|
public void setSelectedItem(java.lang.Object item)
ListDataListener
s that the contents have changed.
setSelectedItem
in interface javax.swing.ComboBoxModel
item
- the list object to select or null
to clear the
selection
java.lang.ClassCastException
- if item
is not of type E
public E getSelectedItem()
getSelectedItem
in interface javax.swing.ComboBoxModel
public E getElementAt(int index)
getElementAt
in interface javax.swing.ListModel
public int getSize()
getSize
in interface javax.swing.ListModel
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed
in interface java.awt.event.ActionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |