All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.swing.models
Class MapToComboBoxModelAdapter

    com.sas.swing.models.MapToComboBoxModelAdapter

All Implemented Interfaces:
  com.sas.beans.PropertyChangeSource, java.io.Serializable, javax.swing.ComboBoxModel, javax.swing.ListModel

    public class MapToComboBoxModelAdapter

implements javax.swing.ComboBoxModel

The MapToComboBoxModelAdapter allows Maps that extend from `java.util.Map` to be used as the model for a `javax.swing.JComboBox`. The Map must be set as the model for the adapter, which can then used as the model for the viewer.

See Also:
  Serialized Form

Field Summary
`protected java.lang.Object` | `selectedItem` Currently selected item

Fields inherited from class com.sas.swing.models.MapToListModelAdapter
`delegate, model, showKeysOnly, spcs`

Constructor Summary
`MapToComboBoxModelAdapter()` Default constructor
`MapToComboBoxModelAdapter(int size)` Overloaded constructor that initializes the delegate to be of given size
`MapToComboBoxModelAdapter(java.util.Map m)` Overloaded constructor that intializes the adapter with the data given by the Map

Method Summary
`java.lang.Object` | `getSelectedItem()` Returns the selected item
`void` | `setSelectedItem(java.lang.Object item)` Sets the selected item

Methods inherited from class com.sas.swing.models.MapToListModelAdapter
`addPropertyChangeListener, createDelegate, getElementAt, getExtendedBeanInfo, getModel, getShowKeysOnly, getSize, refresh, removePropertyChangeListener, setModel, setShowKeysOnly`

Field Detail

### selectedItem

    protected java.lang.Object selectedItem

  Currently selected item

Constructor Detail

### MapToComboBoxModelAdapter

    public MapToComboBoxModelAdapter()

  Default constructor

### MapToComboBoxModelAdapter

    public MapToComboBoxModelAdapter(int size)

  Overloaded constructor that initializes the delegate to be of given size

  Parameters:
    `size` - Initial size of the delegate representing the Map

### MapToComboBoxModelAdapter

    public MapToComboBoxModelAdapter(java.util.Map m)

  Overloaded constructor that intializes the adapter with the data given by the Map

  Parameters:
    `m` - Map whose data will be used within the adapter

Method Detail

### getSelectedItem

    public java.lang.Object getSelectedItem()

  Returns the selected item

  Specified by:
    `getSelectedItem` in interface `javax.swing.ComboBoxModel`

### setSelectedItem

    public void setSelectedItem(java.lang.Object item)

  Sets the selected item

  Specified by:
    `setSelectedItem` in interface `javax.swing.ComboBoxModel`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.