Interface CellTableBuilder<T>

Type Parameters:
T - the row data type
All Known Implementing Classes:
AbstractCellTableBuilder, DefaultCellTableBuilder

public interface CellTableBuilder<T>
Builder used to construct a CellTable.

The default implementation used by cell widths is DefaultCellTableBuilder.

  • Method Details

    • buildRow

      void buildRow(T rowValue, int absRowIndex)
      Build zero or more table rows for the specified row value.
      Parameters:
      rowValue - the value for the row to render
      absRowIndex - the absolute row index
    • finish

      Finish the building of rows and return the table section builder. Currently only HtmlTableSectionBuilder and its subclasses are supported.
    • getColumn

      HasCell<T,?> getColumn(Cell.Context context, T rowValue, Element elem)
      Return the column containing an element.
      Parameters:
      context - the context for the element
      rowValue - the value for the row corresponding to the element
      elem - the elm that the column contains
      Returns:
      the immediate column containing the element
    • getColumns

      Collection<HasCell<T,?>> getColumns()
      Return all the columns that this table builder has rendered.
    • getRowValueIndex

      int getRowValueIndex(TableRowElement row)
      Get the index of the primary row from the associated TableRowElement (an TR element).
      Parameters:
      row - the row element
      Returns:
      the row value index
    • getSubrowValueIndex

      int getSubrowValueIndex(TableRowElement row)
      Get the index of the subrow value from the associated TableRowElement (an TR element). The sub row value starts at 0 for the first row that represents a row value.
      Parameters:
      row - the row element
      Returns:
      the subrow value index, or 0 if not found
    • isColumn

      boolean isColumn(Element elem)
      Return if an element contains a cell. This may be faster to execute than getColumn(Context, Object, Element).
      Parameters:
      elem - the element of interest
    • start

      void start(boolean isRebuildingAllRows)
      Start building rows. User may want to reset the internal state of the table builder (e.g., reset the internal table section builder). A flag isRebuildingAllRows is used to mark whether the builder is going to rebuild all rows. User may want to have different reset logic given this flag.
      Parameters:
      isRebuildingAllRows - is this start intended for rebuilding all rows