Html html_TableName = new Html(tableName);
html_TableName.setStyle("padding-left: 5px;");
Div divKey = new Div();
divKey.setAlign("left");
divKey.appendChild(html_TableName);
Html html_RecordCount = null;
if (value instanceof BigDecimal) {
BigDecimal myDec = (BigDecimal) value;
myDec = myDec.setScale(2, BigDecimal.ROUND_HALF_UP);
// Format the value to money
NumberFormat formatter = new DecimalFormat("#,##0.00");
String money = formatter.format(myDec);
html_RecordCount = new Html(money);
} else if (value instanceof Integer) {
html_RecordCount = new Html(String.valueOf(value));
} else
html_RecordCount = new Html(String.valueOf(value));
if (!color.equalsIgnoreCase("black")) {
html_RecordCount.setStyle("padding-right: 5px; color: " + color + ";");
} else
html_RecordCount.setStyle("padding-right: 5px;");
Div divValue = new Div();
divValue.setAlign("right");
divValue.appendChild(html_RecordCount);
row.appendChild(divKey);
row.appendChild(divValue);
row.setParent(rowParent);
}