contents = template.div(cellBuilder.toSafeHtml());
}
// Build the cell.
HorizontalAlignmentConstant hAlign = column.getHorizontalAlignment();
VerticalAlignmentConstant vAlign = column.getVerticalAlignment();
String headerRef = tableId +"_h_"+curColumn;
if (hAlign != null && vAlign != null) {
trBuilder.append(template.tdBothAlign(tdClasses, headerRef,
hAlign.getTextAlignString(), vAlign.getVerticalAlignString(),
contents));
} else if (hAlign != null) {
trBuilder.append(template.tdHorizontalAlign(tdClasses, headerRef,
hAlign.getTextAlignString(), contents));
} else if (vAlign != null) {
trBuilder.append(template.tdVerticalAlign(tdClasses, headerRef,
vAlign.getVerticalAlignString(), contents));
} else {
trBuilder.append(template.td(tdClasses, headerRef, contents));
}
curColumn++;