Class GenericComboModel<E>
java.lang.Object
javax.swing.AbstractListModel<E>
javax.swing.DefaultComboBoxModel<E>
fr.ifremer.isisfish.ui.models.common.GenericComboModel<E>
- Type Parameters:
E
- generic type
- All Implemented Interfaces:
Serializable
,ComboBoxModel<E>
,ListModel<E>
,MutableComboBoxModel<E>
Model pour pour la representation d'une liste de type generic.
Utilisation dans les
JComboBox
.- Version:
- $Revision$ Last update : $Date$ By : $Author$
- Author:
- chatellier
- See Also:
-
Field Summary
Fields inherited from class javax.swing.AbstractListModel
listenerList
-
Constructor Summary
ConstructorDescriptionEmpty constructor.GenericComboModel
(List<E> elementList) Constructor with export list. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addElement
(E elt) boolean
containsElement
(E elt) getElementAt
(int index) Get E list.int
getSize()
void
setElementList
(List<E> elementList) Set E list.Methods inherited from class javax.swing.DefaultComboBoxModel
addAll, addAll, getIndexOf, getSelectedItem, insertElementAt, removeAllElements, removeElement, removeElementAt, setSelectedItem
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.ListModel
addListDataListener, removeListDataListener
-
Field Details
-
elementList
E list.
-
-
Constructor Details
-
GenericComboModel
public GenericComboModel()Empty constructor. -
GenericComboModel
Constructor with export list.- Parameters:
elementList
- E list
-
-
Method Details
-
getElementList
Get E list.- Returns:
- E list
-
setElementList
Set E list.- Parameters:
elementList
- E list to set
-
addElement
- Specified by:
addElement
in interfaceMutableComboBoxModel<E>
- Overrides:
addElement
in classDefaultComboBoxModel<E>
-
containsElement
-
getElementAt
- Specified by:
getElementAt
in interfaceListModel<E>
- Overrides:
getElementAt
in classDefaultComboBoxModel<E>
-
getSize
public int getSize()
-