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 SummaryFields inherited from class javax.swing.AbstractListModellistenerList
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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 javax.swing.AbstractListModeladdListDataListener, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListenerMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.swing.ListModeladdListDataListener, removeListDataListener
- 
Constructor Details- 
ItemsModelpublic ItemsModel()
 
- 
- 
Method Details- 
setItemsSets the items.
- 
getSizepublic int getSize()List model method - returns item count.
- 
getElementAtList model method - returns item at given index.- Specified by:
- getElementAtin interface- ListModel
 
- 
getSelectedItemReturns the selected item.- Specified by:
- getSelectedItemin interface- ComboBoxModel
 
- 
setSelectedItemSets the selected item.- Specified by:
- setSelectedItemin interface- ComboBoxModel
 
- 
fireContentsChangedOverrides AbstractListModel implementation to make public.- Overrides:
- fireContentsChangedin class- AbstractListModel
 
 
-