java.lang.Object
javax.swing.plaf.basic.BasicComboBoxEditor
- All Implemented Interfaces:
FocusListener,EventListener,ComboBoxEditor
- Direct Known Subclasses:
BasicComboBoxEditor.UIResource,MetalComboBoxEditor
The default editor for editable combo boxes. The editor is implemented as a JTextField.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA subclass of BasicComboBoxEditor that implements UIResource. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JTextFieldCreates the internal editor component.voidSets the item that should be edited.Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface javax.swing.ComboBoxEditor
addActionListener, getEditorComponent, getItem, removeActionListener, selectAllMethods declared in interface java.awt.event.FocusListener
focusGained, focusLost
-
Field Details
-
editor
An instance ofJTextField.
-
-
Constructor Details
-
BasicComboBoxEditor
public BasicComboBoxEditor()Constructs a new instance ofBasicComboBoxEditor.
-
-
Method Details
-
createEditorComponent
Creates the internal editor component. Override this to provide a custom implementation.- Returns:
- a new editor component
- Since:
- 1.6
-
setItem
Sets the item that should be edited.- Specified by:
setItemin interfaceComboBoxEditor- Parameters:
anObject- the displayed value of the editor
-