afreechart/src/main/java/org/afree/chart/title/LegendGraphic.java
/**
     * Performs the layout with no constraint, so the content size is determined
     * by the bounds of the shape and/or line drawn to represent the series.
     * 
     * @param canvas
     *            the graphics device.
     * 
     * @return The content size.
     */
Performs the layout with no constraint, so the content size is determined
by the bounds of the shape and/or line drawn to represent the series.

@param canvas
the graphics device.

@return The content size.
Performs the layout with no constraint so the content size is determined by the bounds of the shape and / or line drawn to represent the series . @param canvas the graphics device . @return The content size .
protected Size2D arrangeNN(Canvas canvas) {
        RectShape contentSize = new RectShape();
        if (this.line != null) {
            this.line.getBounds(this.mWorkRectShape);
            contentSize.setRect(this.mWorkRectShape);
        }
        if (this.shape != null) {
            this.shape.getBounds(this.mWorkRectShape);
            contentSize = contentSize.createUnion(this.mWorkRectShape);
        }
        return new Size2D(contentSize.getWidth(), contentSize.getHeight());
    }
protected Size2D arrangeNN ( Canvas canvas ) { RectShape contentSize = new RectShape ( ) ; if ( this . line != null ) { this . line . getBounds ( this . mWorkRectShape ) ; contentSize . setRect ( this . mWorkRectShape ) ; } if ( this . shape != null ) { this . shape . getBounds ( this . mWorkRectShape ) ; contentSize = contentSize . createUnion ( this . mWorkRectShape ) ; } return new Size2D ( contentSize . getWidth ( ) , contentSize . getHeight ( ) ) ; }
Performs the layout with no constraint, so the content size is determined
 by the bounds of the shape and/or line drawn to represent the series.
Performs the layout with no constraint so the content size is determined by the bounds of the shape and / or line drawn to represent the series .
//performance tuning //contentSize.setRect(this.line.getBounds()); //contentSize = contentSize.createUnion(this.shape.getBounds());