javax.swing.plaf.basic
public class BasicComboBoxEditor extends Object implements ComboBoxEditor, FocusListener
Nested Class Summary | |
---|---|
static class | BasicComboBoxEditor.UIResource
A subclass of {@link BasicComboBoxEditor} that implements the
{@link UIResource} interface. |
Field Summary | |
---|---|
protected JTextField | editor The editor component. |
Constructor Summary | |
---|---|
BasicComboBoxEditor()
Creates a new BasicComboBoxEditor instance. |
Method Summary | |
---|---|
void | addActionListener(ActionListener l)
Adds an {@link ActionListener} to the editor component. |
void | focusGained(FocusEvent e)
This method is called when textfield gains focus. |
void | focusLost(FocusEvent e)
This method is called when textfield loses focus. |
Component | getEditorComponent()
Returns the component that will be used by the combo box to display and
edit the currently selected item in the combo box.
|
Object | getItem()
Returns the text from the editor component.
|
void | removeActionListener(ActionListener l)
Removes the {@link ActionListener} from the editor component.
|
void | selectAll()
Selects all the text in the editor component. |
void | setItem(Object item)
Sets item that should be edited when any editing operation is performed
by the user. |
BasicComboBoxEditor
instance.Parameters: l the ActionListener responsible for changing selected item of the combo box when it is editted by the user.
Parameters: e the FocusEvent describing change in focus.
Parameters: e the FocusEvent describing change in focus
Returns: The editor component, which is a {@link JTextField} in this case.
Returns: The text from the editor component.
Parameters: l the listener to remove.
Parameters: item item that is currently selected in the combo box