void (final Graphics g) { if (getParent() == null) return; int gap = JBUIScale.scale(2); int center = JBUIScale.scale(3); int offset; if (myOrientation == SwingConstants.HORIZONTAL) { offset = ActionToolbarImpl.this.getHeight() - getMaxButtonHeight() - 1; } else { offset = ActionToolbarImpl.this.getWidth() - getMaxButtonWidth() - 1; } g.setColor(getSeparatorColor()); if (myOrientation == SwingConstants.HORIZONTAL) { int y2 = ActionToolbarImpl.this.getHeight() - gap * 2 - offset; LinePainter2D.paint((Graphics2D)g, center, gap, center, y2); if (myText != null) { FontMetrics fontMetrics = getFontMetrics(getFont()); int top = (getHeight() - fontMetrics.getHeight()) / 2; g.setColor(JBColor.foreground()); SwingUtilities2.drawString(this, g, myText, gap * 2 + center + gap, top + fontMetrics.getAscent()); } } else { LinePainter2D.paint((Graphics2D)g, gap, center, ActionToolbarImpl.this.getWidth() - gap * 2 - offset, center); } }