if ( data.rowCount != 0 )
if ( data.rowCount > data.rowPos )
	public void layout( IFigure parent )	{		data = new WorkingData( );		Rectangle relativeArea = parent.getClientArea( );		data.area = relativeArea;		Iterator iterator = parent.getChildren( ).iterator( );		int dx;		//Calculate the hints to be passed to children		int wHint = parent.getClientArea( ).width;		int hHint = -1;		initVariables( parent );		initRow( );		int i = 0;		int display = ReportItemConstraint.NONE;		int lastDisplay = ReportItemConstraint.NONE;		while ( iterator.hasNext( ) )		{			IFigure f = (IFigure) iterator.next( );			Insets fmargin = getFigureMargin( f );			// Block elements take the whole space, in-line and none take -1			if ( getDisplay( f ) == ReportItemConstraint.BLOCK )			{				wHint = parent.getClientArea( ).width;			}			else			{				wHint = -1;			}			if ( wHint != -1 )			{				wHint = Math.max( 0, wHint - fmargin.getWidth( ) );			}			Dimension pref = getChildSize( f, wHint, hHint );			// Hack to allow in-line label wrap.			if ( f instanceof LabelFigure					&& ( pref.width + fmargin.getWidth( ) ) > parent.getClientArea( ).width )			{				pref = getChildSize( f,						Math.max( 0, parent.getClientArea( ).width								- fmargin.getWidth( ) ),						hHint );			}			Rectangle r = new Rectangle( 0,					0,					pref.width + fmargin.getWidth( ),					pref.height + fmargin.getHeight( ) );			display = getDisplay( f );			if ( data.rowCount > 0 )			{				if ( ( data.rowWidth + r.width > data.maxWidth )						|| display == ReportItemConstraint.BLOCK						|| lastDisplay == ReportItemConstraint.BLOCK )					layoutRow( parent );			}			lastDisplay = display;			r.x = data.rowX;			r.y = data.rowY;			dx = r.width + getMinorSpacing( );			data.rowX += dx;			data.rowWidth += dx;			data.rowHeight = Math.max( data.rowHeight, r.height );			data.row[data.rowCount] = f;			data.bounds[data.rowCount] = r;			data.rowCount++;			i++;		}		if ( data.rowCount != 0 )		{			layoutRow( parent );		}		data = null;	}