public static Cell GetCell(Properties attributes)
{
Cell cell = new Cell();
String value;
cell.SetHorizontalAlignment(attributes[ElementTags.HORIZONTALALIGN]);
cell.SetVerticalAlignment(attributes[ElementTags.VERTICALALIGN]);
value = attributes[ElementTags.WIDTH];
if (value != null) {
cell.SetWidth(value);
}
value = attributes[ElementTags.COLSPAN];
if (value != null) {
cell.Colspan = int.Parse(value);
}
value = attributes[ElementTags.ROWSPAN];
if (value != null) {
cell.Rowspan = int.Parse(value);
}
value = attributes[ElementTags.LEADING];
if (value != null) {
cell.Leading = float.Parse(value, System.Globalization.NumberFormatInfo.InvariantInfo);
}
cell.Header = Utilities.CheckTrueOrFalse(attributes, ElementTags.HEADER);
if (Utilities.CheckTrueOrFalse(attributes, ElementTags.NOWRAP)) {
cell.MaxLines = 1;
}
SetRectangleProperties(cell, attributes);
return cell;
}