Search in sources :

Example 11 with MultiLineLabelUI

use of com.intellij.openapi.ui.MultiLineLabelUI in project intellij-community by JetBrains.

the class GenerateAntBuildDialog method initChunksPanel.

private void initChunksPanel() {
    List<Chunk<Module>> chunks = getCycleChunks();
    if (chunks.isEmpty()) {
        return;
    }
    myChunksPanel.setLayout(new BorderLayout());
    myChunksPanel.setBorder(IdeBorderFactory.createTitledBorder(CompilerBundle.message("generate.ant.build.dialog.cyclic.modules.table.title"), true));
    JLabel textLabel = new JLabel(CompilerBundle.message("generate.ant.build.dialog.cyclic.modules.table.description"));
    textLabel.setUI(new MultiLineLabelUI());
    textLabel.setBorder(IdeBorderFactory.createEmptyBorder(4, 4, 6, 4));
    myChunksPanel.add(textLabel, BorderLayout.NORTH);
    myTableModel = new MyTableModel(chunks);
    myTable = new Table(myTableModel);
    final MyTableCellRenderer cellRenderer = new MyTableCellRenderer();
    final TableColumn nameColumn = myTable.getColumnModel().getColumn(MyTableModel.NAME_COLUMN);
    nameColumn.setCellEditor(ComboBoxTableCellEditor.INSTANCE);
    nameColumn.setCellRenderer(cellRenderer);
    final TableColumn labelColumn = myTable.getColumnModel().getColumn(MyTableModel.NUMBER_COLUMN);
    labelColumn.setCellRenderer(cellRenderer);
    final Dimension preferredSize = new Dimension(myTable.getPreferredSize());
    preferredSize.height = (myTableModel.getRowCount() + 2) * myTable.getRowHeight() + myTable.getTableHeader().getHeight();
    final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTable);
    scrollPane.setPreferredSize(preferredSize);
    myChunksPanel.add(scrollPane, BorderLayout.CENTER);
}
Also used : MultiLineLabelUI(com.intellij.openapi.ui.MultiLineLabelUI) Table(com.intellij.util.ui.Table) Chunk(com.intellij.util.Chunk) TableColumn(javax.swing.table.TableColumn)

Example 12 with MultiLineLabelUI

use of com.intellij.openapi.ui.MultiLineLabelUI in project intellij-community by JetBrains.

the class RunHotswapDialog method createNorthPanel.

protected JComponent createNorthPanel() {
    JLabel label = new JLabel(DebuggerBundle.message("hotswap.dialog.run.prompt"));
    JPanel panel = new JPanel(new BorderLayout());
    panel.add(label, BorderLayout.CENTER);
    Icon icon = UIUtil.getQuestionIcon();
    label.setIcon(icon);
    label.setIconTextGap(7);
    if (myDisplayHangWarning) {
        final JLabel warningLabel = new JLabel("WARNING! " + DebuggerBundle.message("hotswap.dialog.hang.warning"));
        warningLabel.setUI(new MultiLineLabelUI());
        panel.add(warningLabel, BorderLayout.SOUTH);
    }
    return panel;
}
Also used : MultiLineLabelUI(com.intellij.openapi.ui.MultiLineLabelUI)

Example 13 with MultiLineLabelUI

use of com.intellij.openapi.ui.MultiLineLabelUI in project intellij-community by JetBrains.

the class AbstractSelectFilesDialog method createPromptLabel.

@Nullable
private JLabel createPromptLabel() {
    if (myPrompt != null) {
        final JLabel label = new JLabel(myPrompt);
        label.setUI(new MultiLineLabelUI());
        label.setBorder(new EmptyBorder(5, 1, 5, 1));
        return label;
    }
    return null;
}
Also used : MultiLineLabelUI(com.intellij.openapi.ui.MultiLineLabelUI) EmptyBorder(javax.swing.border.EmptyBorder) Nullable(org.jetbrains.annotations.Nullable)

Example 14 with MultiLineLabelUI

use of com.intellij.openapi.ui.MultiLineLabelUI in project intellij-community by JetBrains.

the class ChangelistMoveOfferDialog method createCenterPanel.

protected JComponent createCenterPanel() {
    final JPanel panel = new JPanel(new BorderLayout());
    final JLabel label = new JLabel(VcsBundle.message("changes.commit.partial.offer.to.move.text"));
    label.setUI(new MultiLineLabelUI());
    label.setIconTextGap(10);
    label.setIcon(Messages.getQuestionIcon());
    panel.add(label, BorderLayout.CENTER);
    panel.add(Box.createVerticalStrut(10), BorderLayout.SOUTH);
    return panel;
}
Also used : MultiLineLabelUI(com.intellij.openapi.ui.MultiLineLabelUI)

Example 15 with MultiLineLabelUI

use of com.intellij.openapi.ui.MultiLineLabelUI in project intellij-community by JetBrains.

the class OptionsMessageDialog method createNorthPanel.

protected JComponent createNorthPanel() {
    JPanel panel = new JPanel(new BorderLayout(15, 0));
    if (myIcon != null) {
        JLabel iconLabel = new JLabel(myIcon);
        Container container = new Container();
        container.setLayout(new BorderLayout());
        container.add(iconLabel, BorderLayout.NORTH);
        panel.add(container, BorderLayout.WEST);
    }
    if (myMessage != null) {
        JLabel textLabel = new JLabel(myMessage);
        textLabel.setUI(new MultiLineLabelUI());
        panel.add(textLabel, BorderLayout.CENTER);
    }
    return panel;
}
Also used : MultiLineLabelUI(com.intellij.openapi.ui.MultiLineLabelUI)

Aggregations

MultiLineLabelUI (com.intellij.openapi.ui.MultiLineLabelUI)20 ActionEvent (java.awt.event.ActionEvent)3 ActionListener (java.awt.event.ActionListener)3 Nullable (org.jetbrains.annotations.Nullable)3 NotNull (org.jetbrains.annotations.NotNull)2 PathMacroListEditor (com.intellij.application.options.pathMacros.PathMacroListEditor)1 JavaModuleSourceRoot (com.intellij.ide.util.projectWizard.importSources.JavaModuleSourceRoot)1 FileChooserDescriptor (com.intellij.openapi.fileChooser.FileChooserDescriptor)1 ProgressIndicator (com.intellij.openapi.progress.ProgressIndicator)1 Task (com.intellij.openapi.progress.Task)1 MultiLineLabel (com.intellij.openapi.ui.ex.MultiLineLabel)1 CollectionComboBoxModel (com.intellij.ui.CollectionComboBoxModel)1 DocumentAdapter (com.intellij.ui.DocumentAdapter)1 FieldPanel (com.intellij.ui.FieldPanel)1 JBLabel (com.intellij.ui.components.JBLabel)1 JBLoadingPanel (com.intellij.ui.components.JBLoadingPanel)1 Chunk (com.intellij.util.Chunk)1 Table (com.intellij.util.ui.Table)1 BorderLayoutPanel (com.intellij.util.ui.components.BorderLayoutPanel)1 GridBagConstraints (java.awt.GridBagConstraints)1