T - the generic type of the Modelpublic abstract class AbstractComboBoxModel<T> extends AbstractListModel<T> implements ComboBoxModel<T>, ActionListener
AbstractComboBoxModel contains the data for a combo list and the
current selected item.| Modifier and Type | Field and Description |
|---|---|
protected List<T> |
comboList
The generic combo list.
|
protected T |
selectedItem
The the current selected item.
|
listenerList| Constructor and Description |
|---|
AbstractComboBoxModel()
Instantiates a new
AbstractComboBoxModel with a new list. |
AbstractComboBoxModel(List<T> comboList)
Instantiates a new
AbstractComboBoxModel from the given list. |
AbstractComboBoxModel(List<T> comboList,
T selectedItem)
Instantiates a new
AbstractComboBoxModel from the given arguments. |
AbstractComboBoxModel(Set<T> set)
Instantiates a new
AbstractComboBoxModel from the given Set. |
AbstractComboBoxModel(Set<T> set,
T selectedItem)
Instantiates a new
AbstractComboBoxModel from the given Set. |
AbstractComboBoxModel(T[] comboArray)
Instantiates a new
AbstractComboBoxModel from the given array. |
AbstractComboBoxModel(T[] comboArray,
T selectedItem)
Instantiates a new
AbstractComboBoxModel from the given arguments. |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent evt) |
T |
getElementAt(int index) |
int |
getSize() |
void |
setComboSet(Set<T> set)
Sets the combo list from the given set.
|
void |
setSelectedItem(Object anItem) |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSelectedItemaddListDataListener, removeListDataListenerprotected T selectedItem
public AbstractComboBoxModel()
AbstractComboBoxModel with a new list.public AbstractComboBoxModel(List<T> comboList)
AbstractComboBoxModel from the given list.comboList - the listpublic AbstractComboBoxModel(List<T> comboList, T selectedItem)
AbstractComboBoxModel from the given arguments.comboList - the combo listselectedItem - the selected itempublic AbstractComboBoxModel(Set<T> set)
AbstractComboBoxModel from the given Set.set - the combo setpublic AbstractComboBoxModel(Set<T> set, T selectedItem)
AbstractComboBoxModel from the given Set.set - the combo setselectedItem - the selected itempublic AbstractComboBoxModel(T[] comboArray)
AbstractComboBoxModel from the given array.comboArray - the combo arraypublic AbstractComboBoxModel(T[] comboArray, T selectedItem)
AbstractComboBoxModel from the given arguments.comboArray - the combo arrayselectedItem - the selected itempublic void actionPerformed(ActionEvent evt)
actionPerformed in interface ActionListenerpublic T getElementAt(int index)
getElementAt in interface ListModel<T>public void setComboSet(Set<T> set)
set - the new combo setpublic void setSelectedItem(Object anItem)
setSelectedItem in interface ComboBoxModel<T>Copyright © 2015–2018 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.