|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.combobox.ListComboBoxModel
public class ListComboBoxModel
Field Summary | |
---|---|
protected List |
data
|
protected List |
listeners
|
protected Object |
selected
|
Constructor Summary | |
---|---|
ListComboBoxModel(List list)
|
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent evt)
Invoked when an action occurs. |
void |
addListDataListener(ListDataListener l)
Adds a listener to the list that's notified each time a change to the data model occurs. |
void |
fireUpdate()
|
Object |
getElementAt(int index)
Returns the value at the specified index. |
Object |
getSelectedItem()
Returns the selected item |
int |
getSize()
Returns the length of the list. |
void |
removeListDataListener(ListDataListener l)
Removes a listener from the list that's notified each time a change to the data model occurs. |
void |
setSelectedItem(Object item)
Set the selected item. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected List data
protected Object selected
protected List listeners
Constructor Detail |
---|
public ListComboBoxModel(List list)
Method Detail |
---|
public void setSelectedItem(Object item)
javax.swing.ComboBoxModel
ListDataListener
s that the contents
have changed.
setSelectedItem
in interface ComboBoxModel
item
- the list object to select or null
to clear the selectionpublic Object getSelectedItem()
javax.swing.ComboBoxModel
getSelectedItem
in interface ComboBoxModel
null
if there is no selectionpublic Object getElementAt(int index)
javax.swing.ListModel
getElementAt
in interface ListModel
index
- the requested index
index
public int getSize()
javax.swing.ListModel
getSize
in interface ListModel
public void addListDataListener(ListDataListener l)
javax.swing.ListModel
addListDataListener
in interface ListModel
l
- the ListDataListener
to be addedpublic void removeListDataListener(ListDataListener l)
javax.swing.ListModel
removeListDataListener
in interface ListModel
l
- the ListDataListener
to be removedpublic void actionPerformed(ActionEvent evt)
java.awt.event.ActionListener
actionPerformed
in interface ActionListener
public void fireUpdate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |