root .setHeight( getCurrentBP( ) + getOffsetY( ) + getDimensionValue( areaStyle .getProperty( StyleConstants.STYLE_PADDING_BOTTOM ) ) + getDimensionValue( areaStyle .getProperty( StyleConstants.STYLE_BORDER_BOTTOM_WIDTH )) );
int height = getCurrentBP( ) + getOffsetY( ) + getDimensionValue( areaStyle .getProperty( StyleConstants.STYLE_PADDING_BOTTOM ) ) + getDimensionValue( areaStyle .getProperty( StyleConstants.STYLE_BORDER_BOTTOM_WIDTH ) ); if ( isFirst && isLast ) { calculateSpecifiedHeight( ); if ( specifiedHeight > height ) { CSSValue verticalAlign = areaStyle .getProperty( IStyle.STYLE_VERTICAL_ALIGN ); if ( IStyle.BOTTOM_VALUE.equals( verticalAlign ) || IStyle.MIDDLE_VALUE.equals( verticalAlign ) ) { int offset = specifiedHeight - height; if ( IStyle.BOTTOM_VALUE.equals( verticalAlign ) ) { Iterator iter = root.getChildren( ); while ( iter.hasNext( ) ) { AbstractArea child = (AbstractArea) iter.next( ); child.setAllocatedPosition( child.getAllocatedX( ), child.getAllocatedY( ) + offset ); } } else if ( IStyle.MIDDLE_VALUE.equals( verticalAlign ) ) { Iterator iter = root.getChildren( ); while ( iter.hasNext( ) ) { AbstractArea child = (AbstractArea) iter.next( ); child.setAllocatedPosition( child.getAllocatedX( ), child.getAllocatedY( ) + offset / 2 ); } } } height = specifiedHeight; } } root.setHeight( height );
	protected void closeLayout( )	{		if(root==null)		{			return;		}		IStyle areaStyle = root.getStyle( );		if ( !isLast )		{			// set dimension property for root			// TODO suppport user defined height			areaStyle.setProperty( IStyle.STYLE_BORDER_BOTTOM_WIDTH,					IStyle.NUMBER_0 );			areaStyle.setProperty( IStyle.STYLE_PADDING_BOTTOM,					IStyle.NUMBER_0 );			areaStyle.setProperty( IStyle.STYLE_MARGIN_BOTTOM, IStyle.NUMBER_0 );		}				// FIXME currently do not consider a spcial case...		root				.setHeight( getCurrentBP( )						+ getOffsetY( )						+ getDimensionValue( areaStyle								.getProperty( StyleConstants.STYLE_PADDING_BOTTOM ) )						+ getDimensionValue( areaStyle								.getProperty( StyleConstants.STYLE_BORDER_BOTTOM_WIDTH )) );	}