com.intellij.util.ui.components.BorderLayoutPanel Java Examples

The following examples show how to use com.intellij.util.ui.components.BorderLayoutPanel. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: QuarkusCodeEndpointChooserStep.java    From intellij-quarkus with Eclipse Public License 2.0 5 votes vote down vote up
public JComponent getComponent() {
    ButtonGroup group = new ButtonGroup();
    group.add(this.defaultRadioButton);
    group.add(this.customRadioButton);
    ActionListener listener = new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            QuarkusCodeEndpointChooserStep.this.updateCustomUrl();
        }
    };
    this.defaultRadioButton.addActionListener(listener);
    this.customRadioButton.addActionListener(listener);
    FormBuilder builder = new FormBuilder();
    builder.addComponent(new JBLabel("Choose Quarkus Code endpoint URL."));
    BorderLayoutPanel defaultPanel = JBUI.Panels.simplePanel(10, 0);
    defaultPanel.addToLeft(this.defaultRadioButton);
    HyperlinkLabel label = new HyperlinkLabel(QUARKUS_CODE_URL);
    label.setHyperlinkTarget(QUARKUS_CODE_URL);
    defaultPanel.addToCenter(label);
    builder.addComponent(defaultPanel);
    BorderLayoutPanel customPanel = JBUI.Panels.simplePanel(10, 0);
    customPanel.addToLeft(this.customRadioButton);
    this.customUrlWithBrowseButton.setButtonIcon(AllIcons.Actions.ShowViewer);
    customPanel.addToCenter(this.customUrlWithBrowseButton);
    builder.addComponent(customPanel);
    builder.addTooltip("Make sure your network connection is active before continuing.");
    JPanel panel = new JPanel(new BorderLayout());
    panel.add(builder.getPanel(), "North");
    return panel;
}
 
Example #2
Source File: PlatformOrPluginDialog.java    From consulo with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example #3
Source File: DesktopSettingsDialog.java    From consulo with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example #4
Source File: XDebuggerEditorBase.java    From consulo with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example #5
Source File: AddModuleDependencyDialog.java    From consulo with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example #6
Source File: DesktopProjectStructureDialog.java    From consulo with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example #7
Source File: XDebuggerEditorBase.java    From consulo with Apache License 2.0 4 votes vote down vote up
protected JComponent addChooser(JComponent component) {
  BorderLayoutPanel panel = JBUI.Panels.simplePanel(component);
  panel.setBackground(component.getBackground());
  panel.addToRight(myChooseFactory);
  return panel;
}
 
Example #8
Source File: XVariablesView.java    From consulo with Apache License 2.0 4 votes vote down vote up
public XVariablesView(@Nonnull XDebugSessionImpl session) {
  super(session.getProject(), session.getDebugProcess().getEditorsProvider(), session.getValueMarkers());
  myComponent = new BorderLayoutPanel();
  myComponent.add(super.getPanel());
  DataManager.registerDataProvider(myComponent, this);
}
 
Example #9
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static BorderLayoutPanel simplePanel() {
  return new BorderLayoutPanel();
}
 
Example #10
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static BorderLayoutPanel simplePanel(Component comp) {
  return simplePanel().addToCenter(comp);
}
 
Example #11
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static BorderLayoutPanel simplePanel(int hgap, int vgap) {
  return new BorderLayoutPanel(hgap, vgap);
}