Class ListComboBoxModel<E>

java.lang.Object
javax.swing.AbstractListModel<E>
org.jdesktop.swingx.combobox.ListComboBoxModel<E>
Type Parameters:
E - the type of elements maintained by the list backing this model
All Implemented Interfaces:
ActionListener, Serializable, EventListener, ComboBoxModel<E>, ListModel<E>
Direct Known Subclasses:
EnumComboBoxModel, MapComboBoxModel

public class ListComboBoxModel<E> extends AbstractListModel<E> implements ComboBoxModel<E>, ActionListener
A ComboBoxModel for Lists.
Author:
jm158417, Karl George Schaefer
See Also:
  • Field Details

    • UPDATE

      public static final String UPDATE
      A key used to notify the model that the backing List has changed.
      See Also:
    • data

      protected final List<E> data
      A reference to the list backing this model.

      This model does not make a copy of the list, so any changes in the list without synchronizing the model may have drastic effects.

    • selected

      protected E selected
      The currently selected item.
  • Constructor Details

    • ListComboBoxModel

      public ListComboBoxModel(List<E> list)
      Creates a ListComboBoxModel backed by the supplied list.
      Parameters:
      list - the list backing this model
      Throws:
      NullPointerException - if list is null
  • Method Details