com.vaadin.flow.component.grid.
Class FooterRow
- java.lang.Object
-
- com.vaadin.flow.component.grid.FooterRow
-
All Implemented Interfaces:
public class FooterRow extends Object
One row of
FooterRow.FooterCell
s in a Grid.Author:
Vaadin Ltd.
See Also:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
AbstractRow.AbstractCell
Base class for header and footer cells.
static class
FooterRow.FooterCell
A footer cell in a Grid.
-
Field Summary
Fields Modifier and Type Field and Description protected List<CELL>
cells
protected com.vaadin.flow.component.grid.ColumnLayer
layer
-
Method Summary
All Methods Modifier and Type Method and Description protected void
addCell(int index, com.vaadin.flow.component.grid.AbstractColumn<?> column)
CELL
getCell(Grid.Column<?> column)
Gets the cell on this row that is on the given column.
List<CELL>
getCells()
Gets the cells that belong to this row as an unmodifiable list.
protected boolean
isOutmostRow()
Gets whether this is the top-most HeaderRow or the bottom-most FooterRow.
CELL
join(CELL... cells)
Replaces the given cells with a new cell that takes the full space of the joined cells.
FooterRow.FooterCell
join(Collection<FooterRow.FooterCell> cells)
Replaces the given cells with a new cell that takes the full space of the joined cells.
CELL
join(Grid.Column<?>... columns)
Joins the cells corresponding the given columns in the row.
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 Detail
-
layer
protected com.vaadin.flow.component.grid.ColumnLayer layer
-
cells
protected List<CELL extends AbstractRow.AbstractCell> cells
-
-
Method Detail
-
join
public FooterRow.FooterCell join(Collection<FooterRow.FooterCell> cells)
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
protected void setColumns(List<com.vaadin.flow.component.grid.AbstractColumn<?>> columns)
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
public List<CELL> getCells()
Gets the cells that belong to this row as an unmodifiable list.
Returns:
the cells on this row
-
getCell
public CELL getCell(Grid.Column<?> column)
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
public CELL join(Grid.Column<?>... columns)
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
public CELL join(CELL... cells)
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
-
-