Class JComboBoxHpr.ItemsModel
java.lang.Object
javax.swing.AbstractListModel
com.inductiveautomation.snap.swing.helpers.JComboBoxHpr.ItemsModel
- All Implemented Interfaces:
Serializable
,ComboBoxModel
,ListModel
- Enclosing class:
- JComboBoxHpr<T extends JComboBox>
A combobox model implementation to handle binding.
- See Also:
-
Field Summary
Fields inherited from class javax.swing.AbstractListModel
listenerList
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
fireContentsChanged
(Object aSource, int index0, int index1) Overrides AbstractListModel implementation to make public.getElementAt
(int anIndex) List model method - returns item at given index.Returns the selected item.int
getSize()
List model method - returns item count.void
Sets the items.void
setSelectedItem
(Object anObj) Sets the selected item.Methods inherited from class javax.swing.AbstractListModel
addListDataListener, 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
-
Constructor Details
-
ItemsModel
public ItemsModel()
-
-
Method Details
-
setItems
Sets the items. -
getSize
public int getSize()List model method - returns item count. -
getElementAt
List model method - returns item at given index.- Specified by:
getElementAt
in interfaceListModel
-
getSelectedItem
Returns the selected item.- Specified by:
getSelectedItem
in interfaceComboBoxModel
-
setSelectedItem
Sets the selected item.- Specified by:
setSelectedItem
in interfaceComboBoxModel
-
fireContentsChanged
Overrides AbstractListModel implementation to make public.- Overrides:
fireContentsChanged
in classAbstractListModel
-