com.intellij.ui.JBColor源码实例Demo

java.awt.image.FilteredImageSource#com.intellij.ui.JBColor源码实例Demo

下面列出了java.awt.image.FilteredImageSource#com.intellij.ui.JBColor 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: markdown-image-kit   文件: ImageUtils.java
/**
 * http://stackoverflow.com/questions/665406/how-to-make-a-color-transparent-in-a-bufferedimage-and-save-as-png
 *
 * @param image the image
 * @return the image
 */
public static Image whiteToTransparent(@NotNull BufferedImage image) {
    ImageFilter filter = new RGBImageFilter() {
        int markerRGB = JBColor.WHITE.getRGB() | 0xFF000000;

        @Override
        public final int filterRGB(int x, int y, int rgb) {
            if ((rgb | 0xFF000000) == markerRGB) {
                // Mark the alpha bits as zero - transparent
                return 0x00FFFFFF & rgb;
            } else {
                // nothing to do
                return rgb;
            }
        }
    };

    ImageProducer ip = new FilteredImageSource(image.getSource(), filter);
    return Toolkit.getDefaultToolkit().createImage(ip);
}
 
源代码2 项目: consulo   文件: HTMLTextPainter.java
private void writeHeader(@NonNls Writer writer, String title) throws IOException {
  EditorColorsScheme scheme = EditorColorsManager.getInstance().getGlobalScheme();
  writer.write("<html>\r\n");
  writer.write("<head>\r\n");
  writer.write("<title>" + title + "</title>\r\n");
  writer.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n");
  writeStyles(writer);
  writer.write("</head>\r\n");
  Color color = scheme.getDefaultBackground();
  if (color==null) color = JBColor.GRAY;
  writer.write("<BODY BGCOLOR=\"#" + Integer.toString(color.getRGB() & 0xFFFFFF, 16) + "\">\r\n");
  writer.write("<TABLE CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH=\"100%\" BGCOLOR=\"#C0C0C0\" >\r\n");
  writer.write("<TR><TD><CENTER>\r\n");
  writer.write("<FONT FACE=\"Arial, Helvetica\" COLOR=\"#000000\">\r\n");
  writer.write(title + "</FONT>\r\n");
  writer.write("</center></TD></TR></TABLE>\r\n");
  writer.write("<pre>\r\n");
}
 
源代码3 项目: yiistorm   文件: YiiStormSettingsPage.java
public void checkYiiAppParams() {

        ConfigParser parser = new ConfigParser(YiiStormProjectComponent.getInstance(project));
        if (yiiLitePath.getText().length() > 0) {
            if (parser.testYiiLitePath(yiiLitePath.getText())) {
                yiiLitePath.setBackground(JBColor.GREEN);
                if (yiiConfigPath.getText().length() > 0) {
                    if (parser.testYiiConfigPath(yiiConfigPath.getText())) {
                        yiiConfigPath.setBackground(JBColor.GREEN);
                    } else {
                        yiiConfigPath.setBackground(JBColor.PINK);
                    }
                } else {
                    yiiConfigPath.setBackground(JBColor.background());
                }
            } else {
                yiiLitePath.setBackground(JBColor.PINK);
            }
        } else {
            yiiLitePath.setBackground(JBColor.background());
        }
    }
 
源代码4 项目: consulo   文件: ConfigurationErrorsComponent.java
@Override
protected void paintComponent(Graphics g) {
  final Graphics2D g2d = (Graphics2D)g;

  final Rectangle bounds = getBounds();
  final Insets insets = getInsets();

  final GraphicsConfig cfg = new GraphicsConfig(g);
  cfg.setAntialiasing(true);

  final Shape shape = new RoundRectangle2D.Double(insets.left, insets.top, bounds.width - 1 - insets.left - insets.right,
                                                  bounds.height - 1 - insets.top - insets.bottom, 6, 6);
  g2d.setColor(JBColor.WHITE);
  g2d.fill(shape);

  Color bgColor = getBackground();

  g2d.setColor(bgColor);
  g2d.fill(shape);

  g2d.setColor(getBackground().darker());
  g2d.draw(shape);
  cfg.restore();

  super.paintComponent(g);
}
 
源代码5 项目: consulo   文件: ProjectSettingsPanel.java
public TableCellRenderer getRenderer(final ScopeSetting scopeSetting) {
  return new DefaultTableCellRenderer() {
    public Component getTableCellRendererComponent(JTable table,
                                                   Object value,
                                                   boolean isSelected,
                                                   boolean hasFocus,
                                                   int row,
                                                   int column) {
      final Component rendererComponent = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
      if (!isSelected) {
        final CopyrightProfile profile = myProfilesModel.getAllProfiles().get(scopeSetting.getProfileName());
        setForeground(profile == null ? JBColor.RED : UIUtil.getTableForeground());
      }
      setText(scopeSetting.getProfileName());
      return rendererComponent;
    }
  };
}
 
源代码6 项目: consulo   文件: RunAnythingUtil.java
static JComponent createTitle(@Nonnull String titleText, @Nonnull Color background) {
  JLabel titleLabel = new JLabel(StringUtil.capitalizeWords(titleText, true));
  titleLabel.setFont(getTitleFont());
  titleLabel.setForeground(UIUtil.getLabelDisabledForeground());

  SeparatorComponent separatorComponent = new SeparatorComponent(titleLabel.getPreferredSize().height / 2, new JBColor(Gray._220, Gray._80), null);

  JPanel panel = new JPanel(new BorderLayout());
  panel.add(titleLabel, BorderLayout.WEST);
  panel.add(separatorComponent, BorderLayout.CENTER);

  panel.setBorder(JBUI.Borders.empty(3));
  titleLabel.setBorder(JBUI.Borders.emptyRight(3));

  panel.setBackground(background);
  return panel;
}
 
源代码7 项目: consulo   文件: FocusTracesDialog.java
private void paintBorder() {
  final int row = FocusTracesDialog.this.myRequestsTable.getSelectedRow();
  if (row != -1) {
    final FocusRequestInfo info = FocusTracesDialog.this.myRequests.get(row);
    if (prev != null && prev != info.getComponent()) {
      prev.repaint();
    }
    prev = info.getComponent();
    if (prev != null && prev.isDisplayable()) {
      final Graphics g = prev.getGraphics();
      g.setColor(JBColor.RED);
      final Dimension sz = prev.getSize();
      UIUtil.drawDottedRectangle(g, 1, 1, sz.width - 2, sz.height - 2);
    }
  }
}
 
源代码8 项目: consulo   文件: Bookmark.java
@Nonnull
private static Image createMnemonicIcon(char cha) {
  int width = AllIcons.Actions.Checked.getWidth();
  int height = AllIcons.Actions.Checked.getHeight();

  return ImageEffects.canvas(width, height, c -> {
    // FIXME [VISTALL] make constant ??
    c.setFillStyle(TargetAWT.from(new JBColor(new Color(0xffffcc), new Color(0x675133))));
    c.fillRect(0, 0, width, height);

    c.setStrokeStyle(StandardColors.GRAY);
    c.rect(0, 0, width, height);
    c.stroke();

    c.setFillStyle(ComponentColors.TEXT);
    c.setFont(FontManager.get().createFont("Monospaced", 11, consulo.ui.font.Font.STYLE_BOLD));
    c.setTextAlign(Canvas2D.TextAlign.center);
    c.setTextBaseline(Canvas2D.TextBaseline.middle);

    c.fillText(Character.toString(cha), width / 2, height / 2 - 2);
  });
}
 
源代码9 项目: flutter-intellij   文件: FlutterLogColors.java
@NotNull
public static Color forCategory(@NotNull String category) {
  if (category.equals(ERROR_CATEGORY)) {
    return JBColor.red;
  }
  if (category.startsWith("flutter.")) {
    return JBColor.gray;
  }
  if (category.startsWith("runtime.")) {
    return UIUtil.isUnderDarcula() ? JBColor.magenta : JBColor.pink;
  }
  if (category.equals("http")) {
    return JBColor.blue;
  }

  // TODO(pq): add more presets.

  // Default.
  return JBColor.darkGray;
}
 
源代码10 项目: consulo   文件: NotificationMessageElement.java
protected void updateStyle(@Nonnull JEditorPane editorPane, @Nullable JTree tree, Object value, boolean selected, boolean hasFocus) {
  final HTMLDocument htmlDocument = (HTMLDocument)editorPane.getDocument();
  final Style style = htmlDocument.getStyleSheet().getStyle(MSG_STYLE);
  if (value instanceof LoadingNode) {
    StyleConstants.setForeground(style, JBColor.GRAY);
  }
  else {
    if (selected) {
      StyleConstants.setForeground(style, hasFocus ? UIUtil.getTreeSelectionForeground() : UIUtil.getTreeTextForeground());
    }
    else {
      StyleConstants.setForeground(style, UIUtil.getTreeTextForeground());
    }
  }

  if (UIUtil.isUnderGTKLookAndFeel() ||
      UIUtil.isUnderNimbusLookAndFeel() && selected && hasFocus ||
      tree != null && tree.getUI() instanceof WideSelectionTreeUI && ((WideSelectionTreeUI)tree.getUI()).isWideSelection()) {
    editorPane.setOpaque(false);
  }
  else {
    editorPane.setOpaque(selected && hasFocus);
  }

  htmlDocument.setCharacterAttributes(0, htmlDocument.getLength(), style, false);
}
 
源代码11 项目: p4ic4idea   文件: P4RootConfigPanel.java
@Override
public Component getListCellRendererComponent(JList<? extends ConfigProblem> list, ConfigProblem problem,
        int index, boolean isSelected, boolean cellHasFocus) {
    cell.setForeground(problem.isError()
            ? JBColor.RED
            : UIUtil.getTextAreaForeground());

    // > v183 has nice API for this...
    cell.setBackground(
            isSelected
                ? cellHasFocus
                        ? UIUtil.getListUnfocusedSelectionBackground()
                        : UIUtil.getListSelectionBackground()
                : UIUtil.getListBackground()
    );
    cell.setText(problem.getMessage());
    return cell;
}
 
源代码12 项目: flutter-intellij   文件: FlutterLogColors.java
@NotNull
public static Color forCategory(@NotNull String category) {
  if (category.equals(ERROR_CATEGORY)) {
    return JBColor.red;
  }
  if (category.startsWith("flutter.")) {
    return JBColor.gray;
  }
  if (category.startsWith("runtime.")) {
    return UIUtil.isUnderDarcula() ? JBColor.magenta : JBColor.pink;
  }
  if (category.equals("http")) {
    return JBColor.blue;
  }

  // TODO(pq): add more presets.

  // Default.
  return JBColor.darkGray;
}
 
源代码13 项目: consulo   文件: ModuleDescriptionsComboBox.java
@Override
public void customize(JList list, ModuleDescription moduleDescription, int index, boolean selected, boolean hasFocus) {
  if (moduleDescription == null) {
    setText(myEmptySelectionText);
  }
  else {
    if (moduleDescription instanceof LoadedModuleDescription) {
      setIcon(AllIcons.Nodes.Module);
      setForeground(null);
    }
    else {
      setIcon(AllIcons.Nodes.Module); //FIXME [VISTALL] another icon?
      setForeground(JBColor.RED);
    }
    setText(moduleDescription.getName());
  }
}
 
@Override
protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) {
    Color bgColor = UIUtil.getListBackground();
    setPaintFocusBorder(hasFocus && UIUtil.isToUseDottedCellBorder());

    if (value instanceof StringElement) {
        StringElement element = (StringElement) value;
        String stringKeyText = "(" + element.getName() + ")";
        String text = new StringEllipsisPolicy().ellipsizeText(element.getValue(), matcher);

        SimpleTextAttributes nameAttributes = new SimpleTextAttributes(Font.PLAIN, list.getForeground());
        SpeedSearchUtil.appendColoredFragmentForMatcher(text, this, nameAttributes, matcher, bgColor, selected);
        // TODO Change icon
        setIcon(AndroidIcons.EmptyFlag);

        append(" " + stringKeyText, new SimpleTextAttributes(Font.PLAIN, JBColor.GRAY));
    }

    setBackground(selected ? UIUtil.getListSelectionBackground() : bgColor);
}
 
源代码15 项目: consulo   文件: SMTestRunnerResultsForm.java
private void updateStatusLabel(final boolean testingFinished) {
  if (myFailedTestCount > 0) {
    myStatusLine.setStatusColor(ColorProgressBar.RED);
  }

  if (testingFinished) {
    if (myTotalTestCount == 0) {
      myStatusLine.setStatusColor(myTestsRootNode.wasLaunched() || !myTestsRootNode.isTestsReporterAttached() ? JBColor.LIGHT_GRAY : ColorProgressBar.RED);
    }
    // else color will be according failed/passed tests
  }

  // launchedAndFinished - is launched and not in progress. If we remove "launched' that onTestingStarted() before
  // initializing will be "launchedAndFinished"
  final boolean launchedAndFinished = myTestsRootNode.wasLaunched() && !myTestsRootNode.isInProgress();
  if (!TestsPresentationUtil.hasNonDefaultCategories(myMentionedCategories)) {
    myStatusLine.formatTestMessage(myTotalTestCount, myFinishedTestCount, myFailedTestCount, myIgnoredTestCount, myTestsRootNode.getDuration(), myEndTime);
  }
  else {
    myStatusLine.setText(TestsPresentationUtil.getProgressStatus_Text(myStartTime, myEndTime, myTotalTestCount, myFinishedTestCount, myFailedTestCount,
                                                                      myMentionedCategories, launchedAndFinished));
  }
}
 
源代码16 项目: consulo   文件: ArrangementColorsProviderImpl.java
public ArrangementColorsProviderImpl(@Nullable ArrangementColorsAware colorsAware) {
  myColorsAware = colorsAware;

  // Default settings.
  myDefaultNormalAttributes.setForegroundColor(UIUtil.getTreeTextForeground());
  myDefaultNormalAttributes.setBackgroundColor(UIUtil.getPanelBackground());
  myDefaultSelectedAttributes.setForegroundColor(UIUtil.getTreeSelectionForeground());
  myDefaultSelectedAttributes.setBackgroundColor(UIUtil.getTreeSelectionBackground());
  myDefaultNormalBorderColor = UIUtil.getBorderColor();
  Color selectionBorderColor = UIUtil.getTreeSelectionBorderColor();
  if (selectionBorderColor == null) {
    selectionBorderColor = JBColor.black;
  }
  myDefaultSelectedBorderColor = selectionBorderColor;
}
 
源代码17 项目: intellij-plugin-v4   文件: InputPanel.java
public void setStartRuleName(VirtualFile grammarFile, String startRuleName) {
	startRuleLabel.setText(String.format(startRuleLabelText, grammarFile.getName(), startRuleName));
	startRuleLabel.setForeground(JBColor.BLACK);
	final Font oldFont = startRuleLabel.getFont();
	startRuleLabel.setFont(oldFont.deriveFont(Font.BOLD));
	startRuleLabel.setIcon(Icons.FILE);
}
 
源代码18 项目: mypy-PyCharm-plugin   文件: MypyTerminal.java
private void setWaiting() {
    errorsList.setForeground(new JBColor(new Color(GRAY), new Color(DARK_GRAY)));
    errorsList.setCellRenderer(defaultRenderer);
    mypyStatus.setText("Running...");
    mypyStatus.setForeground(new JBColor(new Color(BLACK), new Color(GRAY)));
    mypyStatus.setBackground(new JBColor(new Color(WHITE), new Color(BLACK)));
    errorsList.setListData(new MypyError[] {});
    errorsList.setPaintBusy(true);
    mypyRun.setText("Wait...");
    mypyRun.setEnabled(false);
}
 
源代码19 项目: intellij-plugin-v4   文件: InputPanel.java
public void annotateErrorsInPreviewInputEditor(SyntaxError e) {
	Editor editor = getInputEditor();
	if ( editor==null ) return;
	MarkupModel markupModel = editor.getMarkupModel();

	int a, b; // Start and stop index
	RecognitionException cause = e.getException();
	if ( cause instanceof LexerNoViableAltException ) {
		a = ((LexerNoViableAltException) cause).getStartIndex();
		b = ((LexerNoViableAltException) cause).getStartIndex()+1;
	}
	else {
		Token offendingToken = e.getOffendingSymbol();
		a = offendingToken.getStartIndex();
		b = offendingToken.getStopIndex()+1;
	}
	final TextAttributes attr = new TextAttributes();
	attr.setForegroundColor(JBColor.RED);
	attr.setEffectColor(JBColor.RED);
	attr.setEffectType(EffectType.WAVE_UNDERSCORE);
	RangeHighlighter highlighter =
		markupModel.addRangeHighlighter(a,
		                                b,
		                                ERROR_LAYER, // layer
		                                attr,
		                                HighlighterTargetArea.EXACT_RANGE);
	highlighter.putUserData(SYNTAX_ERROR, e);
}
 
源代码20 项目: mypy-PyCharm-plugin   文件: MypyHelp.java
static void show(Project project) {
    MypyHelp dialog = new MypyHelp();
    dialog.pack();
    dialog.setSize(600, 400);
    JFrame frame = WindowManager.getInstance().getFrame(project);
    dialog.setLocationRelativeTo(frame);
    dialog.textPane.setCaretPosition(0);
    dialog.textPane.setForeground(new JBColor(MypyTerminal.BLACK, MypyTerminal.GRAY));
    dialog.textPane.setBackground(new JBColor(new Color(MypyTerminal.WHITE),
            dialog.contentPane.getBackground()));
    dialog.setVisible(true);
}
 
源代码21 项目: consulo   文件: UsagePreviewPanel.java
ReplacementView(@Nullable String replacement) {
  String textToShow = replacement;
  if (replacement == null) {
    textToShow = MALFORMED_REPLACEMENT_STRING;
  }
  JLabel jLabel = new JLabel(textToShow);
  jLabel.setForeground(replacement != null ? new JBColor(Gray._240, Gray._200) : JBColor.RED);
  add(jLabel);
}
 
private static void exportToImage(UberTreeViewer parseTreeViewer, File file, boolean useTransparentBackground, String imageFormat) {
    int imageType = useTransparentBackground ? BufferedImage.TYPE_INT_ARGB : BufferedImage.TYPE_INT_RGB;
    BufferedImage bi = UIUtil.createImage(parseTreeViewer.getWidth(), parseTreeViewer.getHeight(), imageType);
    Graphics graphics = bi.getGraphics();

    if (!useTransparentBackground) {
        graphics.setColor(JBColor.WHITE);
        graphics.fillRect(0, 0, parseTreeViewer.getWidth(), parseTreeViewer.getHeight());
    }

    parseTreeViewer.paint(graphics);

    try {
        if (!ImageIO.write(bi, imageFormat, file)) {
            Notification notification = new Notification(
                    "ANTLR 4 export",
                    "Error while exporting parse tree to file " + file.getAbsolutePath(),
                    "unknown format '" + imageFormat + "'?",
                    NotificationType.WARNING
            );
            Notifications.Bus.notify(notification);
        }
    } catch (IOException e) {
        Logger.getInstance(ParseTreeContextualMenu.class)
                .error("Error while exporting parse tree to file " + file.getAbsolutePath(), e);
    }
}
 
源代码23 项目: consulo   文件: WolfChangesFileNameDecorator.java
@Override
public void appendFileName(final ChangesBrowserNodeRenderer renderer, final VirtualFile vFile, final String fileName, final Color color, final boolean highlightProblems) {
  int style = SimpleTextAttributes.STYLE_PLAIN;
  Color underlineColor = null;
  if (highlightProblems && vFile != null && !vFile.isDirectory() && myProblemSolver.isProblemFile(vFile)) {
    underlineColor = JBColor.RED;
    style = SimpleTextAttributes.STYLE_WAVED;
  }
  renderer.append(fileName, new SimpleTextAttributes(style, color, underlineColor));
}
 
源代码24 项目: IntelliJ-Key-Promoter-X   文件: SuppressedList.java
@Override
public Component getListCellRendererComponent(JList<? extends StatisticsItem> list, StatisticsItem value, int index, boolean isSelected, boolean cellHasFocus) {
    final Color foreground = list.getForeground();
    final Color background = list.getBackground();
    final String message = KeyPromoterBundle.message(
            "kp.list.suppressed.item",
            value.getShortcut(),
            value.description
    );
    if (isSelected) {
        setBackground(JBColor.GRAY);
    } else {
        setBackground(background);
    }

    setText(message);
    setForeground(foreground);
    setBorder(JBUI.Borders.empty(2, 10));
    if (value.ideaActionID != null && !"".equals(value.ideaActionID)) {
        final AnAction action = ActionManager.getInstance().getAction(value.ideaActionID);

        if (action != null) {
            final Icon icon = action.getTemplatePresentation().getIcon();
            if (icon != null) {
                setIcon(icon);
            } else {
                setIcon(KeyPromoterIcons.KP_ICON);
            }
        }
    }
    return this;
}
 
源代码25 项目: consulo   文件: ReplacementView.java
public ReplacementView(@Nullable String replacement) {
  String textToShow = StringUtil.notNullize(replacement, MALFORMED_REPLACEMENT_STRING);
  textToShow = StringUtil.escapeXmlEntities(StringUtil.shortenTextWithEllipsis(textToShow, 500, 0, true)).replaceAll("\n+", "\n").replace("\n", "<br>");
  //noinspection HardCodedStringLiteral
  JLabel jLabel = new JBLabel("<html>" + textToShow).setAllowAutoWrapping(true);
  jLabel.setForeground(replacement != null ? new JBColor(Gray._240, Gray._200) : JBColor.RED);
  add(jLabel);
}
 
源代码26 项目: consulo   文件: ModernButtonlessScrollBarUI.java
@Override
protected void paintTrack(Graphics g, JComponent c, Rectangle bounds) {
  g.setColor(new JBColor(LightColors.SLIGHTLY_GRAY, UIUtil.getListBackground()));
  g.fillRect(bounds.x, bounds.y, bounds.width, bounds.height);

  RegionPainter<Object> painter = UIUtil.getClientProperty(c, ScrollBarUIConstants.TRACK);
  if (painter != null) {
    painter.paint((Graphics2D)g, bounds.x, bounds.y, bounds.width, bounds.height, null);
  }
}
 
源代码27 项目: consulo   文件: DesktopEditorComposite.java
@Nonnull
private static SideBorder createTopBottomSideBorder(boolean top) {
  return new SideBorder(null, top ? SideBorder.BOTTOM : SideBorder.TOP) {
    @Override
    public Color getLineColor() {
      Color result = EditorColorsManager.getInstance().getGlobalScheme().getColor(EditorColors.TEARLINE_COLOR);
      return result == null ? JBColor.BLACK : result;
    }
  };
}
 
源代码28 项目: nix-idea   文件: NixIDEASettings.java
NixIDEASettings(@NotNull Project project) {
    this.projectProperties = PropertiesComponent.getInstance(project);

    settings = Arrays.asList((Setting) new ResettableEnvField("NIX_PATH", (TextFriend) new TextComponent(nixPath))
            , (Setting) new ResettableEnvField("NIX_PROFILES", (TextFriend) new TextComponent(nixProfiles))
            , (Setting) new ResettableEnvField("NIX_OTHER_STORES", (TextFriend) new TextComponent(nixOtherStores))
            , (Setting) new ResettableEnvField("NIX_REMOTE", (TextFriend) new TextComponent(nixRemote))
            , (Setting) new ResettableEnvField("NIXPKGS_CONFIG", (TextFriend) new TextComponent(nixPkgsConfig))
            , (Setting) new ResettableEnvField("NIX_CONF_DIR", (TextFriend) new TextComponent(nixConfDir))
            , (Setting) new ResettableEnvField("NIX_USER_PROFILE_DIR", (TextFriend) new TextComponent(nixUserProfileDir))
    );

    final Color originalBackground = nixPath.getBackground();
    nixPath.setInputVerifier(new InputVerifier() {
        @Override
        public boolean verify(JComponent input) {
            JTextField tf = (JTextField) input;
            NixPathVerifier npv = new NixPathVerifier(tf.getText());
            if (npv.verify()) {
                input.setBackground(originalBackground);
                return true;
            } else {
                //Some parts of the paths are inaccessible
                //TODO: change to individual path strikeout
                input.setBackground(JBColor.RED);
                return false;
            }
        }
    });
}
 
源代码29 项目: PackageTemplates   文件: LibraryDialog.java
public void buildView() {
    setTitle(Localizer.get("title.LibraryDialog"));
    panel.setBackground(JBColor.BLUE);

    tabbedPane = new JBTabbedPane();
    panel.add(tabbedPane, new CC().push().grow());

    initBinaryFilesTab();
    initSecondTab();
}
 
源代码30 项目: consulo   文件: DialogWrapper.java
private void appendError(String text) {
  errors.add(text);
  myLabel.setBounds(0, 0, 0, 0);
  StringBuilder sb = new StringBuilder("<html><font color='#" + ColorUtil.toHex(JBColor.RED) + "'>");
  errors.forEach(error -> sb.append("<left>").append(error).append("</left><br/>"));
  sb.append("</font></html>");
  myLabel.setText(sb.toString());
  setVisible(true);
  updateSize();
}