コード例 #1
0
 /**
  * Creates a place holding label cell
  *
  * @param rowSpan the row span the cell should be
  * @return a table cell holding a place holding label cell
  */
 protected AccountingLineTableCell getLabelCell() {
   AccountingLineTableCell cell = new AccountingLineTableCell();
   cell.setColSpan(colSpan);
   cell.setRendersAsHeader(true);
   cell.addRenderableElement(createHeaderLabel());
   return cell;
 }
  /**
   * Joins the header row with a line filling cell, which includes within it an inner table that
   * shows all the child fields
   *
   * @see
   *     org.kuali.kfs.sys.document.web.TableJoining#joinRow(org.kuali.kfs.sys.document.web.AccountingLineTableRow,
   *     org.kuali.kfs.sys.document.web.AccountingLineTableRow)
   */
  public void joinRow(AccountingLineTableRow headerLabelRow, AccountingLineTableRow row) {
    AccountingLineTableCell cell = new AccountingLineTableCell();

    AccountingLineTable columnsTable = new AccountingLineTable();

    List<AccountingLineTableRow> rows = createRowsForFields();

    columnsTable.setRows(rows);
    cell.addRenderableElement(columnsTable);
    headerLabelRow.addCell(cell);
  }
 /**
  * Creates an empty cell to pad out the place typically held for a cell
  *
  * @return an empty table cell that spans two columns
  */
 protected AccountingLineTableCell createPaddingCell() {
   AccountingLineTableCell cell = new AccountingLineTableCell();
   cell.setColSpan(2);
   cell.setNeverEmpty(true);
   return cell;
 }
 /**
  * Creates the "field" cell for the given field
  *
  * @param field the field to create a cell for
  * @return the cell withe field in it
  */
 protected AccountingLineTableCell createCellForField(AccountingLineViewField field) {
   AccountingLineTableCell cell = new AccountingLineTableCell();
   cell.addRenderableElement(field);
   return cell;
 }
 /**
  * Creates a header cell for for the given field
  *
  * @param field the field to create a header cell for
  * @return a header cell
  */
 protected AccountingLineTableCell createHeaderCellForField(AccountingLineViewField field) {
   AccountingLineTableCell headerCell = new AccountingLineTableCell();
   headerCell.setRendersAsHeader(true);
   headerCell.addRenderableElement(field.createHeaderLabel());
   return headerCell;
 }
コード例 #6
0
 /**
  * Returns an empty table cell, colspan cells wide
  *
  * @param rowSpan the number of rows this cell should span
  * @return an empty accounting line table cell that will fill up the space
  */
 protected AccountingLineTableCell getPlaceHoldingCell() {
   AccountingLineTableCell cell = new AccountingLineTableCell();
   cell.setColSpan(colSpan);
   cell.addRenderableElement(createHeaderLabel());
   return cell;
 }
コード例 #7
0
 /**
  * This will likely never be called
  *
  * @see org.kuali.kfs.sys.document.web.TableJoining#joinTable(java.util.List)
  */
 public void joinTable(List<AccountingLineTableRow> rows) {
   AccountingLineTableCell cell = getPlaceHoldingCell();
   cell.setRowSpan(rows.size());
   rows.get(0).addCell(getPlaceHoldingCell());
 }