APIdia Launch Partner
Top Description Methods
javax.swing

public Interface MutableComboBoxModel<E>

extends ComboBoxModel<E>
Known Direct Implementers
javax.swing.DefaultComboBoxModel
Type Parameters
<E>
the type of the elements of this model

A mutable version of ComboBoxModel.
Author
Tom Santos
Since
1.2

Method Summary

Modifier and TypeMethod and Description
public void
addElement(E
the item to be added
item
)

Adds an item at the end of the model.

public void
insertElementAt(E
the item to be added
item
,
int
location to add the object
index
)

Adds an item at a specific index.

public void
removeElement(Object
the Object to be removed
obj
)

Removes an item from the model.

public void
removeElementAt(int
location of the item to be removed
index
)

Removes an item at a specific index.

Inherited from javax.swing.ComboBoxModel:
getSelectedItemsetSelectedItem

Method Detail

addElementback to summary
public void addElement(E item)

Adds an item at the end of the model. The implementation of this method should notify all registered ListDataListeners that the item has been added.

Parameters
item:E

the item to be added

insertElementAtback to summary
public void insertElementAt(E item, int index)

Adds an item at a specific index. The implementation of this method should notify all registered ListDataListeners that the item has been added.

Parameters
item:E

the item to be added

index:int

location to add the object

removeElementback to summary
public void removeElement(Object obj)

Removes an item from the model. The implementation of this method should should notify all registered ListDataListeners that the item has been removed.

Parameters
obj:Object

the Object to be removed

removeElementAtback to summary
public void removeElementAt(int index)

Removes an item at a specific index. The implementation of this method should notify all registered ListDataListeners that the item has been removed.

Parameters
index:int

location of the item to be removed