public class BasicComboBoxEditor extends Object implements ComboBoxEditor, FocusListener
Modifier and Type | Class and Description |
---|---|
static class |
BasicComboBoxEditor.UIResource
basiccomboboxeditor uiresource子类实现的。
|
Modifier and Type | Field and Description |
---|---|
protected JTextField |
editor |
Constructor and Description |
---|
BasicComboBoxEditor() |
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(ActionListener l)
添加一个ActionListener。
|
protected JTextField |
createEditorComponent()
创建内部编辑器组件。
|
void |
focusGained(FocusEvent e)
当一个组件获取键盘焦点时调用。
|
void |
focusLost(FocusEvent e)
当一个组件丢失键盘焦点时调用。
|
Component |
getEditorComponent()
返回此编辑器应添加到树层次结构的组件
|
Object |
getItem()
返回已编辑的项目
|
void |
removeActionListener(ActionListener l)
删除一个ActionListener
|
void |
selectAll()
要求编辑开始编辑,并选择一切
|
void |
setItem(Object anObject)
设置要编辑的项目。
|
protected JTextField editor
public Component getEditorComponent()
ComboBoxEditor
getEditorComponent
接口
ComboBoxEditor
protected JTextField createEditorComponent()
public void setItem(Object anObject)
setItem
接口
ComboBoxEditor
anObject
-编辑显示值
public Object getItem()
ComboBoxEditor
getItem
接口
ComboBoxEditor
public void selectAll()
ComboBoxEditor
selectAll
接口
ComboBoxEditor
public void focusGained(FocusEvent e)
FocusListener
focusGained
接口
FocusListener
public void focusLost(FocusEvent e)
FocusListener
focusLost
接口
FocusListener
public void addActionListener(ActionListener l)
ComboBoxEditor
addActionListener
接口
ComboBoxEditor
public void removeActionListener(ActionListener l)
ComboBoxEditor
removeActionListener
接口
ComboBoxEditor
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.