mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
filter component: avoid deprecated api
GitOrigin-RevId: 210fed10276364c0fff23060e2f1fd9a5095c0f1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8409c605ff
commit
dee1374b40
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.ui;
|
||||
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
@@ -16,7 +16,7 @@ import java.awt.event.KeyEvent;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class FilterComponent extends JPanel {
|
||||
private final SearchTextFieldWithStoredHistory myFilter;
|
||||
private final SearchTextField myFilter;
|
||||
private final Alarm myUpdateAlarm = new Alarm();
|
||||
private final boolean myOnTheFly;
|
||||
|
||||
@@ -27,7 +27,7 @@ public abstract class FilterComponent extends JPanel {
|
||||
public FilterComponent(@NonNls String propertyName, int historySize, boolean onTheFlyUpdate) {
|
||||
super(new BorderLayout());
|
||||
myOnTheFly = onTheFlyUpdate;
|
||||
myFilter = new SearchTextFieldWithStoredHistory(propertyName) {
|
||||
myFilter = new SearchTextField(propertyName) {
|
||||
@Override
|
||||
protected Runnable createItemChosenCallback(JList list) {
|
||||
final Runnable callback = super.createItemChosenCallback(list);
|
||||
@@ -41,12 +41,6 @@ public abstract class FilterComponent extends JPanel {
|
||||
protected Component getPopupLocationComponent() {
|
||||
return FilterComponent.this.getPopupLocationComponent();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFocusLost() {
|
||||
addCurrentTextToHistory();
|
||||
super.onFocusLost();
|
||||
}
|
||||
};
|
||||
myFilter.getTextEditor().addKeyListener(new KeyAdapter() {
|
||||
//to consume enter in combo box - do not process this event by default button from DialogWrapper
|
||||
|
||||
Reference in New Issue
Block a user