Skip navigation links
oracle.ide.controls
Class DefaultListComboBoxModel
java.lang.Object
javax.swing.AbstractListModel
oracle.ide.controls.DefaultListComboBoxModel
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.ComboBoxModel, javax.swing.ListModel, javax.swing.MutableComboBoxModel
-
public class DefaultListComboBoxModel
- extends javax.swing.AbstractListModel
- implements javax.swing.MutableComboBoxModel, java.io.Serializable
The default model for combo boxes.
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
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 |
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 ...
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.
Skip navigation links
Copyright © 1997, 2015, Oracle. All rights reserved.