afreechart/src/main/java/org/afree/chart/block/ColumnArrangement.java
/**
     * Calculates and sets the bounds of all the items in the specified
     * container, subject to the given constraint. The <code>Canvas</code>
     * can be used by some items (particularly items containing text) to
     * calculate sizing parameters.
     * 
     * @param container
     *            the container whose items are being arranged.
     * @param constraint
     *            the size constraint.
     * @param canvas
     *            the graphics device.
     * 
     * @return The container size after the arrangement.
     */
Calculates and sets the bounds of all the items in the specified
container, subject to the given constraint. The Canvas
can be used by some items (particularly items containing text) to
calculate sizing parameters.

@param container
the container whose items are being arranged.
@param constraint
the size constraint.
@param canvas
the graphics device.

@return The container size after the arrangement.
Calculates and sets the bounds of all the items in the specified container subject to the given constraint . The Canvas can be used by some items ( particularly items containing text ) to calculate sizing parameters . @param container the container whose items are being arranged . @param constraint the size constraint . @param canvas the graphics device . @return The container size after the arrangement .
protected Size2D arrangeNF(BlockContainer container, Canvas canvas,
            RectangleConstraint constraint) {
        List blocks = container.getBlocks();
        double height = constraint.getHeight();
        if (height <= 0.0) {
            height = Double.POSITIVE_INFINITY;
        }
        double x = 0.0;
        double y = 0.0;
        double maxWidth = 0.0;
        List itemsInColumn = new ArrayList();
        for (int i = 0; i < blocks.size(); i++) {
            Block block = (Block) blocks.get(i);
            Size2D size = block.arrange(canvas, RectangleConstraint.NONE);
            if (y + size.height <= height) {
                itemsInColumn.add(block);
                block.setBounds(new RectShape(x, y, size.width,
                        size.height));
                y = y + size.height + this.verticalGap;
                maxWidth = Math.max(maxWidth, size.width);
            } else {
                if (itemsInColumn.isEmpty()) {
                    block.setBounds(new RectShape(x, y, size.width,
                            Math.min(size.height, height - y)));
                    y = 0.0;
                    x = x + size.width + this.horizontalGap;
                } else {
                    itemsInColumn.clear();
                    x = x + maxWidth + this.horizontalGap;
                    y = 0.0;
                    maxWidth = size.width;
                    block.setBounds(new RectShape(x, y, size.width,
                            Math.min(size.height, height)));
                    y = size.height + this.verticalGap;
                    itemsInColumn.add(block);
                }
            }
        }
        return new Size2D(x + maxWidth, constraint.getHeight());
    }
protected Size2D arrangeNF ( BlockContainer container , Canvas canvas , RectangleConstraint constraint ) { List blocks = container . getBlocks ( ) ; double height = constraint . getHeight ( ) ; if ( height <= 0.0 ) { height = Double . POSITIVE_INFINITY ; } double x = 0.0 ; double y = 0.0 ; double maxWidth = 0.0 ; List itemsInColumn = new ArrayList ( ) ; for ( int i = 0 ; i < blocks . size ( ) ; i ++ ) { Block block = ( Block ) blocks . get ( i ) ; Size2D size = block . arrange ( canvas , RectangleConstraint . NONE ) ; if ( y + size . height <= height ) { itemsInColumn . add ( block ) ; block . setBounds ( new RectShape ( x , y , size . width , size . height ) ) ; y = y + size . height + this . verticalGap ; maxWidth = Math . max ( maxWidth , size . width ) ; } else { if ( itemsInColumn . isEmpty ( ) ) { block . setBounds ( new RectShape ( x , y , size . width , Math . min ( size . height , height - y ) ) ) ; y = 0.0 ; x = x + size . width + this . horizontalGap ; } else { itemsInColumn . clear ( ) ; x = x + maxWidth + this . horizontalGap ; y = 0.0 ; maxWidth = size . width ; block . setBounds ( new RectShape ( x , y , size . width , Math . min ( size . height , height ) ) ) ; y = size . height + this . verticalGap ; itemsInColumn . add ( block ) ; } } } return new Size2D ( x + maxWidth , constraint . getHeight ( ) ) ; }
Calculates and sets the bounds of all the items in the specified
 container, subject to the given constraint.
Calculates and sets the bounds of all the items in the specified container subject to the given constraint .
// place in this column (truncated) anyway // start new column