private static void drawInsets(Graphics2D g2d,
                                 FontMetrics fm,
                                 String name,
                                 Insets insets,
                                 int offset,
                                 int fontHeight,
                                 int innerX,
                                 int innerY,
                                 int innerWidth,
                                 int innerHeight) {
    g2d.setColor(JBColor.BLACK);
    g2d.drawString(name, innerX - offset + JBUIScale.scale(5), innerY - offset + fontHeight);

    g2d.setColor(JBColor.GRAY);

    int outerX = innerX - offset;
    int outerWidth = innerWidth + offset * 2;
    int outerY = innerY - offset;
    int outerHeight = innerHeight + offset * 2;

    final String top = insets != null ? Integer.toString(insets.top) : "-";
    final String bottom = insets != null ? Integer.toString(insets.bottom) : "-";
    final String left = insets != null ? Integer.toString(insets.left) : "-";
    final String right = insets != null ? Integer.toString(insets.right) : "-";

    int shift = JBUIScale.scale(7);
    drawCenteredString(g2d, fm, fontHeight, top,
                       outerX + outerWidth / 2,
                       outerY + shift);
    drawCenteredString(g2d, fm, fontHeight, bottom,
                       outerX + outerWidth / 2,
                       outerY + outerHeight - shift);
    drawCenteredString(g2d, fm, fontHeight, left,
                       outerX + shift,
                       outerY + outerHeight / 2);
    drawCenteredString(g2d, fm, fontHeight, right,
                       outerX + outerWidth - shift,
                       outerY + outerHeight / 2);
  }
private static void drawInsets(Graphics2D g2d,
                                 FontMetrics fm,
                                 String name,
                                 Insets insets,
                                 int offset,
                                 int fontHeight,
                                 int innerX,
                                 int innerY,
                                 int innerWidth,
                                 int innerHeight)