T - the type of elements in the list.
public abstract class ListComboBoxModel<T> extends Objectimplements ComboBoxModel <ElementWrapper <T>>
| Constructor and Description |
|---|
ListComboBoxModel(List
Create a new ComboBoxModel backed by the given list of items.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListDataListener(ListDataListener
|
ElementWrapper |
getElementAt(int index)
|
T |
getSelectedElement()
|
Object |
getSelectedItem()
|
int |
getSize()
|
void |
removeListDataListener(ListDataListener
|
void |
setSelectedItem(Object
|
abstract String |
toString(T element)
This method defines the appearance of the elements.
|
public abstract StringtoString(T element)
element - the element displayed
public int getSize()
public ElementWrapper<T> getElementAt(int index)
public void addListDataListener(ListDataListenerl)
public void removeListDataListener(ListDataListenerl)
public void setSelectedItem(ObjectanItem)
public ObjectgetSelectedItem()
public T getSelectedElement()