org.jdesktop.swingx.combobox
Class MapComboBoxModel

java.lang.Object
  extended by org.jdesktop.swingx.combobox.ListComboBoxModel
      extended by org.jdesktop.swingx.combobox.MapComboBoxModel
All Implemented Interfaces:
ActionListener, EventListener, ComboBoxModel, ListModel

public class MapComboBoxModel
extends ListComboBoxModel


Field Summary
protected  List index
           
protected  boolean inverted
           
protected  List invertedIndex
           
protected  Map map_data
           
 
Fields inherited from class org.jdesktop.swingx.combobox.ListComboBoxModel
data, listeners, selected
 
Constructor Summary
MapComboBoxModel()
           
MapComboBoxModel(Map map)
           
 
Method Summary
 void actionPerformed(ActionEvent evt)
          Invoked when an action occurs.
protected  void buildIndex()
           
 Object getElementAt(int i)
          Returns the value at the specified index.
 Map getMap()
           
 int getSize()
          Returns the length of the list.
 Object getValue(int selectedItem)
           
 Object getValue(Object selectedItem)
           
 
Methods inherited from class org.jdesktop.swingx.combobox.ListComboBoxModel
addListDataListener, fireUpdate, getSelectedItem, removeListDataListener, setSelectedItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map_data

protected Map map_data

index

protected List index

invertedIndex

protected List invertedIndex

inverted

protected boolean inverted
Constructor Detail

MapComboBoxModel

public MapComboBoxModel()

MapComboBoxModel

public MapComboBoxModel(Map map)
Method Detail

buildIndex

protected void buildIndex()

getElementAt

public Object getElementAt(int i)
Description copied from interface: javax.swing.ListModel
Returns the value at the specified index.

Specified by:
getElementAt in interface ListModel
Overrides:
getElementAt in class ListComboBoxModel
Parameters:
i - the requested index
Returns:
the value at index

getSize

public int getSize()
Description copied from interface: javax.swing.ListModel
Returns the length of the list.

Specified by:
getSize in interface ListModel
Overrides:
getSize in class ListComboBoxModel
Returns:
the length of the list

getMap

public Map getMap()

actionPerformed

public void actionPerformed(ActionEvent evt)
Description copied from interface: java.awt.event.ActionListener
Invoked when an action occurs.

Specified by:
actionPerformed in interface ActionListener
Overrides:
actionPerformed in class ListComboBoxModel

getValue

public Object getValue(Object selectedItem)

getValue

public Object getValue(int selectedItem)