Search in sources :

Example 1 with FixedComboBoxEditor

use of com.intellij.openapi.ui.FixedComboBoxEditor in project android by JetBrains.

the class KeyValuePane method createComboBox.

private ComboBox createComboBox(boolean editable) {
    ComboBox comboBox = new ComboBox();
    comboBox.addItemListener(this);
    comboBox.setEditor(new FixedComboBoxEditor());
    comboBox.setEditable(true);
    // Default is only 20 chars
    comboBox.setMinLength(60);
    JBTextField editorComponent = (JBTextField) comboBox.getEditor().getEditorComponent();
    editorComponent.setEditable(editable);
    editorComponent.getDocument().addDocumentListener(this);
    return comboBox;
}
Also used : ComboBox(com.intellij.openapi.ui.ComboBox) JBTextField(com.intellij.ui.components.JBTextField) FixedComboBoxEditor(com.intellij.openapi.ui.FixedComboBoxEditor)

Aggregations

ComboBox (com.intellij.openapi.ui.ComboBox)1 FixedComboBoxEditor (com.intellij.openapi.ui.FixedComboBoxEditor)1 JBTextField (com.intellij.ui.components.JBTextField)1