| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.4.0) E17493-05 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractListModel
javax.swing.DefaultComboBoxModel
oracle.ide.controls.NonNullableComboBoxModel
public class NonNullableComboBoxModel
The NonNullableComboBoxModel is a simple class for
 ensuring that a JComboBox will always have an item
 selected (if that we start with a non-empty list.)  This will
 prevent the user from Control-clicking in the list to unselect
 the selected item in the JComboBox. 
This can be used to guarantee that there is always a selected item in the combo box model. If the user attempts to unselect an item, the previously selected item will remain selected. The selection will be empty only if the combo box model is empty.
| Field Summary | 
|---|
| Fields inherited from class javax.swing.AbstractListModel | 
|---|
| listenerList | 
| Constructor Summary | |
|---|---|
| NonNullableComboBoxModel()Constructs an empty combo box model. | |
| NonNullableComboBoxModel(java.lang.Object[] items)Constructs a new NonNullableComboBoxModelwith
 the specified list of objects. | |
| Method Summary | |
|---|---|
|  void | setSelectedItem(java.lang.Object anObject)Sets the selected item of the combo box model to the specified object. | 
| Methods inherited from class javax.swing.DefaultComboBoxModel | 
|---|
| addElement, getElementAt, getIndexOf, getSelectedItem, getSize, insertElementAt, removeAllElements, removeElement, removeElementAt | 
| Methods inherited from class javax.swing.AbstractListModel | 
|---|
| addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface javax.swing.ListModel | 
|---|
| addListDataListener, removeListDataListener | 
| Constructor Detail | 
|---|
public NonNullableComboBoxModel()
public NonNullableComboBoxModel(java.lang.Object[] items)
NonNullableComboBoxModel with
 the specified list of objects.
items - an array of Objects to use for the model| Method Detail | 
|---|
public void setSelectedItem(java.lang.Object anObject)
setSelectedItem in interface javax.swing.ComboBoxModelsetSelectedItem in class javax.swing.DefaultComboBoxModelanObject - the object to set as the selected item| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.4.0) E17493-05 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||