com.intellij.ui.EditorComboBoxRenderer Java Examples
The following examples show how to use
com.intellij.ui.EditorComboBoxRenderer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CSharpIntroduceDialog.java From consulo-csharp with Apache License 2.0 | 6 votes |
private void setUpNameComboBox(Collection<String> possibleNames) { final EditorComboBoxEditor comboEditor = new StringComboboxEditor(myProject, CSharpFileType.INSTANCE, myNameComboBox); myNameComboBox.setEditor(comboEditor); myNameComboBox.setRenderer(new EditorComboBoxRenderer(comboEditor)); myNameComboBox.setEditable(true); myNameComboBox.setMaximumRowCount(8); myContentPane.registerKeyboardAction(new ActionListener() { public void actionPerformed(ActionEvent e) { myNameComboBox.requestFocus(); } }, KeyStroke.getKeyStroke(KeyEvent.VK_N, KeyEvent.ALT_MASK), JComponent.WHEN_IN_FOCUSED_WINDOW); for (String possibleName : possibleNames) { myNameComboBox.addItem(possibleName); } }
Example #2
Source File: HaxeIntroduceDialog.java From intellij-haxe with Apache License 2.0 | 6 votes |
private void setUpNameComboBox(Collection<String> possibleNames) { final EditorComboBoxEditor comboEditor = new StringComboboxEditor(myProject, HaxeFileType.HAXE_FILE_TYPE, myNameComboBox); myNameComboBox.setEditor(comboEditor); myNameComboBox.setRenderer(new EditorComboBoxRenderer(comboEditor)); myNameComboBox.setEditable(true); myNameComboBox.setMaximumRowCount(8); myContentPane.registerKeyboardAction(new ActionListener() { public void actionPerformed(ActionEvent e) { myNameComboBox.requestFocus(); } }, KeyStroke.getKeyStroke(KeyEvent.VK_N, KeyEvent.ALT_MASK), JComponent.WHEN_IN_FOCUSED_WINDOW); for (String possibleName : possibleNames) { myNameComboBox.addItem(possibleName); } }
Example #3
Source File: NameSuggestionsField.java From consulo with Apache License 2.0 | 6 votes |
private void setupComboBox(final ComboBox combobox, FileType fileType) { final EditorComboBoxEditor comboEditor = new StringComboboxEditor(myProject, fileType, combobox) { @Override public void setItem(Object anObject) { myNonHumanChange = true; super.setItem(anObject); } }; combobox.setEditor(comboEditor); combobox.setRenderer(new EditorComboBoxRenderer(comboEditor)); combobox.setEditable(true); combobox.setMaximumRowCount(8); comboEditor.selectAll(); }
Example #4
Source File: XDebuggerExpressionComboBox.java From consulo with Apache License 2.0 | 5 votes |
private void initEditor() { myEditor = new XDebuggerComboBoxEditor(); myComboBox.setEditor(myEditor); //myEditor.setItem(myExpression); myComboBox.setRenderer(new EditorComboBoxRenderer(myEditor)); myComboBox.setMaximumRowCount(XDebuggerHistoryManager.MAX_RECENT_EXPRESSIONS); }