com.vaadin.flow.component.grid.
Class FooterRow
All Implemented Interfaces:
One row of FooterRow.FooterCell
s in a Grid.
Author:
Vaadin Ltd.
See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<FooterRow.FooterCell>
protected com.vaadin.flow.component.grid.ColumnLayer
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addCell
(int index, com.vaadin.flow.component.grid.AbstractColumn<?> column) getCell
(Grid.Column<?> column) Gets the cell on this row that is on the given column.
getCells()
Gets the cells that belong to this row as an unmodifiable list.
protected boolean
Gets whether this is the top-most HeaderRow or the bottom-most FooterRow.
join
(FooterRow.FooterCell... cells) Replaces the given cells with a new cell that takes the full space of the joined cells.
join
(Grid.Column<?>... columns) Joins the cells corresponding the given columns in the row.
join
(Collection<FooterRow.FooterCell> cells) Replaces the given cells with a new cell that takes the full space of the joined cells.
protected void
removeCell
(com.vaadin.flow.component.grid.AbstractColumn<?> columnComponent) protected void
setColumns
(List<com.vaadin.flow.component.grid.AbstractColumn<?>> columns) Change the cells to wrap the given columns
protected void
setLayer
(com.vaadin.flow.component.grid.ColumnLayer layer) Change this row to wrap the given layer
-
Field Details
-
layer
protected com.vaadin.flow.component.grid.ColumnLayer layer -
cells
-
-
Method Details
-
join
Replaces the given cells with a new cell that takes the full space of the joined cells.
The cells to join must be adjacent cells in this row, and this row must be the out-most row.
The way that the client-side web component works also causes some limitations to which cells can be joined. For example, if you join the first and second cell in the header, you cannot join the second and third cell in the footer. This is because the headers and footers use the same elements in the client-side and it's not possible to create a hierarchical DOM structure to support this case. You can, however, join all three cells in the footer, because then it's again possible to organize the client-side elements in a hierarchical structure.
Parameters:
cells
- the cells to joinReturns:
the merged cell
-
isOutmostRow
protected boolean isOutmostRow()Gets whether this is the top-most HeaderRow or the bottom-most FooterRow.
Returns:
whether this is the outmost row
-
setLayer
protected void setLayer(com.vaadin.flow.component.grid.ColumnLayer layer) Change this row to wrap the given layer
Parameters:
layer
- the layer to wrap -
setColumns
Change the cells to wrap the given columns
Parameters:
columns
- new column components for the cells -
addCell
protected void addCell(int index, com.vaadin.flow.component.grid.AbstractColumn<?> column) -
removeCell
protected void removeCell(com.vaadin.flow.component.grid.AbstractColumn<?> columnComponent) -
getCells
Gets the cells that belong to this row as an unmodifiable list.
Returns:
the cells on this row
-
getCell
Gets the cell on this row that is on the given column.
Parameters:
column
- the column to find cell forReturns:
the corresponding cell
Throws:
IllegalArgumentException
- if the column does not belong to the same grid as this row -
join
Joins the cells corresponding the given columns in the row.
The columns must be adjacent, and this row must be the out-most row.
The way that the client-side web component works also causes some limitations to which cells can be joined. For example, if you join the first and second cell in the header, you cannot join the second and third cell in the footer. This is because the headers and footers use the same elements in the client-side and it's not possible to create a hierarchical DOM structure to support this case. You can, however, join all three cells in the footer, because then it's again possible to organize the client-side elements in a hierarchical structure.
Parameters:
columns
- the columns of the cells that should be joinedReturns:
the merged cell
Throws:
IllegalArgumentException
- if it's not possible to join the given cellsSee Also:
-
join
Replaces the given cells with a new cell that takes the full space of the joined cells.
The cells to join must be adjacent cells in this row, and this row must be the out-most row.
The way that the client-side web component works also causes some limitations to which cells can be joined. For example, if you join the first and second cell in the header, you cannot join the second and third cell in the footer. This is because the headers and footers use the same elements in the client-side and it's not possible to create a hierarchical DOM structure to support this case. You can, however, join all three cells in the footer, because then it's again possible to organize the client-side elements in a hierarchical structure.
Parameters:
cells
- the cells to joinReturns:
the merged cell
Throws:
IllegalArgumentException
- if it's not possible to join the given cells
-