afreechart/src/main/java/org/afree/chart/block/AbstractBlock.java
/**
     * Returns a constraint for the content of this block that will result in
     * the bounds of the block matching the specified constraint.
     * 
     * @param c
     *            the outer constraint (<code>null</code> not permitted).
     * 
     * @return The content constraint.
     */
Returns a constraint for the content of this block that will result in
the bounds of the block matching the specified constraint.

@param c
the outer constraint (null not permitted).

@return The content constraint.
Returns a constraint for the content of this block that will result in the bounds of the block matching the specified constraint . @param c the outer constraint ( null not permitted ) . @return The content constraint .
protected RectangleConstraint toContentConstraint(RectangleConstraint c) {
        if (c == null) {
            throw new IllegalArgumentException("Null 'c' argument.");
        }
        if (c.equals(RectangleConstraint.NONE)) {
            return c;
        }
        double w = c.getWidth();
        Range wr = c.getWidthRange();
        double h = c.getHeight();
        Range hr = c.getHeightRange();
        double ww = trimToContentWidth(w);
        double hh = trimToContentHeight(h);
        Range wwr = trimToContentWidth(wr);
        Range hhr = trimToContentHeight(hr);
        return new RectangleConstraint(ww, wwr, c.getWidthConstraintType(), hh,
                hhr, c.getHeightConstraintType());
    }
protected RectangleConstraint toContentConstraint ( RectangleConstraint c ) { if ( c == null ) { throw new IllegalArgumentException ( "Null 'c' argument." ) ; } if ( c . equals ( RectangleConstraint . NONE ) ) { return c ; } double w = c . getWidth ( ) ; Range wr = c . getWidthRange ( ) ; double h = c . getHeight ( ) ; Range hr = c . getHeightRange ( ) ; double ww = trimToContentWidth ( w ) ; double hh = trimToContentHeight ( h ) ; Range wwr = trimToContentWidth ( wr ) ; Range hhr = trimToContentHeight ( hr ) ; return new RectangleConstraint ( ww , wwr , c . getWidthConstraintType ( ) , hh , hhr , c . getHeightConstraintType ( ) ) ; }
Returns a constraint for the content of this block that will result in
 the bounds of the block matching the specified constraint.
Returns a constraint for the content of this block that will result in the bounds of the block matching the specified constraint .