use of com.intellij.util.ui.JBEmptyBorder in project intellij-community by JetBrains.
the class PluginConflictDialog method getChooserPanelForPlugin.
@NotNull
private JPanel getChooserPanelForPlugin(@NotNull ButtonGroup buttonGroup, @Nullable PluginId plugin) {
final JPanel panel = new JPanel(new BorderLayout());
if (!myIsConflictWithPlatform) {
assert myRadioButtons != null;
final JBRadioButton radioButton = new JBRadioButton();
myRadioButtons.add(radioButton);
buttonGroup.add(radioButton);
radioButton.addChangeListener(e -> getOKAction().updateText());
panel.add(radioButton, BorderLayout.WEST);
panel.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
radioButton.setSelected(true);
}
});
}
final JPanel descriptionPanel;
if (plugin != null) {
descriptionPanel = getPluginDescriptionPanel(plugin, !myIsConflictWithPlatform);
} else {
descriptionPanel = getDisableAllPanel();
}
descriptionPanel.setBorder(new JBEmptyBorder(10, myIsConflictWithPlatform ? 10 : 0, 10, 20));
panel.add(descriptionPanel, BorderLayout.CENTER);
return panel;
}
use of com.intellij.util.ui.JBEmptyBorder in project intellij-plugins by JetBrains.
the class SplitEditorToolbar method createToolbarFromGroupId.
@NotNull
private static ActionToolbar createToolbarFromGroupId(@NotNull String groupId) {
final ActionManager actionManager = ActionManager.getInstance();
if (!actionManager.isGroup(groupId)) {
throw new IllegalStateException(groupId + " should have been a group");
}
final ActionGroup group = ((ActionGroup) actionManager.getAction(groupId));
final ActionToolbarImpl editorToolbar = ((ActionToolbarImpl) actionManager.createActionToolbar(ActionPlaces.EDITOR_TOOLBAR, group, true));
editorToolbar.setOpaque(false);
editorToolbar.setBorder(new JBEmptyBorder(0, 2, 0, 2));
return editorToolbar;
}
Aggregations