public ScTableRow addDataRow() { ScTableRow e = new ScTableRow(); if (_rows.size() % 2 == 0) e.setHtmlClassForCells(DATA_TABLE_ODD_CLASS); else e.setHtmlClassForCells(DATA_TABLE_EVEN_CLASS); e.setAppendSpaceOnCells(true); return add(e); }
public void renderControl(ScServletData data, JwHtmlBuffer buf) { ScTableState state = getState(data); buf.open("table"); if (state.hasHtmlClass()) buf.printAttribute("class", state.getHtmlClass()); else { buf.printAttribute("border", state.getBorder()); buf.printAttribute("cellpadding", state.getCellPadding()); buf.printAttribute("cellspacing", state.getCellSpacing()); } if (state.isWidthPercent()) buf.printAttribute("width", state.getWidth() + "%"); else buf.printAttribute("width", state.getWidth()); if (state.isHeightPercent()) buf.printAttribute("height", state.getHeight() + "%"); else buf.printAttribute("height", state.getHeight()); buf.close(); for (ScTableRow row : _rows) row.render(data, buf); buf.end("table"); }
public ScTableRow addFooterRow() { ScTableRow e = new ScTableRow(); e.setHtmlClassForCells(DATA_TABLE_FOOTER_CLASS); e.setAppendSpaceOnCells(true); return add(e); }
public ScTableRow add(int index, ScTableRow e) { checkReadOnly(); e.setParent(this); _rows.add(index, e); return e; }