CSSValue align = content.getComputedStyle( ).getProperty( IStyle.STYLE_TEXT_ALIGN );  if ( ( IStyle.RIGHT_VALUE.equals(  align ) || IStyle.CENTER_VALUE .equals( align ) ) ) {  Iterator iter = cell.getChildren( ); while ( iter.hasNext( ) ) { AbstractArea area = (AbstractArea) iter.next( ); int spacing = cell.getContentWidth( ) - area.getAllocatedWidth( ) ; if(spacing>0) { if ( IStyle.RIGHT_VALUE.equals( align ) ) { area.setAllocatedPosition( spacing + area.getAllocatedX( ), area.getAllocatedY( ) ); } else if ( IStyle.CENTER_VALUE .equals( align ) ) { area.setAllocatedPosition( spacing / 2 + area.getAllocatedX( ), area.getAllocatedY( ) ); } } }  }
	protected void verticalAlign( CellArea cell )	{		IContent content = cell.getContent( );		if ( content == null )		{			return;		}		String verticalAlign = content.getComputedStyle( ).getVerticalAlign( );		if ( CSSConstants.CSS_BOTTOM_VALUE.equals( verticalAlign )				|| CSSConstants.CSS_MIDDLE_VALUE.equals( verticalAlign ) )		{			int totalHeight = 0;			Iterator iter = cell.getChildren( );			while ( iter.hasNext( ) )			{				AbstractArea child = (AbstractArea) iter.next( );				totalHeight += child.getAllocatedHeight( );			}			int offset = cell.getContentHeight( ) - totalHeight;			if ( offset > 0 )			{				if ( CSSConstants.CSS_BOTTOM_VALUE.equals( verticalAlign ) )				{					iter = cell.getChildren( );					while ( iter.hasNext( ) )					{						AbstractArea child = (AbstractArea) iter.next( );						child.setAllocatedPosition( child.getAllocatedX( ),								child.getAllocatedY( ) + offset );					}				}				else if ( CSSConstants.CSS_MIDDLE_VALUE.equals( verticalAlign ) )				{					iter = cell.getChildren( );					while ( iter.hasNext( ) )					{						AbstractArea child = (AbstractArea) iter.next( );						child.setAllocatedPosition( child.getAllocatedX( ),								child.getAllocatedY( ) + offset / 2 );					}				}			}		}	}