net.sf.sbcc.componentcombo
Class DefaultSimpleComboBoxModel

java.lang.Object
  extended by net.sf.sbcc.componentcombo.AbstractSimpleModel
      extended by net.sf.sbcc.componentcombo.DefaultSimpleComboBoxModel
All Implemented Interfaces:
java.io.Serializable, SimpleComboBoxModel, SimpleModel

 class DefaultSimpleComboBoxModel
extends AbstractSimpleModel
implements SimpleComboBoxModel, java.io.Serializable

The default model for component combo boxes.

Author:
Christoph Bimminger

Field Summary
(package private)  java.util.Vector objects
           
(package private)  java.lang.Object selectedObject
           
 
Fields inherited from class net.sf.sbcc.componentcombo.AbstractSimpleModel
listenerList
 
Constructor Summary
DefaultSimpleComboBoxModel()
          Constructs an empty DefaultSimpleComboBoxModel object.
DefaultSimpleComboBoxModel(java.lang.Object item)
          Constructs a DefaultSimpleComboBoxModel object initialized with an array of objects.
 
Method Summary
 java.lang.Object getSelectedItem()
          Returns the selected item
 void setSelectedItem(java.lang.Object anObject)
          Set the value of the selected item.
 
Methods inherited from class net.sf.sbcc.componentcombo.AbstractSimpleModel
addDataListener, fireContentsChanged, getDataListeners, getListeners, removeDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.sbcc.componentcombo.SimpleModel
addDataListener, removeDataListener
 

Field Detail

objects

java.util.Vector objects

selectedObject

java.lang.Object selectedObject
Constructor Detail

DefaultSimpleComboBoxModel

public DefaultSimpleComboBoxModel()
Constructs an empty DefaultSimpleComboBoxModel object.


DefaultSimpleComboBoxModel

public DefaultSimpleComboBoxModel(java.lang.Object item)
Constructs a DefaultSimpleComboBoxModel object initialized with an array of objects.

Parameters:
items - an array of Object objects
Method Detail

setSelectedItem

public void setSelectedItem(java.lang.Object anObject)
Set the value of the selected item. The selected item may be null.

Specified by:
setSelectedItem in interface SimpleComboBoxModel
Parameters:
anObject - The combo box value or null for no selection.

getSelectedItem

public java.lang.Object getSelectedItem()
Description copied from interface: SimpleComboBoxModel
Returns the selected item

Specified by:
getSelectedItem in interface SimpleComboBoxModel
Returns:
The selected item or null if there is no selection