void paint(RegionPainter<Float> p, Graphics2D g, int x, int y, int width, int height, JComponent c, float value, boolean small) { if (!c.isOpaque()) { Alignment alignment = Alignment.get(c); if (alignment == Alignment.LEFT || alignment == Alignment.RIGHT) { int offset = getTrackOffset(width - getMinimalThickness()); if (offset > 0) { width -= offset; if (alignment == Alignment.RIGHT) x += offset; } } else { int offset = getTrackOffset(height - getMinimalThickness()); if (offset > 0) { height -= offset; if (alignment == Alignment.BOTTOM) y += offset; } } } else if (small) { x += 1; y += 1; width -= 2; height -= 2; } p.paint(g, x, y, width, height, value); }