src/main/java/ch/frostnova/force/based/layout/geom/Rectangle.java
public Rectangle addMargin(double margin) {
        if (margin == 0) {
            return this;
        }

        Check.required(margin, "margin", CheckNumber.min(0));
        return new Rectangle(getLocation().getX() - margin, getLocation().getY() - margin, getSize().getWidth() + 2 * margin, getSize().getHeight() + 2 * margin);
    }
/**
     * Create a new rectangle resulting of adding a margin around the given one.
     *
     * @param margin margin, must not be negative
     * @return rectangle
     */
Create a new rectangle resulting of adding a margin around the given one.
@param margin margin, must not be negative
@return rectangle
Create a new rectangle resulting of adding a margin around the given one . @param margin margin must not be negative @return rectangle
public Rectangle addMargin(double margin) {
        if (margin == 0) {
            return this;
        }
        Check.required(margin, "margin", CheckNumber.min(0));
        return new Rectangle(getLocation().getX() - margin, getLocation().getY() - margin, getSize().getWidth() + 2 * margin, getSize().getHeight() + 2 * margin);
    }
public Rectangle addMargin ( double margin ) { if ( margin == 0 ) { return this ; } Check . required ( margin , "margin" , CheckNumber . min ( 0 ) ) ; return new Rectangle ( getLocation ( ) . getX ( ) - margin , getLocation ( ) . getY ( ) - margin , getSize ( ) . getWidth ( ) + 2 * margin , getSize ( ) . getHeight ( ) + 2 * margin ) ; }
Create a new rectangle resulting of adding a margin around the given one.
Create a new rectangle resulting of adding a margin around the given one .