This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing
interface ComboBoxModel

All Superinterfaces:
ListModel
All Known Subinterfaces:
MutableComboBoxModel
All Known Implementing Classes:
MetalFileChooserUI.DirectoryComboBoxModel, MetalFileChooserUI.FilterComboBoxModel

public interface ComboBoxModel
extends ListModel

A data model for a combo box. This interface extends ListDataModel and adds the concept of a selected item. The selected item is generally the item which is visible in the combo box display area.

The selected item may not necessarily be managed by the underlying ListModel. This disjoint behavior allows for the temporary storage and retrieval of a selected item in the model.


Method Summary
 Object

          Returns the selected item
 void

          Set the selected item.
 
Methods inherited from class javax.swing.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener
 

Method Detail

getSelectedItem

public Object getSelectedItem()
Returns the selected item

Returns:
The selected item or null if there is no selection

setSelectedItem

public void setSelectedItem(Object anItem)
Set the selected item. The implementation of this method should notify all registered ListDataListeners that the contents have changed.

Parameters:
anItem - the list object to select or null to clear the selection


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.