java.lang.Object | ||
↳ | javax.swing.AbstractListModel | |
↳ | javax.swing.DefaultComboBoxModel |
The default model for combo boxes.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs an empty DefaultComboBoxModel object.
| |||||||||||
Constructs a DefaultComboBoxModel object initialized with
an array of objects.
| |||||||||||
Constructs a DefaultComboBoxModel object initialized with
a vector.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds an item at the end of the model.
| |||||||||||
Returns the value at the specified index.
| |||||||||||
Returns the index-position of the specified object in the list.
| |||||||||||
Returns the selected item
| |||||||||||
Returns the length of the list.
| |||||||||||
Adds an item at a specific index.
| |||||||||||
Empties the list.
| |||||||||||
Removes an item from the model.
| |||||||||||
Removes an item at a specific index.
| |||||||||||
Set the value of the selected item.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs an empty DefaultComboBoxModel object.
Constructs a DefaultComboBoxModel object initialized with an array of objects.
items | an array of Object objects |
---|
Constructs a DefaultComboBoxModel object initialized with a vector.
v | a Vector object ... |
---|
Adds an item at the end of the model. The implementation of this method
should notify all registered ListDataListener
s that the
item has been added.
anObject | the Object to be added
|
---|
Returns the value at the specified index.
index | the requested index |
---|
index
Returns the index-position of the specified object in the list.
Returns the selected item
null
if there is no selection
Returns the length of the list.
Adds an item at a specific index. The implementation of this method
should notify all registered ListDataListener
s that the
item has been added.
anObject | the Object to be added |
---|---|
index | location to add the object |
Empties the list.
Removes an item from the model. The implementation of this method should
should notify all registered ListDataListener
s that the
item has been removed.
anObject | the Object to be removed
|
---|
Removes an item at a specific index. The implementation of this method
should notify all registered ListDataListener
s that the
item has been removed.
index | location of object to be removed |
---|
Set the value of the selected item. The selected item may be null.
anObject | The combo box value or null for no selection. |
---|