CELL - the type of the cells in the rowpublic abstract static class StaticSection.StaticRow<CELL extends com.vaadin.ui.components.grid.StaticSection.StaticCell> extends Object implements Serializable
| Modifier | Constructor and Description |
|---|---|
protected |
StaticRow(StaticSection<?> section)
Creates a new row belonging to the given section.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCell(Grid.Column<?,?> column)
Adds a cell to this section for given column.
|
protected void |
addCell(String columnId)
Adds a cell to this section, corresponding to the given user-defined
column id.
|
protected abstract CELL |
createCell()
Creates and returns a new instance of the cell type.
|
CELL |
getCell(Grid.Column<?,?> column)
Returns the cell in this section that corresponds to the given
column.
|
CELL |
getCell(String columnId)
Returns the cell in this section that corresponds to the given column
id.
|
protected abstract String |
getCellTagName()
Returns the declarative tag name used for the cells in this row.
|
Collection<? extends Component> |
getComponents() |
protected SectionState.RowState |
getRowState()
Returns the shared state of this row.
|
String |
getStyleName()
Returns the custom style name for this row.
|
protected void |
internalAddCell(String internalId)
Adds a cell to this section, corresponding to the given internal
column id.
|
protected CELL |
internalGetCell(String internalId)
Returns the cell in this section that corresponds to the given
internal column id.
|
protected void |
readDesign(org.jsoup.nodes.Element trElement,
DesignContext designContext)
Reads the declarative design from the given table row element.
|
protected void |
removeCell(String columnId)
Removes the cell from this section that corresponds to the given
column id.
|
void |
setStyleName(String styleName)
Sets a custom style name for this row.
|
protected void |
writeCellState(org.jsoup.nodes.Element cellElement,
DesignContext context,
SectionState.CellState state)
Writes declarative design for the cell using its
state to the
given table cell element. |
protected void |
writeDesign(org.jsoup.nodes.Element trElement,
DesignContext designContext)
Writes the declarative design to the given table row element.
|
protected StaticRow(StaticSection<?> section)
section - the section of the rowprotected abstract CELL createCell()
protected abstract String getCellTagName()
protected void addCell(String columnId)
columnId - the id of the column for which to add a cellprotected void addCell(Grid.Column<?,?> column)
column - the column for which to add a cellprotected void internalAddCell(String internalId)
internalId - the internal id of the column for which to add a cellprotected void removeCell(String columnId)
columnId - the id of the column from which to remove the cellprotected SectionState.RowState getRowState()
public CELL getCell(String columnId)
columnId - the id of the columnIllegalArgumentException - if no cell was found for the column idGrid.Column.setId(String)public CELL getCell(Grid.Column<?,?> column)
column - the columnIllegalArgumentException - if no cell was found for the columnpublic String getStyleName()
public void setStyleName(String styleName)
styleName - the style name to set or null to not use any style nameprotected CELL internalGetCell(String internalId)
internalId - the internal id of the columnIllegalArgumentException - if no cell was found for the column idprotected void readDesign(org.jsoup.nodes.Element trElement,
DesignContext designContext)
throws DesignException
trElement - Element to read design fromdesignContext - the design contextDesignException - if the given table row contains unexpected childrenprotected void writeDesign(org.jsoup.nodes.Element trElement,
DesignContext designContext)
trElement - Element to write design todesignContext - the design contextprotected void writeCellState(org.jsoup.nodes.Element cellElement,
DesignContext context,
SectionState.CellState state)
state to the
given table cell element.
The method is used instead of StaticCell::writeDesign because sometimes there is no a reference to the cell which should be written (merged cell) but only its state is available (the cell is virtual and is not stored).
cellElement - Element to write design tocontext - the design contextstate - a cell statepublic Collection<? extends Component> getComponents()
Copyright © 2021 Vaadin Ltd. All rights reserved.