public interface ItsNatComboBox extends ItsNatList, java.awt.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(java.lang.Object anObject)
Adds a new value to the list model.
|
javax.swing.ComboBoxModel |
getComboBoxModel()
Returns the current data model of this component.
|
java.awt.event.ItemListener[] |
getItemListeners()
Returns all
ItemListener objects registered. |
java.lang.Object |
getSelectedItem()
Returns the current selected item.
|
void |
insertElementAt(int index,
java.lang.Object anObject)
Inserts a new value in the list model at the specified position.
|
void |
removeAllElements()
Removes all items.
|
void |
removeElement(java.lang.Object anObject)
Removes the specified value from the list model.
|
void |
removeElementAt(int index)
Removes a list item at the specified index.
|
void |
setComboBoxModel(javax.swing.ComboBoxModel dataModel)
Changes the data model of this component.
|
void |
setSelectedItem(java.lang.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, startEditingAt
getElement, getItsNatElementComponentUI
addEventListener, 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, setNode
containsUserValueName, getUserValue, getUserValueNames, removeUserValue, setUserValue
javax.swing.ComboBoxModel getComboBoxModel()
setComboBoxModel(javax.swing.ComboBoxModel)
void setComboBoxModel(javax.swing.ComboBoxModel dataModel)
dataModel
- the new data model.getComboBoxModel()
,
ItsNatList.setListModel(javax.swing.ListModel)
void addElement(java.lang.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, java.lang.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(java.lang.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
.
java.lang.Object getSelectedItem()
This method delegates to ComboBoxModel.getSelectedItem()
.
void setSelectedItem(java.lang.Object anObject)
This method delegates to ComboBoxModel.setSelectedItem(Object)
.
anObject
- the item value to select.java.awt.event.ItemListener[] getItemListeners()
ItemListener
objects registered.Copyright © 2007 Innowhere Software Services S.L. All Rights Reserved.