From 2b1c47e8a437529c13b3097292bfd7a3dd881809 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Tue, 26 Jul 2016 15:23:48 +0200 Subject: [PATCH] cleanup --- .../application/options/colors/SchemesPanel.java | 9 ++++----- .../src/com/intellij/openapi/ui/ComboBox.java | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/application/options/colors/SchemesPanel.java b/platform/lang-impl/src/com/intellij/application/options/colors/SchemesPanel.java index 1564986dd269..1d33a3f8a016 100644 --- a/platform/lang-impl/src/com/intellij/application/options/colors/SchemesPanel.java +++ b/platform/lang-impl/src/com/intellij/application/options/colors/SchemesPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,9 +30,9 @@ import com.intellij.openapi.options.SchemeImportUtil; import com.intellij.openapi.options.SchemeImporter; import com.intellij.openapi.options.SchemeImporterEP; import com.intellij.openapi.project.DefaultProjectFactory; +import com.intellij.openapi.ui.ComboBox; import com.intellij.openapi.ui.MessageType; import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.util.Consumer; import com.intellij.util.EventDispatcher; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.ui.JBInsets; @@ -47,7 +47,7 @@ import java.util.List; public class SchemesPanel extends JPanel implements SkipSelfSearchComponent { private final ColorAndFontOptions myOptions; - private JComboBox mySchemeComboBox; + private ComboBox mySchemeComboBox; private JButton myDeleteButton; private JButton myImportButton; @@ -55,7 +55,6 @@ public class SchemesPanel extends JPanel implements SkipSelfSearchComponent { private final EventDispatcher myDispatcher = EventDispatcher.create(ColorAndFontSettingsListener.class); - public SchemesPanel(ColorAndFontOptions options) { super(new BorderLayout()); myOptions = options; @@ -98,7 +97,7 @@ public class SchemesPanel extends JPanel implements SkipSelfSearchComponent { new GridBagConstraints(gridx++, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new JBInsets(0, 0, 5, 5), 0, 0)); - mySchemeComboBox = new JComboBox(); + mySchemeComboBox = new ComboBox(); panel.add(mySchemeComboBox, new GridBagConstraints(gridx++, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new JBInsets(0, 0, 5, 10), 0, 0)); diff --git a/platform/platform-api/src/com/intellij/openapi/ui/ComboBox.java b/platform/platform-api/src/com/intellij/openapi/ui/ComboBox.java index b31e5fcf549f..74b3e8930fb6 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/ComboBox.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/ComboBox.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -110,9 +110,9 @@ public class ComboBox extends ComboBoxWithWidePopup implements AWTEventLis final Object value = list.getSelectedValue(); if (value != null) { configureEditor(getEditor(), value); - IdeFocusManager.getGlobalInstance().requestFocus(ComboBox.this, true); + IdeFocusManager.getGlobalInstance().requestFocus(this, true); assert myJBPopup != null; - ComboBox.this.getUI().setPopupVisible(ComboBox.this, false); + this.getUI().setPopupVisible(this, false); myJBPopup.cancel(); } })