Package com.vaadin.client.widgets
Class Grid.StaticSection.StaticRow<CELLTYPE extends Grid.StaticSection.StaticCell>
- java.lang.Object
-
- com.vaadin.client.widgets.Grid.StaticSection.StaticRow<CELLTYPE>
-
- Type Parameters:
CELLTYPE- the type of the cells in the row
- Direct Known Subclasses:
Grid.FooterRow,Grid.HeaderRow
- Enclosing class:
- Grid.StaticSection<ROWTYPE extends Grid.StaticSection.StaticRow<?>>
public abstract static class Grid.StaticSection.StaticRow<CELLTYPE extends Grid.StaticSection.StaticCell> extends Object
Abstract base class for Grid header and footer rows.
-
-
Constructor Summary
Constructors Constructor Description StaticRow()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddCell(Grid.Column<?,?> column)Creates and adds a cell to this row for the given column.protected abstract CELLTYPEcreateCell()Creates a cell of a type that matches this row.CELLTYPEgetCell(Grid.Column<?,?> column)Returns the cell on given GridColumn.protected Grid.StaticSection<?>getSection()Returns the section where this row belongs.protected intgetSizeOfCellGroup(Grid.Column<?,?> column)Returns the size of the cell group for the given column.StringgetStyleName()Returns the custom style name for this row.booleanhasSpannedCells()Returnstrueif this row contains spanned cells.CELLTYPEjoin(CELLTYPE... cells)Merges columns cells in a row.CELLTYPEjoin(Grid.Column<?,?>... columns)Merges columns cells in a row.protected voidremoveCell(Grid.Column<?,?> column)Removes a cell for the given column from this row.protected voidsetSection(Grid.StaticSection<?> section)Sets the section where this row belongs.voidsetStyleName(String styleName)Sets a custom style name for this row.
-
-
-
Method Detail
-
getCell
public CELLTYPE getCell(Grid.Column<?,?> column)
Returns the cell on given GridColumn. If the column is merged returned cell is the cell for the whole group.- Parameters:
column- the column in grid- Returns:
- the cell on given column, merged cell for merged columns, null if not found
-
hasSpannedCells
public boolean hasSpannedCells()
Returnstrueif this row contains spanned cells.- Returns:
- does this row contain spanned cells
- Since:
- 7.5.0
-
join
public CELLTYPE join(Grid.Column<?,?>... columns)
Merges columns cells in a row.- Parameters:
columns- the columns which header should be merged- Returns:
- the remaining visible cell after the merge, or the cell on first column if all are hidden
-
join
public CELLTYPE join(CELLTYPE... cells)
Merges columns cells in a row.- Parameters:
cells- The cells to merge. Must be from the same row.- Returns:
- The remaining visible cell after the merge, or the first cell if all columns are hidden
-
getSizeOfCellGroup
protected int getSizeOfCellGroup(Grid.Column<?,?> column)
Returns the size of the cell group for the given column. Zero if no cell group is set.- Parameters:
column- the column whose cell group size is being investigated- Returns:
- size of the cell group, default is
0
-
addCell
protected void addCell(Grid.Column<?,?> column)
Creates and adds a cell to this row for the given column.- Parameters:
column- the column that requires a new cell
-
removeCell
protected void removeCell(Grid.Column<?,?> column)
Removes a cell for the given column from this row.- Parameters:
column- the column that should have its cell reference cleared
-
createCell
protected abstract CELLTYPE createCell()
Creates a cell of a type that matches this row.- Returns:
- a new cell
-
getSection
protected Grid.StaticSection<?> getSection()
Returns the section where this row belongs.- Returns:
- the section
-
setSection
protected void setSection(Grid.StaticSection<?> section)
Sets the section where this row belongs. Should not be null.- Parameters:
section- the section to set
-
getStyleName
public String getStyleName()
Returns the custom style name for this row.- Returns:
- the style name or null if no style name has been set
-
setStyleName
public void setStyleName(String styleName)
Sets a custom style name for this row.- Parameters:
styleName- the style name to set or null to not use any style name
-
-