public Cell createCell(Row row, Object value) { Cell cell = new Cell(value == null ? null : value.toString()); row.addChild(cell); return cell; } }
/** * Adds a cell to the grid row. * * @param row List row. * @param label Label text for cell. * @return Newly created cell. */ public Cell addCell(Row row, String label) { Cell cell = new Cell(label); row.addChild(cell); return cell; }
private void createCell(Row row, Object data) { Cell cell = new Cell(); cell.setLabel(data == null ? null : data.toString()); row.addChild(cell); } }
/** * Add a cell to the row. * * @param row Grid row to receive new cell; * @param label Text label for the cell. * @param max Maximum # of allowable cells. * @return True if a cell was added. */ private boolean addCell(Row row, String label, int max) { if (max == 0 || row.getChildCount() < max) { row.addChild(new Cell(label)); return true; } return false; } }
/** * Add a row containing the specified header (left column) and value container (right column). * * @param header Text for header column * @param container Object containing text value(s) */ protected void addRow(String header, BaseComponent container) { Row row = new Row(); grid.getRows().addChild(row); Div div = new Div(); Label label = new Label(header + ":"); label.addStyle("font-weight", "bold"); label.addStyle("word-wrap", "word-break"); row.addChild(div); row.addChild(label); row.addChild(container); }
/** * Adds a cell with the specified content to the grid row. * * @param row List row. * @param label Content for cell. Auto-detects type of content. * @return Newly created cell. */ public Span addContent(Row row, String label) { Span cell = new Span(); cell.addChild(CWFUtil.getTextComponent(label)); row.addChild(cell); return cell; }
addRow("-------DEBUG--------", clazz.getName()); row = getLastRow(); row.addChild(new Label()); row.addClass(Constants.SCLASS_DRILLDOWN_GRID);
Rowcell cell = new Rowcell(); cell.setLabel(data == null ? null : data.toString()); row.addChild(cell); cell.setData(colData);