- java.lang.Object
-
- com.iamsoft.util.ui.swing.SimpleComboBoxModel<T>
-
- Type Parameters:
T
- the type of the elements of this model
- All Implemented Interfaces:
ComboBoxModel<T>
,ListModel<T>
public class SimpleComboBoxModel<T> extends Object implements ComboBoxModel<T>
A list model which can store a selected object.
-
-
Constructor Summary
Constructors Constructor Description SimpleComboBoxModel(ListModel<? extends T> pListModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListDataListener(ListDataListener pListener)
T
getElementAt(int pIdx)
T
getSelectedItem()
int
getSize()
void
removeListDataListener(ListDataListener pListener)
void
setSelectedItem(Object pSelectedItem)
-
-
-
Method Detail
-
getSelectedItem
public T getSelectedItem()
- Specified by:
getSelectedItem
in interfaceComboBoxModel<T>
-
setSelectedItem
public void setSelectedItem(Object pSelectedItem)
- Specified by:
setSelectedItem
in interfaceComboBoxModel<T>
-
getElementAt
public T getElementAt(int pIdx)
- Specified by:
getElementAt
in interfaceListModel<T>
-
addListDataListener
public void addListDataListener(ListDataListener pListener)
- Specified by:
addListDataListener
in interfaceListModel<T>
-
removeListDataListener
public void removeListDataListener(ListDataListener pListener)
- Specified by:
removeListDataListener
in interfaceListModel<T>
-
-