org.crosswire.common.swing

## Class MapComboBoxModel

- java.lang.Object
- - javax.swing.AbstractListModel
  - - org.crosswire.common.swing.MapComboBoxModel

- All Implemented Interfaces:
    Serializable, ComboBoxModel, ListModel

      public class MapComboBoxModel
      extends AbstractListModel
      implements ComboBoxModel

  A ComboBoxModel for selecting entries from a map.
  Author:
    DM Smith
  See Also:
    `for license details.`, Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private List<?>` | `list`
    `private Object` | `selected` What is currently selected?
    `private static long` | `serialVersionUID` Serialization ID

    - ### Fields inherited from class javax.swing.AbstractListModel

      `listenerList`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MapComboBoxModel(Map<?,?> map)` Simple ctor for an entry from a map.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getElementAt(int index)`
    `Object` | `getSelectedItem()`
    `int` | `getSize()`
    `void` | `setSelectedItem(Object newSelection)`

    - ### Methods inherited from class javax.swing.AbstractListModel

      `addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface javax.swing.ListModel

      `addListDataListener, removeListDataListener`

- - ### Field Detail

    - #### list

          private List<?> list

    - #### selected

          private transient Object selected

      What is currently selected?

    - #### serialVersionUID

          private static final long serialVersionUID

      Serialization ID
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MapComboBoxModel

          public MapComboBoxModel(Map<?,?> map)

      Simple ctor for an entry from a map.

  - ### Method Detail

    - #### setSelectedItem

          public void setSelectedItem(Object newSelection)

      Specified by:
        `setSelectedItem` in interface `ComboBoxModel`

    - #### getSelectedItem

          public Object getSelectedItem()

      Specified by:
        `getSelectedItem` in interface `ComboBoxModel`

    - #### getSize

          public int getSize()

      Specified by:
        `getSize` in interface `ListModel`

    - #### getElementAt

          public Object getElementAt(int index)

      Specified by:
        `getElementAt` in interface `ListModel`