|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.swing.models.CollectionToComboBoxModelAdapter
public class CollectionToComboBoxModelAdapter
The CollectionToListModelAdapter allows collections that extend from java.util.Collection
,
such as instances of java.util.List
and java.util.Set
, to be used as the
model for a javax.swing.JComboBox
. The collection must be set as the model for the adapter,
which can then used as the model for the viewer.
Field Summary | |
---|---|
protected java.lang.Object |
selectedItem
Currently selected item |
Fields inherited from class com.sas.swing.models.CollectionToListModelAdapter |
---|
delegate, model, spcs |
Constructor Summary | |
---|---|
CollectionToComboBoxModelAdapter()
Default constructor |
|
CollectionToComboBoxModelAdapter(java.util.Collection c)
Overloaded constructor that intializes the adapter with the data given by the Collection |
|
CollectionToComboBoxModelAdapter(int size)
Overloaded constructor that initializes the delegate to be of given size |
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.CollectionToListModelAdapter |
---|
addPropertyChangeListener, createDelegate, getElementAt, getExtendedBeanInfo, getModel, getSize, refresh, removePropertyChangeListener, setModel |
Field Detail |
---|
protected java.lang.Object selectedItem
Constructor Detail |
---|
public CollectionToComboBoxModelAdapter()
public CollectionToComboBoxModelAdapter(int size)
size
- Initial size of the delegate representing the Collectionpublic CollectionToComboBoxModelAdapter(java.util.Collection c)
c
- Collection whose data will be used within the adapterMethod Detail |
---|
public java.lang.Object getSelectedItem()
getSelectedItem
in interface javax.swing.ComboBoxModel
public void setSelectedItem(java.lang.Object item)
setSelectedItem
in interface javax.swing.ComboBoxModel
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |