Examples of UITableModel


Examples of net.sourceforge.javautil.ui.model.UITableModel

  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);
    }
   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.