public UITableModel getModel() { return model; }
public void setModel(UITableModel model) { this.model = model; }
public void render (PrintStream writer) {
UITableModel model = this.model;
int[] widths = this.calculateRealColumnWidths(model);
int totalWidth = this.calculateTotalWidth(widths);
Object caption = model.getAttribute("caption");
if (caption != null) {
this.renderBorderHorizontal(writer, totalWidth);
this.renderSingleColumnRow(writer, String.valueOf(caption), totalWidth, UITableModel.CENTER);
}
if (model.isShowHeaders())
this.renderHeaders(writer, model, totalWidth, widths);
else
this.renderBorderHorizontal(writer, widths);
for (int r=0; r<model.getRowCount(); r++) {
this.renderColumns(writer, model, r, widths);
this.renderBorderHorizontal(writer, widths);
}
}