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 Summary
Modifier and TypeMethodDescriptionvoid
Build zero or more table rows for the specified row value.finish()
Finish the building of rows and return the table section builder.getColumn
(Cell.Context context, T rowValue, Element elem) Return the column containing an element.Collection<HasCell<T,
?>> Return all the columns that this table builder has rendered.int
Get the index of the primary row from the associatedTableRowElement
(an TR element).int
Get the index of the subrow value from the associatedTableRowElement
(an TR element).boolean
Return if an element contains a cell.void
start
(boolean isRebuildingAllRows) Start building rows.
-
Method Details
-
buildRow
Build zero or more table rows for the specified row value.- Parameters:
rowValue
- the value for the row to renderabsRowIndex
- the absolute row index
-
finish
TableSectionBuilder finish()Finish the building of rows and return the table section builder. Currently onlyHtmlTableSectionBuilder
and its subclasses are supported. -
getColumn
Return the column containing an element.- Parameters:
context
- the context for the elementrowValue
- the value for the row corresponding to the elementelem
- 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
Get the index of the primary row from the associatedTableRowElement
(an TR element).- Parameters:
row
- the row element- Returns:
- the row value index
-
getSubrowValueIndex
Get the index of the subrow value from the associatedTableRowElement
(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
Return if an element contains a cell. This may be faster to execute thangetColumn(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
-