int borderTopWidth = PropertyUtil.getDimensionValue( style .getProperty( StyleConstants.STYLE_BORDER_TOP_WIDTH ) ); if(borderTopWidth>0)
int borderTopWidth = PropertyUtil.getDimensionValue( style.getProperty(StyleConstants.STYLE_BORDER_TOP_WIDTH)); int borderLeftWidth = PropertyUtil.getDimensionValue( style.getProperty(StyleConstants.STYLE_BORDER_LEFT_WIDTH)); int borderBottomWidth = PropertyUtil.getDimensionValue( style.getProperty(StyleConstants.STYLE_BORDER_BOTTOM_WIDTH)); int borderRightWidth = PropertyUtil.getDimensionValue( style.getProperty(StyleConstants.STYLE_BORDER_RIGHT_WIDTH));  if(borderTopWidth>0 || borderLeftWidth>0 || borderBottomWidth>0|| borderRightWidth>0)
		protected void drawContainer( IContainerArea container )		{			//get the style of the container			IStyle style = container.getStyle();			if ( null == style )			{				return;			}			ContainerPosition curPos;			if ( !containerStack.isEmpty() )				curPos = (ContainerPosition)containerStack.peek();				else 				curPos = new ContainerPosition(0, 0);			//content is null means it is the internal line area which has no			//content mapping, so it has no background/border etc.			if ( container.getContent( ) != null )			{				int layoutX = curPos.x + container.getX();				int layoutY = curPos.y + container.getY();				//the container's start position (the left top corner of the container)				float startX = layoutPointX2PDF (layoutX);				float startY = layoutPointY2PDF (layoutY);					//the dimension of the container				float width = pdfMeasure(container.getWidth());				float height = pdfMeasure(container.getHeight());				// Draws background color for the container, if the backgound				// color is NOT set, draw nothing.				Color bc = PropertyUtil.getColor( style						.getProperty( StyleConstants.STYLE_BACKGROUND_COLOR ) );				drawBackgroundColor( bc, startX, startY, width, height );				// Draws background image for the container. if the background				// image is NOT set, draw nothing.				drawBackgroundImage( style, startX, startY, width, height );				// the width of each border				int borderTopWidth = PropertyUtil.getDimensionValue( style						.getProperty( StyleConstants.STYLE_BORDER_TOP_WIDTH ) );				if(borderTopWidth>0)				{					Color borderTopColor = PropertyUtil.getColor( style							.getProperty( StyleConstants.STYLE_BORDER_TOP_COLOR ) );					drawBorder( new BorderInfo( layoutX,						layoutY + borderTopWidth / 2, layoutX								+ container.getWidth( ), layoutY								+ borderTopWidth / 2, borderTopWidth,						borderTopColor, style.getProperty( IStyle.STYLE_BORDER_TOP_STYLE ), BorderInfo.TOP_BORDER )); 				}				int borderLeftWidth = PropertyUtil.getDimensionValue( style						.getProperty( StyleConstants.STYLE_BORDER_LEFT_WIDTH ) );				if(borderLeftWidth>0)				{					Color borderLeftColor = PropertyUtil.getColor( style							.getProperty( StyleConstants.STYLE_BORDER_LEFT_COLOR ) );					drawBorder(new BorderInfo( layoutX							+ borderLeftWidth / 2, layoutY, layoutX							+ borderLeftWidth / 2,							layoutY + container.getHeight( ), borderLeftWidth,							borderLeftColor, style.getProperty( IStyle.STYLE_BORDER_LEFT_STYLE ), BorderInfo.LEFT_BORDER ));				}				int borderBottomWidth = PropertyUtil						.getDimensionValue( style								.getProperty( StyleConstants.STYLE_BORDER_BOTTOM_WIDTH ) );				if(borderBottomWidth>0)				{					Color borderBottomColor = PropertyUtil					.getColor( style							.getProperty( StyleConstants.STYLE_BORDER_BOTTOM_COLOR ) );					drawBorder(new BorderInfo( layoutX,							layoutY + container.getHeight( ) - borderBottomWidth							/ 2, layoutX + container.getWidth( ), layoutY							+ container.getHeight( ) - borderBottomWidth							/ 2, borderBottomWidth, borderBottomColor,							style.getProperty( IStyle.STYLE_BORDER_BOTTOM_STYLE ),					BorderInfo.BOTTOM_BORDER ));				}				int borderRightWidth = PropertyUtil						.getDimensionValue( style								.getProperty( StyleConstants.STYLE_BORDER_RIGHT_WIDTH ) );				if(borderRightWidth>0)				{					Color borderRightColor = PropertyUtil					.getColor( style							.getProperty( StyleConstants.STYLE_BORDER_RIGHT_COLOR ) );					drawBorder(new BorderInfo( layoutX							+ container.getWidth( ) - borderRightWidth / 2,							layoutY, layoutX + container.getWidth( )									- borderRightWidth / 2, layoutY									+ container.getHeight( ), borderRightWidth,							borderRightColor, style.getProperty( IStyle.STYLE_BORDER_RIGHT_STYLE ),BorderInfo.RIGHT_BORDER ));				}				// Checks if itself is the destination of a bookmark.				// if so, make a bookmark; if not, do nothing				makeBookmark( container, curPos );				// Handles hyper-link action				handleHyperlinkAction( container, curPos );			}		}