Ejemplo n.º 1
0
 void setMemoryIndicatorVisible(final boolean visible) {
   if (myMemoryWidget != null) {
     myMemoryWidget.setShowing(visible);
     if (!SystemInfo.isMac) {
       myStatusBar.setBorder(BorderFactory.createEmptyBorder(1, 4, 0, visible ? 0 : 2));
     }
   }
 }
  private AntBuildMessageView(Project project, AntBuildFileBase buildFile, String[] targets) {
    super(new BorderLayout(2, 0));
    myProject = project;
    setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));

    myPlainTextView = new PlainTextView(project);
    myTreeView = new TreeView(project, buildFile);

    myMessagePanel = new JPanel(new BorderLayout());
    myBuildFile = buildFile;
    myTargets = targets;

    showAntView(AntBuildFileImpl.TREE_VIEW.value(buildFile.getAllOptions()));
    setVerboseMode(AntBuildFileImpl.VERBOSE.value(buildFile.getAllOptions()));

    add(createToolbarPanel(), BorderLayout.WEST);
    add(myMessagePanel, BorderLayout.CENTER);
  }
 public void setAdText(@NotNull final String s, int alignment) {
   if (myAdComponent == null) {
     myAdComponent =
         HintUtil.createAdComponent(s, BorderFactory.createEmptyBorder(1, 5, 1, 5), alignment);
     JPanel wrapper =
         new JPanel(new BorderLayout()) {
           @Override
           protected void paintComponent(Graphics g) {
             g.setColor(Gray._135);
             g.drawLine(0, 0, getWidth(), 0);
             super.paintComponent(g);
           }
         };
     wrapper.setOpaque(false);
     wrapper.setBorder(new EmptyBorder(1, 0, 0, 0));
     wrapper.add(myAdComponent, BorderLayout.CENTER);
     myContent.add(wrapper, BorderLayout.SOUTH);
     pack(false, true);
   } else {
     myAdComponent.setText(s);
     myAdComponent.setHorizontalAlignment(alignment);
   }
 }