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>

public static class JComboBoxHpr.ItemsModel extends AbstractListModel implements ComboBoxModel
A combobox model implementation to handle binding.
See Also:
  • Constructor Details

    • ItemsModel

      public ItemsModel()
  • Method Details

    • setItems

      public void setItems(List theItems)
      Sets the items.
    • getSize

      public int getSize()
      List model method - returns item count.
      Specified by:
      getSize in interface ListModel
    • getElementAt

      public Object getElementAt(int anIndex)
      List model method - returns item at given index.
      Specified by:
      getElementAt in interface ListModel
    • getSelectedItem

      public Object getSelectedItem()
      Returns the selected item.
      Specified by:
      getSelectedItem in interface ComboBoxModel
    • setSelectedItem

      public void setSelectedItem(Object anObj)
      Sets the selected item.
      Specified by:
      setSelectedItem in interface ComboBoxModel
    • fireContentsChanged

      public void fireContentsChanged(Object aSource, int index0, int index1)
      Overrides AbstractListModel implementation to make public.
      Overrides:
      fireContentsChanged in class AbstractListModel