mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-47180: combobox: install key listener for custom editors
Previously, key listeners were installed for default editors only. And unregistered if combobox.setEditor(myEditor) was called. (cherry picked from commit d2e805ed4ce83d6a38323dcd3dc9b2ebe1bfec67) GitOrigin-RevId: 8fec1dc06ebea24f477c0fe318d1c3bc880d876b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e26683f4e9
commit
94d548f7ff
+1
-1
@@ -358,7 +358,6 @@ public class DarculaComboBoxUI extends BasicComboBoxUI implements Border, ErrorB
|
||||
tf.setColumns(0);
|
||||
}
|
||||
|
||||
installEditorKeyListener(comboBoxEditor);
|
||||
return comboBoxEditor;
|
||||
}
|
||||
|
||||
@@ -509,6 +508,7 @@ public class DarculaComboBoxUI extends BasicComboBoxUI implements Border, ErrorB
|
||||
protected void configureEditor() {
|
||||
super.configureEditor();
|
||||
|
||||
installEditorKeyListener(comboBox.getEditor());
|
||||
if (editor instanceof JComponent) {
|
||||
JComponent jEditor = (JComponent)editor;
|
||||
jEditor.setOpaque(false);
|
||||
|
||||
+1
-1
@@ -334,7 +334,6 @@ public class WinIntelliJComboBoxUI extends DarculaComboBoxUI {
|
||||
}
|
||||
};
|
||||
|
||||
installEditorKeyListener(comboBoxEditor);
|
||||
return comboBoxEditor;
|
||||
}
|
||||
|
||||
@@ -342,6 +341,7 @@ public class WinIntelliJComboBoxUI extends DarculaComboBoxUI {
|
||||
protected void configureEditor() {
|
||||
super.configureEditor();
|
||||
|
||||
installEditorKeyListener(comboBox.getEditor());
|
||||
if (editor instanceof JComponent) {
|
||||
JComponent jEditor = (JComponent)editor;
|
||||
jEditor.setBorder(DEFAULT_EDITOR_BORDER);
|
||||
|
||||
Reference in New Issue
Block a user