|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ItsNatComboBox
Is the base interface of combo box components.
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).
| Method Summary | |
|---|---|
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. |
| Methods inherited from interface org.itsnat.comp.list.ItsNatList |
|---|
createDefaultListModel, getEditingIndex, getEditorActivatorEvent, getItsNatListCellEditor, getItsNatListCellRenderer, getItsNatListStructure, getItsNatListUI, getListModel, getSelectedIndex, indexOf, isEditing, isEditingEnabled, setEditingEnabled, setEditorActivatorEvent, setItsNatListCellEditor, setItsNatListCellRenderer, setListModel, setSelectedIndex, startEditingAt |
| Methods inherited from interface org.itsnat.comp.ItsNatElementComponent |
|---|
getElement, getItsNatElementComponentUI |
| Methods inherited from interface org.itsnat.core.ItsNatUserData |
|---|
containsUserValueName, getUserValue, getUserValueNames, removeUserValue, setUserValue |
| Methods inherited from interface java.awt.ItemSelectable |
|---|
addItemListener, getSelectedObjects, removeItemListener |
| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||