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 AbstractListModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfireContentsChanged(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.intgetSize()List model method - returns item count.voidSets the items.voidsetSelectedItem(Object anObj) Sets the selected item.Methods inherited from class AbstractListModel
addListDataListener, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListenerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ListModel
addListDataListener, removeListDataListener
-
Constructor Details
-
ItemsModel
public ItemsModel()
-
-
Method Details
-
setItems
Sets the items. -
getSize
-
getElementAt
List model method - returns item at given index.- Specified by:
getElementAtin interfaceListModel
-
getSelectedItem
Returns the selected item.- Specified by:
getSelectedItemin interfaceComboBoxModel
-
setSelectedItem
Sets the selected item.- Specified by:
setSelectedItemin interfaceComboBoxModel
-
fireContentsChanged
Overrides AbstractListModel implementation to make public.- Overrides:
fireContentsChangedin classAbstractListModel
-