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);
}
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;
}
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;
}
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;
}
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;
}
Aggregations