void (Rectangle bounds, Insets insets, Rectangle hsbBounds, boolean hsbRequiresSpace, boolean hsbOnTop, boolean hsbOverlapping, @NotNull Rectangle wholePaneBounds) { hsbBounds.height = hsb.isEnabled() ? min(bounds.height, hsb.getPreferredSize().height) : 0; if (hsbOnTop) { if (hsbOverlapping) { hsbBounds.y = 0; } else { hsbBounds.y = bounds.y - insets.top/* + hsbBounds.height*/; } if (hsbRequiresSpace) bounds.y += hsbBounds.height; } else if (hsbOverlapping) { hsbBounds.y = wholePaneBounds.y + wholePaneBounds.height - hsbBounds.height; } else { hsbBounds.y = bounds.y + bounds.height + insets.bottom - hsbBounds.height; } if (hsbRequiresSpace) bounds.height -= hsbBounds.height; }