All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.JComboBox
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----com.sun.java.swing.JComponent
|
+----com.sun.java.swing.JComboBox
- public class JComboBox
- extends JComponent
- implements ItemSelectable, ListDataListener, ActionListener
-
currentValueReminder
-
-
dataModel
-
-
editor
-
-
fallbackUI
-
-
isEditable
-
-
itemListener
-
-
keySelectionManager
-
-
maximumRowCount
-
-
renderer
-
-
JComboBox()
-
-
JComboBox(ComboBoxDataModel)
-
-
actionPerformed(ActionEvent)
- This method is public as an implementation side effect.
-
addItemListener(ItemListener)
- Add an ItemListener.
-
addPossibleValue(Object)
- Add a value in the list of possible values.
-
configureCurrentValueEditor(ComboBoxEditor, Object)
-
-
contentsChanged(ListDataEvent)
- This method is public as an implementation side effect.
-
createDefaultKeySelectionManager()
-
-
currentValueChanged()
- This method is called when the current value changes.
-
getCurrentValue()
-
-
getCurrentValueIndex()
-
-
getEditor()
-
-
getKeySelectionManager()
-
-
getMaximumRowCount()
-
-
getModel()
-
-
getPossibleValueAt(int)
-
-
getPossibleValuesCount()
- Accessing the model
-
getRenderer()
-
-
getSelectedObjects()
- Return an array containing the current value.
-
getUI()
-
-
insertPossibleValue(Object, int)
- Insert a possible value at a given index
-
intervalAdded(ListDataEvent)
-
-
intervalRemoved(ListDataEvent)
-
-
isEditable()
-
-
isFocusTraversable()
-
-
isOpaque()
-
-
removeAllPossibleValues()
- Convenience to remove all possible values
This method works only if the receiving JComboBox uses the default JComboBox data model.
-
removeItemListener(ItemListener)
- Remove an ItemListener
-
removePossibleValue(Object)
- Remove a value in the list of possible values.
-
removePossibleValueAt(int)
- Remove the possible value given an index
-
selectWithKeyChar(char)
-
-
setCurrentValue(Object)
- Set the receiving JComboBox currentValue.
-
setCurrentValueFromIndex(int)
-
-
setEditable(boolean)
-
-
setEditor(ComboBoxEditor)
-
-
setEnabled(boolean)
-
-
setKeySelectionManager(JComboBox. KeySelectionManager)
-
-
setMaximumRowCount(int)
-
-
setModel(ComboBoxDataModel)
-
-
setRenderer(ListCellRenderer)
-
-
setUI(ComboBoxUI)
-
-
updateUI()
- Overriden from JComponent to change the UI according to the default factory
fallbackUI
protected static String fallbackUI
dataModel
protected ComboBoxDataModel dataModel
renderer
protected ListCellRenderer renderer
editor
protected ComboBoxEditor editor
maximumRowCount
protected int maximumRowCount
isEditable
protected boolean isEditable
itemListener
protected ItemListener itemListener
currentValueReminder
protected Object currentValueReminder
keySelectionManager
protected JComboBox. KeySelectionManager keySelectionManager
JComboBox
public JComboBox(ComboBoxDataModel aModel)
JComboBox
public JComboBox()
setUI
public void setUI(ComboBoxUI ui)
updateUI
public void updateUI()
- Overriden from JComponent to change the UI according to the default factory
- Overrides:
- updateUI in class JComponent
getUI
public ComboBoxUI getUI()
setModel
public void setModel(ComboBoxDataModel aModel)
getModel
public ComboBoxDataModel getModel()
setEditable
public void setEditable(boolean aFlag)
isEditable
public boolean isEditable()
setMaximumRowCount
public void setMaximumRowCount(int count)
getMaximumRowCount
public int getMaximumRowCount()
setRenderer
public void setRenderer(ListCellRenderer aRenderer)
getRenderer
public ListCellRenderer getRenderer()
setEditor
public void setEditor(ComboBoxEditor anEditor)
getEditor
public ComboBoxEditor getEditor()
setCurrentValue
public void setCurrentValue(Object anObject)
- Set the receiving JComboBox currentValue. If anObject is in the list of possible values,
the list will display anObject selected
getCurrentValue
public Object getCurrentValue()
setCurrentValueFromIndex
public void setCurrentValueFromIndex(int anIndex)
getCurrentValueIndex
public int getCurrentValueIndex()
addPossibleValue
public void addPossibleValue(Object anObject)
- Add a value in the list of possible values.
This method works only if the receiving JComboBox uses the default JComboBox data model.
JComboBox uses the default JComboBox data model when created with the empty constructor
and no other model has been set.
insertPossibleValue
public void insertPossibleValue(Object anObject,
int index)
- Insert a possible value at a given index
removePossibleValue
public void removePossibleValue(Object anObject)
- Remove a value in the list of possible values.
This method works only if the receiving JComboBox uses the default JComboBox data model.
JComboBox uses the default JComboBox data model when created with the empty constructor
and no other model has been set.
removePossibleValueAt
public void removePossibleValueAt(int anIndex)
- Remove the possible value given an index
removeAllPossibleValues
public void removeAllPossibleValues()
- Convenience to remove all possible values
This method works only if the receiving JComboBox uses the default JComboBox data model.
JComboBox uses the default JComboBox data model when created with the empty constructor
and no other model has been set.
addItemListener
public void addItemListener(ItemListener aListener)
- Add an ItemListener.
aListener
will receive an event when
the current value changes
removeItemListener
public void removeItemListener(ItemListener aListener)
- Remove an ItemListener
currentValueChanged
protected void currentValueChanged()
- This method is called when the current value changes. Its default implementation
notifies the item listeners
getSelectedObjects
public Object[] getSelectedObjects()
- Return an array containing the current value. This method is implemented for
ItemSelectable compatibility reasons.
actionPerformed
public void actionPerformed(ActionEvent e)
- This method is public as an implementation side effect.
do not call or override
contentsChanged
public void contentsChanged(ListDataEvent e)
- This method is public as an implementation side effect.
do not call or override
selectWithKeyChar
public boolean selectWithKeyChar(char keyChar)
intervalAdded
public void intervalAdded(ListDataEvent e)
intervalRemoved
public void intervalRemoved(ListDataEvent e)
setEnabled
public void setEnabled(boolean b)
- Overrides:
- setEnabled in class Component
configureCurrentValueEditor
public void configureCurrentValueEditor(ComboBoxEditor anEditor,
Object aValue)
isFocusTraversable
public boolean isFocusTraversable()
- Overrides:
- isFocusTraversable in class JComponent
setKeySelectionManager
public void setKeySelectionManager(JComboBox. KeySelectionManager aManager)
getKeySelectionManager
public JComboBox. KeySelectionManager getKeySelectionManager()
getPossibleValuesCount
public int getPossibleValuesCount()
- Accessing the model
getPossibleValueAt
public Object getPossibleValueAt(int index)
createDefaultKeySelectionManager
protected JComboBox. KeySelectionManager createDefaultKeySelectionManager()
isOpaque
public boolean isOpaque()
- Overrides:
- isOpaque in class JComponent
All Packages Class Hierarchy This Package Previous Next Index