Extension SDK 10.1.2

oracle.ide.controls
Class DefaultListComboBoxModel

java.lang.Object
  extended byjavax.swing.AbstractListModel
      extended byoracle.ide.controls.DefaultListComboBoxModel
All Implemented Interfaces:
javax.swing.ComboBoxModel, javax.swing.ListModel, javax.swing.MutableComboBoxModel, java.io.Serializable

public class DefaultListComboBoxModel
extends javax.swing.AbstractListModel
implements javax.swing.MutableComboBoxModel, java.io.Serializable

The default model for combo boxes.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
DefaultListComboBoxModel()
          Constructs an empty DefaultComboBoxModel object.
DefaultListComboBoxModel(java.util.List v)
          Constructs a DefaultComboBoxModel object initialized with a list.
DefaultListComboBoxModel(java.lang.Object[] items)
          Constructs a DefaultComboBoxModel object initialized with an array of objects.
 
Method Summary
 void addElement(java.lang.Object anObject)
           
 java.lang.Object getElementAt(int index)
           
 int getIndexOf(java.lang.Object anObject)
          Returns the index-position of the specified object in the list.
 java.lang.Object getSelectedItem()
           
 int getSize()
           
 void insertElementAt(java.lang.Object anObject, int index)
           
 void removeAllElements()
          Empties the list.
 void removeElement(java.lang.Object anObject)
           
 void removeElementAt(int index)
           
 void setSelectedItem(java.lang.Object anObject)
           
 
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

DefaultListComboBoxModel

public DefaultListComboBoxModel()
Constructs an empty DefaultComboBoxModel object.


DefaultListComboBoxModel

public DefaultListComboBoxModel(java.lang.Object[] items)
Constructs a DefaultComboBoxModel object initialized with an array of objects.

Parameters:
items - an array of Object objects

DefaultListComboBoxModel

public DefaultListComboBoxModel(java.util.List v)
Constructs a DefaultComboBoxModel object initialized with a list.

Parameters:
v - a List object ...
Method Detail

setSelectedItem

public void setSelectedItem(java.lang.Object anObject)
Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel

getSelectedItem

public java.lang.Object getSelectedItem()
Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel

getSize

public int getSize()
Specified by:
getSize in interface javax.swing.ListModel

getElementAt

public java.lang.Object getElementAt(int index)
Specified by:
getElementAt in interface javax.swing.ListModel

getIndexOf

public int getIndexOf(java.lang.Object anObject)
Returns the index-position of the specified object in the list.

Parameters:
anObject -
Returns:
an int representing the index position, where 0 is the first position

addElement

public void addElement(java.lang.Object anObject)
Specified by:
addElement in interface javax.swing.MutableComboBoxModel

insertElementAt

public void insertElementAt(java.lang.Object anObject,
                            int index)
Specified by:
insertElementAt in interface javax.swing.MutableComboBoxModel

removeElementAt

public void removeElementAt(int index)
Specified by:
removeElementAt in interface javax.swing.MutableComboBoxModel

removeElement

public void removeElement(java.lang.Object anObject)
Specified by:
removeElement in interface javax.swing.MutableComboBoxModel

removeAllElements

public void removeAllElements()
Empties the list.


Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.