mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -23,7 +23,6 @@ import com.intellij.util.ui.UpDownHandler;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.FocusAdapter;
|
||||
@@ -37,7 +36,7 @@ import java.util.Map;
|
||||
public class ComboBoxVisibilityPanel<V> extends VisibilityPanelBase<V> {
|
||||
private final JLabel myLabel;
|
||||
protected final JComboBox myComboBox;
|
||||
private final Map<V, String> myNamesMap = new HashMap<V, String>();
|
||||
private final Map<V, String> myNamesMap = new HashMap<>();
|
||||
|
||||
public ComboBoxVisibilityPanel(String name, V[] options, String[] presentableNames) {
|
||||
setLayout(new BorderLayout(0,2));
|
||||
@@ -70,7 +69,7 @@ public class ComboBoxVisibilityPanel<V> extends VisibilityPanelBase<V> {
|
||||
return new ListCellRendererWrapper() {
|
||||
@Override
|
||||
public void customize(JList list, Object value, int index, boolean selected, boolean hasFocus) {
|
||||
setText(myNamesMap.get((V)value));
|
||||
setText(myNamesMap.get(value));
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -119,11 +118,6 @@ public class ComboBoxVisibilityPanel<V> extends VisibilityPanelBase<V> {
|
||||
return (V)myComboBox.getSelectedItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addListener(ChangeListener listener) {
|
||||
myEventDispatcher.addListener(listener);
|
||||
}
|
||||
|
||||
public final void registerUpDownActionsFor(JComponent input) {
|
||||
UpDownHandler.register(input, myComboBox);
|
||||
}
|
||||
|
||||
@@ -250,6 +250,7 @@ public class NameSuggestionsField extends JPanel {
|
||||
}
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
public interface DataChanged extends EventListener {
|
||||
void dataChanged();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user