FocusListener, EventListener, ComboBoxEditor
BasicComboBoxEditor.UIResource, MetalComboBoxEditor
public class BasicComboBoxEditor extends Object implements ComboBoxEditor, FocusListener
| Modifier and Type | Class | Description | 
|---|---|---|
| static class  | BasicComboBoxEditor.UIResource | A subclass of BasicComboBoxEditor that implements UIResource. | 
| Modifier and Type | Field | Description | 
|---|---|---|
| protected JTextField | editor | An instance of  JTextField. | 
| Constructor | Description | 
|---|---|
| BasicComboBoxEditor() | Constructs a new instance of  BasicComboBoxEditor. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| void | addActionListener | Add an ActionListener. | 
| protected JTextField | createEditorComponent() | Creates the internal editor component. | 
| void | focusGained | Invoked when a component gains the keyboard focus. | 
| void | focusLost | Invoked when a component loses the keyboard focus. | 
| Component | getEditorComponent() | Returns the component that should be added to the tree hierarchy for this editor | 
| Object | getItem() | Returns the edited item | 
| void | removeActionListener | Remove an ActionListener | 
| void | selectAll() | Ask the editor to start editing and to select everything | 
| void | setItem | Sets the item that should be edited. | 
protected JTextField editor
JTextField.public BasicComboBoxEditor()
BasicComboBoxEditor.public Component getEditorComponent()
ComboBoxEditorgetEditorComponent in interface ComboBoxEditor
protected JTextField createEditorComponent()
public void setItem(Object anObject)
setItem in interface ComboBoxEditor
anObject - the displayed value of the editorpublic Object getItem()
ComboBoxEditorgetItem in interface ComboBoxEditor
public void selectAll()
ComboBoxEditorselectAll in interface ComboBoxEditor
public void focusGained(FocusEvent e)
FocusListenerfocusGained in interface FocusListener
e - the event to be processedpublic void focusLost(FocusEvent e)
FocusListenerfocusLost in interface FocusListener
e - the event to be processedpublic void addActionListener(ActionListener l)
ComboBoxEditoraddActionListener in interface ComboBoxEditor
l - an ActionListener
public void removeActionListener(ActionListener l)
ComboBoxEditorremoveActionListener in interface ComboBoxEditor
l - an ActionListener
    © 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
    https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/plaf/basic/BasicComboBoxEditor.html