afreechart/src/main/java/org/afree/chart/block/BorderArrangement.java
/**
     * Arranges the container width a fixed width and no constraint on the
     * height.
     * 
     * @param container
     *            the container.
     * @param canvas
     *            the graphics device.
     * @param width
     *            the fixed width.
     * 
     * @return The container size after arranging the contents.
     */
Arranges the container width a fixed width and no constraint on the
height.

@param container
the container.
@param canvas
the graphics device.
@param width
the fixed width.

@return The container size after arranging the contents.
Arranges the container width a fixed width and no constraint on the height . @param container the container . @param canvas the graphics device . @param width the fixed width . @return The container size after arranging the contents .
protected Size2D arrangeFN(BlockContainer container, Canvas canvas, double width) {
        double[] w = new double[5];
        double[] h = new double[5];
        RectangleConstraint c1 = new RectangleConstraint(width, null,
                LengthConstraintType.FIXED, 0.0, null,
                LengthConstraintType.NONE);
        if (this.topBlock != null) {
            Size2D size = this.topBlock.arrange(canvas, c1);
            w[0] = size.width;
            h[0] = size.height;
        }
        if (this.bottomBlock != null) {
            Size2D size = this.bottomBlock.arrange(canvas, c1);
            w[1] = size.width;
            h[1] = size.height;
        }
        RectangleConstraint c2 = new RectangleConstraint(0.0, new Range(0.0,
                width), LengthConstraintType.RANGE, 0.0, null,
                LengthConstraintType.NONE);
        if (this.leftBlock != null) {
            Size2D size = this.leftBlock.arrange(canvas, c2);
            w[2] = size.width;
            h[2] = size.height;
        }
        if (this.rightBlock != null) {
            double maxW = Math.max(width - w[2], 0.0);
            RectangleConstraint c3 = new RectangleConstraint(0.0, new Range(
                    Math.min(w[2], maxW), maxW), LengthConstraintType.RANGE,
                    0.0, null, LengthConstraintType.NONE);
            Size2D size = this.rightBlock.arrange(canvas, c3);
            w[3] = size.width;
            h[3] = size.height;
        }
        h[2] = Math.max(h[2], h[3]);
        h[3] = h[2];
        if (this.centerBlock != null) {
            RectangleConstraint c4 = new RectangleConstraint(width - w[2]
                    - w[3], null, LengthConstraintType.FIXED, 0.0, null,
                    LengthConstraintType.NONE);
            Size2D size = this.centerBlock.arrange(canvas, c4);
            w[4] = size.width;
            h[4] = size.height;
        }
        double height = h[0] + h[1] + Math.max(h[2], Math.max(h[3], h[4]));
        return arrange(container, canvas, new RectangleConstraint(width, height));
    }
protected Size2D arrangeFN ( BlockContainer container , Canvas canvas , double width ) { double [ ] w = new double [ 5 ] ; double [ ] h = new double [ 5 ] ; RectangleConstraint c1 = new RectangleConstraint ( width , null , LengthConstraintType . FIXED , 0.0 , null , LengthConstraintType . NONE ) ; if ( this . topBlock != null ) { Size2D size = this . topBlock . arrange ( canvas , c1 ) ; w [ 0 ] = size . width ; h [ 0 ] = size . height ; } if ( this . bottomBlock != null ) { Size2D size = this . bottomBlock . arrange ( canvas , c1 ) ; w [ 1 ] = size . width ; h [ 1 ] = size . height ; } RectangleConstraint c2 = new RectangleConstraint ( 0.0 , new Range ( 0.0 , width ) , LengthConstraintType . RANGE , 0.0 , null , LengthConstraintType . NONE ) ; if ( this . leftBlock != null ) { Size2D size = this . leftBlock . arrange ( canvas , c2 ) ; w [ 2 ] = size . width ; h [ 2 ] = size . height ; } if ( this . rightBlock != null ) { double maxW = Math . max ( width - w [ 2 ] , 0.0 ) ; RectangleConstraint c3 = new RectangleConstraint ( 0.0 , new Range ( Math . min ( w [ 2 ] , maxW ) , maxW ) , LengthConstraintType . RANGE , 0.0 , null , LengthConstraintType . NONE ) ; Size2D size = this . rightBlock . arrange ( canvas , c3 ) ; w [ 3 ] = size . width ; h [ 3 ] = size . height ; } h [ 2 ] = Math . max ( h [ 2 ] , h [ 3 ] ) ; h [ 3 ] = h [ 2 ] ; if ( this . centerBlock != null ) { RectangleConstraint c4 = new RectangleConstraint ( width - w [ 2 ] - w [ 3 ] , null , LengthConstraintType . FIXED , 0.0 , null , LengthConstraintType . NONE ) ; Size2D size = this . centerBlock . arrange ( canvas , c4 ) ; w [ 4 ] = size . width ; h [ 4 ] = size . height ; } double height = h [ 0 ] + h [ 1 ] + Math . max ( h [ 2 ] , Math . max ( h [ 3 ] , h [ 4 ] ) ) ; return arrange ( container , canvas , new RectangleConstraint ( width , height ) ) ; }
Arranges the container width a fixed width and no constraint on the
 height.
Arranges the container width a fixed width and no constraint on the height .