| GNU Classpath (0.95) | |
| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectjava.awt.Componentjava.awt.Containerjavax.swing.JComponentjavax.swing.JComboBoxpublic class JComboBoxextends JComponentimplements ItemSelectable, ListDataListener, ActionListener, AccessibleNested Class Summary | |
protected class |
|
static interface |
|
Nested classes/interfaces inherited from class javax.swing.JComponent | |
JComponent.AccessibleJComponent | |
Nested classes/interfaces inherited from class java.awt.Container | |
Container.AccessibleAWTContainer | |
Nested classes/interfaces inherited from class java.awt.Component | |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy | |
Field Summary | |
protected String |
|
protected ComboBoxModel |
|
protected ComboBoxEditor |
|
protected boolean |
|
protected JComboBox.KeySelectionManager |
|
protected boolean |
|
protected int |
|
protected ListCellRenderer |
|
protected Object |
|
Fields inherited from class javax.swing.JComponent | |
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, accessibleContext, listenerList, ui | |
Fields inherited from class java.awt.Component | |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT | |
Fields inherited from interface java.awt.image.ImageObserver | |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH | |
Constructor Summary | |
| |
| |
| |
Method Summary | |
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
protected void |
|
void |
|
protected PropertyChangeListener |
|
protected JComboBox.KeySelectionManager |
|
protected void |
|
protected void |
|
void |
|
void |
|
void |
|
AccessibleContext |
|
Action |
|
String |
|
ActionListener[] |
|
ComboBoxEditor |
|
Object |
|
int |
|
ItemListener[] |
|
JComboBox.KeySelectionManager |
|
int |
|
ComboBoxModel |
|
PopupMenuListener[] |
|
Object |
|
ListCellRenderer |
|
int |
|
Object |
|
Object[] |
|
ComboBoxUI |
|
String |
|
void |
|
void |
|
protected void | |
void |
|
void |
|
boolean |
|
boolean |
|
boolean |
|
protected String |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
boolean |
|
protected void |
|
void | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class java.lang.Object | |
clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait | |
protected String actionCommand
This actionCommand is used in ActionEvent that is fired to JComboBox's ActionListeneres.
protected ComboBoxModel dataModel
Data model used by JComboBox to keep track of its list data and currently selected element in the list.
protected ComboBoxEditor editor
Editor that is responsible for editing an object in a combo box list.
protected boolean isEditable
This field indicates if textfield of this JComboBox is editable or not.
protected boolean lightWeightPopupEnabled
This property indicates if heavyweight popup or lightweight popup will be used to diplay JComboBox's elements.
protected int maximumRowCount
Number of rows that will be visible in the JComboBox's popup.
protected ListCellRenderer renderer
Renderer renders(paints) every object in the combo box list in its associated list cell. This ListCellRenderer is used only when this JComboBox is uneditable.
protected Object selectedItemReminder
This field is reference to the current selection of the combo box.
public JComboBox()
Constructor. Creates new empty JComboBox. ComboBox's data model is set to DefaultComboBoxModel.
public JComboBox(Vector> itemVector)
Constructs JComboBox object with specified list of items.
- Parameters:
itemVector- vector containing list of items for this JComboBox.
public JComboBox(Object[] itemArray)
Constructs JComboBox with specified list of items.
- Parameters:
itemArray- array containing list of items for this JComboBox
public JComboBox(ComboBoxModel model)
Constructs JComboBox object with specified data model for it. Note that the JComboBox will not change the value that is preselected by your ComboBoxModel implementation.
- Parameters:
model- Data model that will be used by this JComboBox to keep track of its list of items.
public void actionPerformed(ActionEvent e)
This method handles actionEvents fired by the ComboBoxEditor. It changes this JComboBox's selection to the new value currently in the editor and hides list of combo box items.
- Specified by:
- actionPerformed in interface ActionListener
- Parameters:
e- the ActionEvent
public void addActionListener(ActionListener listener)
This methods adds specified ActionListener to this JComboBox.
- Parameters:
listener- to add
public void addItem(Object element)
This method adds given element to this JComboBox. ARuntimeExceptionis thrown if the data model is not an instance ofMutableComboBoxModel.
- Parameters:
element- element to add
public void addItemListener(ItemListener listener)
This method registers given ItemListener with this JComboBox
- Specified by:
- addItemListener in interface ItemSelectable
- Parameters:
listener- to remove
public void addPopupMenuListener(PopupMenuListener listener)
Adds PopupMenuListener to combo box to listen to the events fired by the combo box's popup menu containing its list of items
- Parameters:
listener- to add
public void configureEditor(ComboBoxEditor anEditor, Object anItem)
This method initializes specified ComboBoxEditor to display given item.
- Parameters:
anEditor- ComboBoxEditor to initializeanItem- Item that should displayed in the specified editor
protected void configurePropertiesFromAction(Action a)
Configure properties of the JComboBox by reading properties of specified action. This method always sets the comboBox's "enabled" property to the value of the Action's "enabled" property.
- Parameters:
a- An Action to configure the combo box from
public void contentsChanged(ListDataEvent event)
The part of implementation of ListDataListener interface. This method is invoked when contents of the JComboBox's data model changed.
- Specified by:
- contentsChanged in interface ListDataListener
- Parameters:
event- ListDataEvent describing the change
protected PropertyChangeListener createActionPropertyChangeListener(Action action)
Creates PropertyChangeListener to listen for the changes in comboBox's action properties.
- Parameters:
action- action to listen to for property changes
- Returns:
- a PropertyChangeListener that listens to changes in action properties.