Class ListComboBoxModel<T>

    • Constructor Detail

      • ListComboBoxModel

        public ListComboBoxModel(List<T> list)
        Create a new ComboBoxModel backed by the given list of items.
        Parameters:
        list - the list that backs this model.
    • Method Detail

      • toString

        public abstract String toString(T element)
        This method defines the appearance of the elements.
        Parameters:
        element - the element displayed
        Returns:
        the string representing the element.
      • getSize

        public int getSize()
      • removeListDataListener

        public void removeListDataListener(ListDataListener l)
      • setSelectedItem

        public void setSelectedItem(Object anItem)
      • getSelectedItem

        public Object getSelectedItem()
      • getSelectedElement

        public T getSelectedElement()
        Returns:
        the currently selected element