afreechart/src/main/java/org/afree/chart/block/CenterArrangement.java
/**
     * Arranges the block with a range constraint on the width, and no
     * constraint on the height.
     * 
     * @param container
     *            the container.
     * @param canvas
     *            the graphics device.
     * @param constraint
     *            the constraint.
     * 
     * @return The size following the arrangement.
     */
Arranges the block with a range constraint on the width, and no
constraint on the height.

@param container
the container.
@param canvas
the graphics device.
@param constraint
the constraint.

@return The size following the arrangement.
Arranges the block with a range constraint on the width and no constraint on the height . @param container the container . @param canvas the graphics device . @param constraint the constraint . @return The size following the arrangement .
protected Size2D arrangeRN(BlockContainer container, Canvas canvas,
            RectangleConstraint constraint) {
        Size2D s1 = arrangeNN(container, canvas);
        if (constraint.getWidthRange().contains(s1.width)) {
            return s1;
        } else {
            RectangleConstraint c = constraint.toFixedWidth(constraint
                    .getWidthRange().getUpperBound());
            return arrangeFN(container, canvas, c);
        }
    }
protected Size2D arrangeRN ( BlockContainer container , Canvas canvas , RectangleConstraint constraint ) { Size2D s1 = arrangeNN ( container , canvas ) ; if ( constraint . getWidthRange ( ) . contains ( s1 . width ) ) { return s1 ; } else { RectangleConstraint c = constraint . toFixedWidth ( constraint . getWidthRange ( ) . getUpperBound ( ) ) ; return arrangeFN ( container , canvas , c ) ; } }
Arranges the block with a range constraint on the width, and no
 constraint on the height.
Arranges the block with a range constraint on the width and no constraint on the height .
// first arrange without constraints, then see if the width fits // within the required range...if not, call arrangeFN() at max width