Search in sources :

Example 1 with FQNameCellRenderer

use of com.intellij.ide.util.FQNameCellRenderer in project intellij-community by JetBrains.

the class RestoreReferencesDialog method createCenterPanel.

@Override
protected JComponent createCenterPanel() {
    final JPanel panel = new JPanel(new BorderLayout(UIUtil.DEFAULT_HGAP, UIUtil.DEFAULT_VGAP));
    myList = new JBList(myNamedElements);
    myList.setCellRenderer(new FQNameCellRenderer());
    panel.add(ScrollPaneFactory.createScrollPane(myList), BorderLayout.CENTER);
    panel.add(new JBLabel(myContainsClassesOnly ? CodeInsightBundle.message("dialog.paste.on.import.text") : CodeInsightBundle.message("dialog.paste.on.import.text2"), SMALL, BRIGHTER), BorderLayout.NORTH);
    final JPanel buttonPanel = new JPanel(new VerticalFlowLayout());
    final JButton okButton = new JButton(CommonBundle.getOkButtonText());
    getRootPane().setDefaultButton(okButton);
    buttonPanel.add(okButton);
    final JButton cancelButton = new JButton(CommonBundle.getCancelButtonText());
    buttonPanel.add(cancelButton);
    panel.setPreferredSize(JBUI.size(500, 400));
    return panel;
}
Also used : JBLabel(com.intellij.ui.components.JBLabel) JBList(com.intellij.ui.components.JBList) FQNameCellRenderer(com.intellij.ide.util.FQNameCellRenderer) VerticalFlowLayout(com.intellij.openapi.ui.VerticalFlowLayout)

Aggregations

FQNameCellRenderer (com.intellij.ide.util.FQNameCellRenderer)1 VerticalFlowLayout (com.intellij.openapi.ui.VerticalFlowLayout)1 JBLabel (com.intellij.ui.components.JBLabel)1 JBList (com.intellij.ui.components.JBList)1