public interface MutableComboBoxModel extends ComboBoxModel
JComboBox
es that keeps track of the
components data and provides methods to insert and remove elements from
it. The classes implementing this interface should
fire appropriate events indicating the undergoing change in the data model.Modifier and Type | Method and Description |
---|---|
void |
addElement(Object object)
This method adds given object to its data model.
|
void |
insertElementAt(Object object,
int index)
This method inserts givent element to the data model, at the specified
index.
|
void |
removeElement(Object object)
This method removes given element from the data model
|
void |
removeElementAt(int index)
This method removes elements located at the given index in the data
model.
|
getSelectedItem, setSelectedItem
addListDataListener, getElementAt, getSize, removeListDataListener
void addElement(Object object)
object
- element to add to the data model.void removeElementAt(int index)
index
- index specifying location of the element to remove.void insertElementAt(Object object, int index)
object
- element to insertindex
- index specifying the position in the data model where the
given element should be inserted.void removeElement(Object object)
object
- element to remove.