API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing. DefaultComboBoxModel View Source
Author(s)
Arnaud Weber
Tom Santos
Since
Version
1.20 11/17/05
Serial
Hierarchy
 Object
      AbstractListModel
          DefaultComboBoxModel
Implements
 MutableComboBoxModel
 Serializable
Subclasses
Description
public class DefaultComboBoxModel
The default model for combo boxes.
See also:   
Constructors
public DefaultComboBoxModel ()
Constructs an empty DefaultComboBoxModel object.
public DefaultComboBoxModel (Object items)
  Constructs a DefaultComboBoxModel object initialized with an array of objects.
public DefaultComboBoxModel (Vector<Object> v)
  Constructs a DefaultComboBoxModel object initialized with a vector.
Methods
Hide/Show inherited methods
public void addElement (Object anObject) [Specified in MutableComboBoxModel]
public void addListDataListener (ListDataListener l) [Inherited From AbstractListModel]
  Adds a listener to the list that's notified each time a change to the data model occurs.
protected void fireContentsChanged (Object source, int index0, int index1) [Inherited From AbstractListModel]
  AbstractListModel subclasses must call this method after one or more elements of the list change.
protected void fireIntervalAdded (Object source, int index0, int index1) [Inherited From AbstractListModel]
  AbstractListModel subclasses must call this method after one or more elements are added to the model.
protected void fireIntervalRemoved (Object source, int index0, int index1) [Inherited From AbstractListModel]
  AbstractListModel subclasses must call this method after one or more elements are removed from the model.
public Object getElementAt (int index)
public int getIndexOf (Object anObject)
  Returns the index-position of the specified object in the list.
public ListDataListener getListDataListeners () [Inherited From AbstractListModel]
  Returns an array of all the list data listeners registered on this AbstractListModel.
public T getListeners (Class< T> listenerType) [Inherited From AbstractListModel]
  Returns an array of all the objects currently registered as FooListeners upon this model.
public Object getSelectedItem ()
public int getSize ()
public void insertElementAt (Object anObject, int index) [Specified in MutableComboBoxModel]
public void removeAllElements ()
Empties the list.
public void removeElement (Object anObject) [Specified in MutableComboBoxModel]
public void removeElementAt (int index) [Specified in MutableComboBoxModel]
public void removeListDataListener (ListDataListener l) [Inherited From AbstractListModel]
  Removes a listener from the list that's notified each time a change to the data model occurs.
public void setSelectedItem (Object anObject)
  Set the value of the selected item.
Fields
Hide/Show inherited fields
protected EventListenerList listenerList [Inherited From AbstractListModel]
pack-private Vector objects
pack-private Object selectedObject
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar