* Creates a PdfPCell with these attributes.
* @param rowAttributes
* @return a PdfPCell based on these attributes.
*/
public LwgPdfPCell createPdfPCell(SimpleCell rowAttributes) {
LwgPdfPCell cell = new LwgPdfPCell();
cell.setBorder(NO_BORDER);
SimpleCell tmp = new SimpleCell(CELL);
tmp.setSpacing_left(spacing_left);
tmp.setSpacing_right(spacing_right);
tmp.setSpacing_top(spacing_top);
tmp.setSpacing_bottom(spacing_bottom);
tmp.cloneNonPositionParameters(rowAttributes);
tmp.softCloneNonPositionParameters(this);
cell.setCellEvent(tmp);
cell.setHorizontalAlignment(rowAttributes.horizontalAlignment);
cell.setVerticalAlignment(rowAttributes.verticalAlignment);
cell.setUseAscender(rowAttributes.useAscender);
cell.setUseBorderPadding(rowAttributes.useBorderPadding);
cell.setUseDescender(rowAttributes.useDescender);
cell.setColspan(colspan);
if (horizontalAlignment != LwgElement.ALIGN_UNDEFINED)
cell.setHorizontalAlignment(horizontalAlignment);
if (verticalAlignment != LwgElement.ALIGN_UNDEFINED)
cell.setVerticalAlignment(verticalAlignment);
if (useAscender)
cell.setUseAscender(useAscender);
if (useBorderPadding)
cell.setUseBorderPadding(useBorderPadding);
if (useDescender)
cell.setUseDescender(useDescender);
float p;
float sp_left = spacing_left;
if (Float.isNaN(sp_left)) sp_left = 0f;
float sp_right = spacing_right;
if (Float.isNaN(sp_right)) sp_right = 0f;
float sp_top = spacing_top;
if (Float.isNaN(sp_top)) sp_top = 0f;
float sp_bottom = spacing_bottom;
if (Float.isNaN(sp_bottom)) sp_bottom = 0f;
p = padding_left;
if (Float.isNaN(p)) p = 0f;
cell.setPaddingLeft(p + sp_left);
p = padding_right;
if (Float.isNaN(p)) p = 0f;
cell.setPaddingRight(p + sp_right);
p = padding_top;
if (Float.isNaN(p)) p = 0f;
cell.setPaddingTop(p + sp_top);
p = padding_bottom;
if (Float.isNaN(p)) p = 0f;
cell.setPaddingBottom(p + sp_bottom);
LwgElement element;
for (Iterator i = content.iterator(); i.hasNext(); ) {
element = (LwgElement)i.next();
cell.addElement(element);
}
return cell;
}