public interface ItsNatComboBox extends ItsNatList, ItemSelectable
Items of combo boxes are not editable "in place", for instance a call
to ItsNatList.setItsNatListCellEditor(ItsNatListCellEditor) throws an
ItsNatException.
By default this component type uses a javax.swing.DefaultComboBoxModel
data model.
When the selection item changes the component notifies to all
java.awt.event.ItemListener listeners registered (this component
implements java.awt.ItemSelectable).
| Modifier and Type | Method and Description |
|---|---|
void |
addElement(Object anObject)
Adds a new value to the list model.
|
ComboBoxModel |
getComboBoxModel()
Returns the current data model of this component.
|
ItemListener[] |
getItemListeners()
Returns all
ItemListener objects registered. |
Object |
getSelectedItem()
Returns the current selected item.
|
void |
insertElementAt(int index,
Object anObject)
Inserts a new value in the list model at the specified position.
|
void |
removeAllElements()
Removes all items.
|
void |
removeElement(Object anObject)
Removes the specified value from the list model.
|
void |
removeElementAt(int index)
Removes a list item at the specified index.
|
void |
setComboBoxModel(ComboBoxModel dataModel)
Changes the data model of this component.
|
void |
setSelectedItem(Object anObject)
Sets the current selected item.
|
createDefaultListModel, getEditingIndex, getEditorActivatorEvent, getItsNatListCellEditor, getItsNatListCellRenderer, getItsNatListStructure, getItsNatListUI, getListModel, getSelectedIndex, indexOf, isEditing, isEditingEnabled, setEditingEnabled, setEditorActivatorEvent, setItsNatListCellEditor, setItsNatListCellRenderer, setListModel, setSelectedIndex, startEditingAtgetElement, getItsNatElementComponentUIaddEventListener, addEventListener, addEventListener, addEventListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, disableEventListener, disableEventListener, dispose, enableEventListener, enableEventListener, getArtifact, getArtifact, getItsNatComponentManager, getItsNatComponentUI, getItsNatDocument, getNode, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, isDisposed, isEnabled, registerArtifact, removeArtifact, removeEventListener, removeEventListener, removeEventListener, removeEventListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setEnabled, setEventListenerParams, setEventListenerParams, setNodecontainsUserValueName, getUserValue, getUserValueNames, removeUserValue, setUserValueaddItemListener, getSelectedObjects, removeItemListenerComboBoxModel getComboBoxModel()
setComboBoxModel(javax.swing.ComboBoxModel)void setComboBoxModel(ComboBoxModel dataModel)
dataModel - the new data model.getComboBoxModel(),
ItsNatList.setListModel(javax.swing.ListModel)void addElement(Object anObject)
This method only works if the data model is a
javax.swing.MutableComboBoxModel.
anObject - the value to add at the end of the list.void insertElementAt(int index,
Object anObject)
This method only works if the data model is a
javax.swing.MutableComboBoxModel.
index - index of the new list item.anObject - the value to add at the end of the list.void removeElement(Object anObject)
This method only works if the data model is a
javax.swing.MutableComboBoxModel.
anObject - the value to remove.void removeElementAt(int index)
This method only works if the data model is a
javax.swing.MutableComboBoxModel.
index - index of the item to remove.void removeAllElements()
This method only works if the data model is a
javax.swing.MutableComboBoxModel.
Object getSelectedItem()
This method delegates to ComboBoxModel.getSelectedItem().
void setSelectedItem(Object anObject)
This method delegates to ComboBoxModel.setSelectedItem(Object).
anObject - the item value to select.ItemListener[] getItemListeners()
ItemListener objects registered.Copyright © Innowhere Software, Jose Maria Arranz Santamaria.