/** * Trims the given width to allow for the insets. * * @param width the width. * * @return The trimmed width. */ public double trimWidth(final double width) { return width - calculateLeftInset(width) - calculateRightInset(width); }
/** * Trims the given width to allow for the insets. * * @param width the width. * * @return The trimmed width. */ public double trimWidth(final double width) { return width - calculateLeftInset(width) - calculateRightInset(width); }
/** * Trims the given width to allow for the insets. * * @param width the width. * * @return The trimmed width. */ public double trimWidth(final double width) { return width - calculateLeftInset(width) - calculateRightInset(width); }
/** * Shrinks the given rectangle by the amount of these insets. * * @param area the area (<code>null</code> not permitted). */ public void trim(final Rectangle2D area) { final double w = area.getWidth(); final double h = area.getHeight(); final double l = calculateLeftInset(w); final double r = calculateRightInset(w); final double t = calculateTopInset(h); final double b = calculateBottomInset(h); area.setRect(area.getX() + l, area.getY() + t, w - l - r, h - t - b); }
/** * Shrinks the given rectangle by the amount of these insets. * * @param area the area (<code>null</code> not permitted). */ public void trim(final Rectangle2D area) { final double w = area.getWidth(); final double h = area.getHeight(); final double l = calculateLeftInset(w); final double r = calculateRightInset(w); final double t = calculateTopInset(h); final double b = calculateBottomInset(h); area.setRect(area.getX() + l, area.getY() + t, w - l - r, h - t - b); }
/** * Shrinks the given rectangle by the amount of these insets. * * @param area the area (<code>null</code> not permitted). */ public void trim(final Rectangle2D area) { final double w = area.getWidth(); final double h = area.getHeight(); final double l = calculateLeftInset(w); final double r = calculateRightInset(w); final double t = calculateTopInset(h); final double b = calculateBottomInset(h); area.setRect(area.getX() + l, area.getY() + t, w - l - r, h - t - b); }
if (horizontal) { leftMargin = calculateLeftInset(base.getWidth()); rightMargin = calculateRightInset(base.getWidth());
if (horizontal) { leftMargin = calculateLeftInset(base.getWidth()); rightMargin = calculateRightInset(base.getWidth());
if (horizontal) { leftMargin = calculateLeftInset(base.getWidth()); rightMargin = calculateRightInset(base.getWidth());
double b = this.insets.calculateBottomInset(area.getHeight()); double l = this.insets.calculateLeftInset(area.getWidth()); double r = this.insets.calculateRightInset(area.getWidth()); double x = area.getX(); double y = area.getY();
double b = this.insets.calculateBottomInset(h); double l = this.insets.calculateLeftInset(w); double r = this.insets.calculateRightInset(w); double x = area.getX(); double y = area.getY();
final double leftMargin = calculateLeftInset(w); x = x + leftMargin; w = w - leftMargin - calculateRightInset(w);
final double leftMargin = calculateLeftInset(w); x = x + leftMargin; w = w - leftMargin - calculateRightInset(w);
final double leftMargin = calculateLeftInset(w); x = x + leftMargin; w = w - leftMargin - calculateRightInset(w);