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

Variable Index

 o currentValueReminder
 o dataModel
 o editor
 o fallbackUI
 o isEditable
 o itemListener
 o keySelectionManager
 o maximumRowCount
 o renderer

Constructor Index

 o JComboBox()
 o JComboBox(ComboBoxDataModel)

Method Index

 o actionPerformed(ActionEvent)
This method is public as an implementation side effect.
 o addItemListener(ItemListener)
Add an ItemListener.
 o addPossibleValue(Object)
Add a value in the list of possible values.
 o configureCurrentValueEditor(ComboBoxEditor, Object)
 o contentsChanged(ListDataEvent)
This method is public as an implementation side effect.
 o createDefaultKeySelectionManager()
 o currentValueChanged()
This method is called when the current value changes.
 o getCurrentValue()
 o getCurrentValueIndex()
 o getEditor()
 o getKeySelectionManager()
 o getMaximumRowCount()
 o getModel()
 o getPossibleValueAt(int)
 o getPossibleValuesCount()
Accessing the model
 o getRenderer()
 o getSelectedObjects()
Return an array containing the current value.
 o getUI()
 o insertPossibleValue(Object, int)
Insert a possible value at a given index
 o intervalAdded(ListDataEvent)
 o intervalRemoved(ListDataEvent)
 o isEditable()
 o isFocusTraversable()
 o isOpaque()
 o removeAllPossibleValues()
Convenience to remove all possible values This method works only if the receiving JComboBox uses the default JComboBox data model.
 o removeItemListener(ItemListener)
Remove an ItemListener
 o removePossibleValue(Object)
Remove a value in the list of possible values.
 o removePossibleValueAt(int)
Remove the possible value given an index
 o selectWithKeyChar(char)
 o setCurrentValue(Object)
Set the receiving JComboBox currentValue.
 o setCurrentValueFromIndex(int)
 o setEditable(boolean)
 o setEditor(ComboBoxEditor)
 o setEnabled(boolean)
 o setKeySelectionManager(JComboBox. KeySelectionManager)
 o setMaximumRowCount(int)
 o setModel(ComboBoxDataModel)
 o setRenderer(ListCellRenderer)
 o setUI(ComboBoxUI)
 o updateUI()
Overriden from JComponent to change the UI according to the default factory

Variables

 o fallbackUI
 protected static String fallbackUI
 o dataModel
 protected ComboBoxDataModel dataModel
 o renderer
 protected ListCellRenderer renderer
 o editor
 protected ComboBoxEditor editor
 o maximumRowCount
 protected int maximumRowCount
 o isEditable
 protected boolean isEditable
 o itemListener
 protected ItemListener itemListener
 o currentValueReminder
 protected Object currentValueReminder
 o keySelectionManager
 protected JComboBox. KeySelectionManager keySelectionManager

Constructors

 o JComboBox
 public JComboBox(ComboBoxDataModel aModel)
 o JComboBox
 public JComboBox()

Methods

 o setUI
 public void setUI(ComboBoxUI ui)
 o updateUI
 public void updateUI()
Overriden from JComponent to change the UI according to the default factory

Overrides:
updateUI in class JComponent
 o getUI
 public ComboBoxUI getUI()
 o setModel
 public void setModel(ComboBoxDataModel aModel)
 o getModel
 public ComboBoxDataModel getModel()
 o setEditable
 public void setEditable(boolean aFlag)
 o isEditable
 public boolean isEditable()
 o setMaximumRowCount
 public void setMaximumRowCount(int count)
 o getMaximumRowCount
 public int getMaximumRowCount()
 o setRenderer
 public void setRenderer(ListCellRenderer aRenderer)
 o getRenderer
 public ListCellRenderer getRenderer()
 o setEditor
 public void setEditor(ComboBoxEditor anEditor)
 o getEditor
 public ComboBoxEditor getEditor()
 o 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

 o getCurrentValue
 public Object getCurrentValue()
 o setCurrentValueFromIndex
 public void setCurrentValueFromIndex(int anIndex)
 o getCurrentValueIndex
 public int getCurrentValueIndex()
 o 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.

 o insertPossibleValue
 public void insertPossibleValue(Object anObject,
                                 int index)
Insert a possible value at a given index

 o 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.

 o removePossibleValueAt
 public void removePossibleValueAt(int anIndex)
Remove the possible value given an index

 o 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.

 o addItemListener
 public void addItemListener(ItemListener aListener)
Add an ItemListener. aListener will receive an event when the current value changes

 o removeItemListener
 public void removeItemListener(ItemListener aListener)
Remove an ItemListener

 o currentValueChanged
 protected void currentValueChanged()
This method is called when the current value changes. Its default implementation notifies the item listeners

 o getSelectedObjects
 public Object[] getSelectedObjects()
Return an array containing the current value. This method is implemented for ItemSelectable compatibility reasons.

 o actionPerformed
 public void actionPerformed(ActionEvent e)
This method is public as an implementation side effect. do not call or override

 o contentsChanged
 public void contentsChanged(ListDataEvent e)
This method is public as an implementation side effect. do not call or override

 o selectWithKeyChar
 public boolean selectWithKeyChar(char keyChar)
 o intervalAdded
 public void intervalAdded(ListDataEvent e)
 o intervalRemoved
 public void intervalRemoved(ListDataEvent e)
 o setEnabled
 public void setEnabled(boolean b)
Overrides:
setEnabled in class Component
 o configureCurrentValueEditor
 public void configureCurrentValueEditor(ComboBoxEditor anEditor,
                                         Object aValue)
 o isFocusTraversable
 public boolean isFocusTraversable()
Overrides:
isFocusTraversable in class JComponent
 o setKeySelectionManager
 public void setKeySelectionManager(JComboBox. KeySelectionManager aManager)
 o getKeySelectionManager
 public JComboBox. KeySelectionManager getKeySelectionManager()
 o getPossibleValuesCount
 public int getPossibleValuesCount()
Accessing the model

 o getPossibleValueAt
 public Object getPossibleValueAt(int index)
 o createDefaultKeySelectionManager
 protected JComboBox. KeySelectionManager createDefaultKeySelectionManager()
 o isOpaque
 public boolean isOpaque()
Overrides:
isOpaque in class JComponent

All Packages  Class Hierarchy  This Package  Previous  Next  Index