protected JComponent createNorthPanel() { BorderLayoutPanel panel = JBUI.Panels.simplePanel(15, 10); if (myIcon != null) { JLabel iconLabel = new JLabel(myIcon); panel.addToLeft(JBUI.Panels.simplePanel().addToTop(iconLabel)); } BorderLayoutPanel messagePanel = JBUI.Panels.simplePanel(); if (myMessage != null) { JLabel textLabel = new JLabel(myMessage); textLabel.setBorder(JBUI.Borders.emptyBottom(5)); textLabel.setUI(new MultiLineLabelUI()); messagePanel.addToTop(textLabel); } panel.add(messagePanel, BorderLayout.CENTER); final JScrollPane jScrollPane = ScrollPaneFactory.createScrollPane(); jScrollPane.setViewportView(myView); jScrollPane.setPreferredSize(JBUI.size(300, 80)); panel.addToBottom(jScrollPane); return panel; }
@Nullable @Override protected JComponent createSouthPanel() { JComponent southPanel = super.createSouthPanel(); if (southPanel != null) { southPanel.add(new JBLabel("Following nodes will be downloaded & installed"), BorderLayout.WEST); southPanel.setBorder(JBUI.Borders.empty(ourDefaultBorderInsets)); BorderLayoutPanel borderLayoutPanel = JBUI.Panels.simplePanel(southPanel); borderLayoutPanel.setBorder(new CustomLineBorder(JBUI.scale(1), 0, 0, 0)); return borderLayoutPanel; } return null; }
@Nullable @Override protected JComponent createSouthPanel() { JComponent southPanel = super.createSouthPanel(); if(southPanel != null) { southPanel.setBorder(JBUI.Borders.empty(ourDefaultBorderInsets)); BorderLayoutPanel borderLayoutPanel = JBUI.Panels.simplePanel(southPanel); borderLayoutPanel.setBorder(new CustomLineBorder(JBUI.scale(1), 0, 0, 0)); return borderLayoutPanel; } return null; }
protected JPanel decorate(JComponent component, boolean multiline, boolean showEditor) { BorderLayoutPanel panel = JBUI.Panels.simplePanel(); JPanel factoryPanel = JBUI.Panels.simplePanel(); factoryPanel.add(myChooseFactory, multiline ? BorderLayout.NORTH : BorderLayout.CENTER); panel.add(factoryPanel, BorderLayout.WEST); if (!multiline && showEditor) { component = addMultilineButton(component); } panel.addToCenter(component); return panel; }
public static BorderLayoutPanel simplePanel() { return new BorderLayoutPanel(); }
public static BorderLayoutPanel simplePanel(Component comp) { return simplePanel().addToCenter(comp); }
public static BorderLayoutPanel simplePanel(int hgap, int vgap) { return new BorderLayoutPanel(hgap, vgap); }
protected JComponent addChooser(JComponent component) { BorderLayoutPanel panel = JBUI.Panels.simplePanel(component); panel.setBackground(component.getBackground()); panel.addToRight(myChooseFactory); return panel; }
public XVariablesView(@Nonnull XDebugSessionImpl session) { super(session.getProject(), session.getDebugProcess().getEditorsProvider(), session.getValueMarkers()); myComponent = new BorderLayoutPanel(); myComponent.add(super.getPanel()); DataManager.registerDataProvider(myComponent, this); }