/** Constructs a <CODE>PdfPCell</CODE> with a <CODE>PdfPtable</CODE>.
* This constructor allows nested tables.
*
* @param table The <CODE>PdfPTable</CODE>
* @param style The style to apply to the cell (you could use getDefaultCell())
* @since 2.1.0
*/
public PdfPCell(PdfPTable table, PdfPCell style) : base(0, 0, 0, 0)
{
borderWidth = 0.5f;
border = BOX;
column.SetLeading(0, 1);
this.table = table;
table.WidthPercentage = 100;
table.ExtendLastRow = true;
column.AddElement(table);
if (style != null)
{
CloneNonPositionParameters(style);
verticalAlignment = style.verticalAlignment;
paddingLeft = style.paddingLeft;
paddingRight = style.paddingRight;
paddingTop = style.paddingTop;
paddingBottom = style.paddingBottom;
colspan = style.colspan;
rowspan = style.rowspan;
cellEvent = style.cellEvent;
useDescender = style.useDescender;
useBorderPadding = style.useBorderPadding;
rotation = style.rotation;
}
else
{
Padding = 0;
}
}