tableElement.setAttribute("style", tableCssStyle.renderInline());
parentNode.appendChild(tableElement);
TableColumnModel columnModel = table.getColumnModel();
int columnCount = columnModel.getColumnCount();
boolean someColumnsHaveWidths = false;
for (int i = 0; i < columnCount; ++i) {
if (columnModel.getColumn(i).getWidth() != null) {
someColumnsHaveWidths = true;
}
}
if (someColumnsHaveWidths) {
Element colGroupElement = document.createElement("colgroup");
tableElement.appendChild(colGroupElement);
for (int i = 0; i < columnCount; ++i) {
Element colElement = document.createElement("col");
Extent columnWidth = columnModel.getColumn(i).getWidth();
if (columnWidth != null) {
colElement.setAttribute("width", ExtentRender.renderCssAttributeValue(columnWidth));
}
colGroupElement.appendChild(colElement);
}