Java 类com.intellij.ui.components.panels.VerticalBox 实例源码

项目:intellij-ce-playground    文件:DebuggerLaunchingConfigurable.java   
@NotNull
@Override
public JComponent getComponent() {
  myCbForceClassicVM = new StateRestoringCheckBox(DebuggerBundle.message("label.debugger.launching.configurable.force.classic.vm"));
  myCbDisableJIT = new JCheckBox(DebuggerBundle.message("label.debugger.launching.configurable.disable.jit"));
  myRbSocket = new JRadioButton(DebuggerBundle.message("label.debugger.launching.configurable.socket"));
  myRbShmem = new JRadioButton(DebuggerBundle.message("label.debugger.launching.configurable.shmem"));

  final ButtonGroup gr = new ButtonGroup();
  gr.add(myRbSocket);
  gr.add(myRbShmem);
  final Box box = Box.createHorizontalBox();
  box.add(myRbSocket);
  box.add(myRbShmem);
  final JPanel transportPanel = new JPanel(new BorderLayout());
  transportPanel.add(new JLabel(DebuggerBundle.message("label.debugger.launching.configurable.debugger.transport")), BorderLayout.WEST);
  transportPanel.add(box, BorderLayout.CENTER);

  VerticalBox panel = new VerticalBox();
  panel.setOpaque(false);
  panel.add(transportPanel);
  panel.add(myCbForceClassicVM);
  panel.add(myCbDisableJIT);

  JPanel result = new JPanel(new BorderLayout());
  result.add(panel, BorderLayout.NORTH);
  return result;
}
项目:intellij-ce-playground    文件:TrafficProgressPanel.java   
TrafficProgressPanel(@NotNull TrafficLightRenderer trafficLightRenderer, @NotNull Editor editor, @NotNull HintHint hintHint) {
  myHintHint = hintHint;
  myTrafficLightRenderer = trafficLightRenderer;

  setLayout(new BorderLayout());

  VerticalBox center = new VerticalBox();

  add(center, BorderLayout.NORTH);
  center.add(statusLabel);
  center.add(statusExtraLineLabel);
  center.add(new Separator());
  center.add(Box.createVerticalStrut(6));

  TrafficLightRenderer.DaemonCodeAnalyzerStatus fakeStatusLargeEnough = new TrafficLightRenderer.DaemonCodeAnalyzerStatus();
  fakeStatusLargeEnough.errorCount = new int[]{1, 1, 1, 1};
  Project project = trafficLightRenderer.getProject();
  PsiFile psiFile = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
  fakeStatusLargeEnough.passStati = new ArrayList<ProgressableTextEditorHighlightingPass>();
  for (int i = 0; i < 3; i++) {
    fakeStatusLargeEnough.passStati
      .add(new ProgressableTextEditorHighlightingPass(project, null, DaemonBundle.message("pass.wolf"), psiFile, editor, TextRange.EMPTY_RANGE, false,
                                                      HighlightInfoProcessor.getEmpty()) {
        @Override
        protected void collectInformationWithProgress(@NotNull ProgressIndicator progress) {
        }

        @Override
        protected void applyInformationWithProgress() {
        }
      });
  }
  center.add(myPassStatusesContainer);

  add(statistics, BorderLayout.SOUTH);
  updatePanel(fakeStatusLargeEnough, true);

  hintHint.initStyle(this, true);
  statusLabel.setFont(statusLabel.getFont().deriveFont(Font.BOLD));
}
项目:tools-idea    文件:DebuggerLaunchingConfigurable.java   
public JComponent createComponent() {
  myCbForceClassicVM = new StateRestoringCheckBox(DebuggerBundle.message("label.debugger.launching.configurable.force.classic.vm"));
  myCbDisableJIT = new JCheckBox(DebuggerBundle.message("label.debugger.launching.configurable.disable.jit"));
  myHideDebuggerCheckBox = new JCheckBox(DebuggerBundle.message("label.debugger.launching.configurable.hide.window"));
  myRbSocket = new JRadioButton(DebuggerBundle.message("label.debugger.launching.configurable.socket"));
  myRbShmem = new JRadioButton(DebuggerBundle.message("label.debugger.launching.configurable.shmem"));
  myFocusAppCheckBox = new JCheckBox(DebuggerBundle.message("label.debugger.focusAppOnBreakpoint"));

  int cbLeftOffset = 0;
  final Border border = myCbForceClassicVM.getBorder();
  if (border != null) {
    final Insets insets = border.getBorderInsets(myCbForceClassicVM);
    if (insets != null) {
      cbLeftOffset = insets.left;
    }
  }

  final ButtonGroup gr = new ButtonGroup();
  gr.add(myRbSocket);
  gr.add(myRbShmem);
  final Box box = Box.createHorizontalBox();
  box.add(myRbSocket);
  box.add(myRbShmem);
  final JPanel transportPanel = new JPanel(new BorderLayout());
  transportPanel.add(new JLabel(DebuggerBundle.message("label.debugger.launching.configurable.debugger.transport")), BorderLayout.WEST);
  transportPanel.add(box, BorderLayout.CENTER);

  VerticalBox panel = new VerticalBox();
  panel.setOpaque(false);
  panel.add(transportPanel);
  panel.add(myCbForceClassicVM);
  panel.add(myCbDisableJIT);
  panel.add(myHideDebuggerCheckBox);
  panel.add(myFocusAppCheckBox);

  JPanel result = new JPanel(new BorderLayout());
  result.add(panel, BorderLayout.NORTH);

  return result;
}
项目:consulo    文件:TrafficProgressPanel.java   
TrafficProgressPanel(@Nonnull TrafficLightRenderer trafficLightRenderer, @Nonnull Editor editor, @Nonnull HintHint hintHint) {
  myHintHint = hintHint;
  myTrafficLightRenderer = trafficLightRenderer;

  setLayout(new BorderLayout());

  VerticalBox center = new VerticalBox();

  add(center, BorderLayout.NORTH);
  center.add(statusLabel);
  center.add(statusExtraLineLabel);
  center.add(new Separator());
  center.add(Box.createVerticalStrut(6));

  TrafficLightRenderer.DaemonCodeAnalyzerStatus fakeStatusLargeEnough = new TrafficLightRenderer.DaemonCodeAnalyzerStatus();
  fakeStatusLargeEnough.errorCount = new int[]{1, 1, 1, 1};
  Project project = trafficLightRenderer.getProject();
  PsiFile psiFile = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
  fakeStatusLargeEnough.passStati = new ArrayList<ProgressableTextEditorHighlightingPass>();
  for (int i = 0; i < 3; i++) {
    fakeStatusLargeEnough.passStati
            .add(new ProgressableTextEditorHighlightingPass(project, null, DaemonBundle.message("pass.wolf"), psiFile, editor, TextRange.EMPTY_RANGE, false,
                                                            HighlightInfoProcessor.getEmpty()) {
              @Override
              protected void collectInformationWithProgress(@Nonnull ProgressIndicator progress) {
              }

              @Override
              protected void applyInformationWithProgress() {
              }
            });
  }
  center.add(myPassStatusesContainer);

  add(statistics, BorderLayout.SOUTH);
  updatePanel(fakeStatusLargeEnough, true);

  hintHint.initStyle(this, true);
  statusLabel.setFont(statusLabel.getFont().deriveFont(Font.BOLD));
}
项目:android-parcelable-intellij-plugin    文件:GenerateDialog.java   
@Nullable
@Override
protected JComponent createSouthPanel() {
    JComponent southPanel = super.createSouthPanel();
    if(showCheckbox && southPanel != null) {
        final VerticalBox combinedView = new VerticalBox();
        combinedView.add(includeSubclasses);
        combinedView.add(southPanel);
        return combinedView;
    } else {
        return southPanel;
    }
}
项目:consulo-java    文件:DebuggerLaunchingConfigurable.java   
@NotNull
@Override
public JComponent getComponent()
{
    myCbForceClassicVM = new StateRestoringCheckBox(DebuggerBundle.message("label.debugger.launching.configurable.force.classic.vm"));
    myCbDisableJIT = new JCheckBox(DebuggerBundle.message("label.debugger.launching.configurable.disable.jit"));
    myRbSocket = new JRadioButton(DebuggerBundle.message("label.debugger.launching.configurable.socket"));
    myRbShmem = new JRadioButton(DebuggerBundle.message("label.debugger.launching.configurable.shmem"));

    final ButtonGroup gr = new ButtonGroup();
    gr.add(myRbSocket);
    gr.add(myRbShmem);
    final Box box = Box.createHorizontalBox();
    box.add(myRbSocket);
    box.add(myRbShmem);
    final JPanel transportPanel = new JPanel(new BorderLayout());
    transportPanel.add(new JLabel(DebuggerBundle.message("label.debugger.launching.configurable.debugger.transport")), BorderLayout.WEST);
    transportPanel.add(box, BorderLayout.CENTER);

    VerticalBox panel = new VerticalBox();
    panel.setOpaque(false);
    panel.add(transportPanel);
    panel.add(myCbForceClassicVM);
    panel.add(myCbDisableJIT);

    JPanel result = new JPanel(new BorderLayout());
    result.add(panel, BorderLayout.NORTH);
    return result;
}
项目:tools-idea    文件:TrafficProgressPanel.java   
public TrafficProgressPanel(@NotNull TrafficLightRenderer trafficLightRenderer, @NotNull Editor editor, @NotNull HintHint hintHint) {
  myHintHint = hintHint;
  myTrafficLightRenderer = trafficLightRenderer;

  setLayout(new BorderLayout());

  VerticalBox center = new VerticalBox();
  add(center, BorderLayout.NORTH);

  center.add(statusLabel);
  center.add(dumbLabel);
  center.add(new Separator());
  center.add(Box.createVerticalStrut(6));

  TrafficLightRenderer.DaemonCodeAnalyzerStatus fakeStatusLargeEnough = new TrafficLightRenderer.DaemonCodeAnalyzerStatus();
  fakeStatusLargeEnough.errorCount = new int[]{1, 1, 1, 1};
  Project project = trafficLightRenderer.getProject();
  PsiFile psiFile = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
  fakeStatusLargeEnough.passStati = new ArrayList<ProgressableTextEditorHighlightingPass>();
  for (int i = 0; i < 3; i++) {
    fakeStatusLargeEnough.passStati
      .add(new ProgressableTextEditorHighlightingPass(project, null, DaemonBundle.message("pass.wolf"), psiFile, false) {
        @Override
        protected void collectInformationWithProgress(ProgressIndicator progress) {
        }

        @Override
        protected void applyInformationWithProgress() {
        }
      });
  }
  rebuildPassesPanel(fakeStatusLargeEnough);
  for (Pair<JProgressBar, JLabel> pair : passes.values()) {
    JProgressBar bar = pair.first;
    bar.setMaximum(MAX);
    JLabel label = pair.second;
    label.setText(MAX_TEXT);
  }
  center.add(myPassStatusesContainer);

  add(statistics, BorderLayout.SOUTH);
  updatePanel(fakeStatusLargeEnough, true);

  hintHint.initStyle(this, true);
}