com.sas.swing.models
Class ComboBoxModelAdapter

com.sas.swing.models.ComboBoxModelAdapter
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.collection.ContentsChangedListener, ViewDefaultModel, com.sas.util.transforms.DisplayTransformInterface, java.io.Serializable, java.util.EventListener, javax.swing.ComboBoxModel, javax.swing.ListModel
Direct Known Subclasses:
MutableComboBoxModelAdapter

public class ComboBoxModelAdapter
implements javax.swing.ComboBoxModel

The ComboBoxModelAdapter takes a collection which implements the IndexedGetInterface and allows it to be the model to a Swing ComboBox.

See Also:
ListModelAdapter, Serialized Form

Field Summary
protected  java.lang.Object selectedItem
          The item selected in the ComboBox
 
Fields inherited from class com.sas.swing.models.ListModelAdapter
defaultModelAttached, displayTransform, model, propertyChangeSupport
 
Constructor Summary
ComboBoxModelAdapter()
           
ComboBoxModelAdapter(IndexedGetInterface collection)
          Constructor.
 
Method Summary
 java.lang.Object getSelectedItem()
          Returns the item selected in the ComboBox.
 void setSelectedItem(java.lang.Object selectedItem)
          Sets the item selected in the ComboBox.
 
Methods inherited from class com.sas.swing.models.ListModelAdapter
addPropertyChangeListener, contentsChanged, firePropertyChange, firePropertyChange, getDisplayTransform, getElementAt, getExtendedBeanInfo, getModel, getSize, isDefaultModelAttached, newDefaultModel, removePropertyChangeListener, setDefaultModelAttached, setDisplayTransform, setModel
 

Field Detail

selectedItem

protected java.lang.Object selectedItem
The item selected in the ComboBox

Constructor Detail

ComboBoxModelAdapter

public ComboBoxModelAdapter()

ComboBoxModelAdapter

public ComboBoxModelAdapter(IndexedGetInterface collection)
Constructor.

Parameters:
collection - The collection to be in the ComboBox model.
Method Detail

getSelectedItem

public java.lang.Object getSelectedItem()
Returns the item selected in the ComboBox.

Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel
Returns:
the item selected in the ComboBox.

setSelectedItem

public void setSelectedItem(java.lang.Object selectedItem)
Sets the item selected in the ComboBox.

Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel
Parameters:
selectedItem - the item selected in the ComboBox.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.