Example usage for com.intellij.openapi.ui FixedComboBoxEditor FixedComboBoxEditor

List of usage examples for com.intellij.openapi.ui FixedComboBoxEditor FixedComboBoxEditor

Introduction

In this page you can find the example usage for com.intellij.openapi.ui FixedComboBoxEditor FixedComboBoxEditor.

Prototype

FixedComboBoxEditor

Source Link

Usage

From source file:com.android.tools.idea.gradle.structure.editors.KeyValuePane.java

License:Apache License

private ComboBox createComboBox(boolean editable) {
    ComboBox comboBox = new ComboBox();
    comboBox.addItemListener(this);
    comboBox.setEditor(new FixedComboBoxEditor());
    comboBox.setEditable(true);/*  w  ww  .j a va 2s . c om*/
    comboBox.setMinLength(60); // Default is only 20 chars
    JBTextField editorComponent = (JBTextField) comboBox.getEditor().getEditorComponent();
    editorComponent.setEditable(editable);
    editorComponent.getDocument().addDocumentListener(this);
    return comboBox;
}