Package com.vaadin.ui.components.grid
Class Header.Row
- java.lang.Object
-
- com.vaadin.ui.components.grid.StaticSection.StaticRow<Header.Row.Cell>
-
- com.vaadin.ui.components.grid.Header.Row
-
- All Implemented Interfaces:
HeaderRow,Serializable
- Enclosing class:
- Header
public class Header.Row extends StaticSection.StaticRow<Header.Row.Cell> implements HeaderRow
A row in a Grid header.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classHeader.Row.CellA cell in a Grid header row.
-
Constructor Summary
Constructors Modifier Constructor Description protectedRow()Creates a new header row.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Header.Row.CellcreateCell()Creates and returns a new instance of the cell type.protected StringgetCellTagName()Returns the declarative tag name used for the cells in this row.protected booleanisDefault()Returns whether this row is the default header row.HeaderCelljoin(HeaderCell... cellsToMerge)Merges column cells in the row.HeaderCelljoin(Grid.Column<?,?>... columnsToMerge)Merges cells corresponding to the given columns in the row.HeaderCelljoin(String... columnIdsToMerge)Merges cells corresponding to the given column ids in the row.HeaderCelljoin(Set<HeaderCell> cellsToMerge)Merges column cells in the row.protected voidreadDesign(org.jsoup.nodes.Element trElement, DesignContext designContext)Reads the declarative design from the given table row element.protected voidsetDefault(boolean defaultHeader)Sets whether this row is the default header row.protected voidwriteDesign(org.jsoup.nodes.Element trElement, DesignContext designContext)Writes the declarative design to the given table row element.-
Methods inherited from class com.vaadin.ui.components.grid.StaticSection.StaticRow
addCell, addCell, getCell, getCell, getComponents, getRowState, getStyleName, internalAddCell, internalGetCell, removeCell, setStyleName, writeCellState
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.ui.components.grid.HeaderRow
getCell, getCell, getComponents, getStyleName, setStyleName
-
-
-
-
Method Detail
-
createCell
protected Header.Row.Cell createCell()
Description copied from class:StaticSection.StaticRowCreates and returns a new instance of the cell type.- Specified by:
createCellin classStaticSection.StaticRow<Header.Row.Cell>- Returns:
- the created cell
-
getCellTagName
protected String getCellTagName()
Description copied from class:StaticSection.StaticRowReturns the declarative tag name used for the cells in this row.- Specified by:
getCellTagNamein classStaticSection.StaticRow<Header.Row.Cell>- Returns:
- the cell tag name
-
isDefault
protected boolean isDefault()
Returns whether this row is the default header row.- Returns:
trueif this row is the default row,falseotherwise.
-
setDefault
protected void setDefault(boolean defaultHeader)
Sets whether this row is the default header row.- Parameters:
defaultHeader-trueto set to default,falseotherwise.
-
join
public HeaderCell join(Set<HeaderCell> cellsToMerge)
Merges column cells in the row. Original cells are hidden, and new merged cell is shown instead. The cell has a width of all merged cells together, inherits styles of the first merged cell but has empty caption.- Specified by:
joinin interfaceHeaderRow- Parameters:
cellsToMerge- the cells which should be merged. The cells should not be merged to any other cell set.- Returns:
- the remaining visible cell after the merge
- See Also:
join(HeaderCell...),setCaption
-
join
public HeaderCell join(HeaderCell... cellsToMerge)
Merges column cells in the row. Original cells are hidden, and new merged cell is shown instead. The cell has a width of all merged cells together, inherits styles of the first merged cell but has empty caption.- Specified by:
joinin interfaceHeaderRow- Parameters:
cellsToMerge- the cells which should be merged. The cells should not be merged to any other cell set.- Returns:
- the remaining visible cell after the merge
- See Also:
join(Set),setCaption
-
join
public HeaderCell join(Grid.Column<?,?>... columnsToMerge)
Description copied from interface:HeaderRowMerges cells corresponding to the given columns in the row. Original cells are hidden, and new merged cell is shown instead. The cell has a width of all merged cells together, inherits styles of the first merged cell but has empty caption.- Specified by:
joinin interfaceHeaderRow- Parameters:
columnsToMerge- the columns of the cells that should be merged. The cells should not be merged to any other cell set.- Returns:
- the remaining visible cell after the merge
- See Also:
HeaderRow.join(Set),setCaption
-
join
public HeaderCell join(String... columnIdsToMerge)
Description copied from interface:HeaderRowMerges cells corresponding to the given column ids in the row. Original cells are hidden, and new merged cell is shown instead. The cell has a width of all merged cells together, inherits styles of the first merged cell but has empty caption.- Specified by:
joinin interfaceHeaderRow- Parameters:
columnIdsToMerge- the ids of the columns of the cells that should be merged. The cells should not be merged to any other cell set.- Returns:
- the remaining visible cell after the merge
- See Also:
HeaderRow.join(Set),setCaption,Grid.Column.setId(String)
-
readDesign
protected void readDesign(org.jsoup.nodes.Element trElement, DesignContext designContext)Description copied from class:StaticSection.StaticRowReads the declarative design from the given table row element.- Overrides:
readDesignin classStaticSection.StaticRow<Header.Row.Cell>- Parameters:
trElement- Element to read design fromdesignContext- the design context
-
writeDesign
protected void writeDesign(org.jsoup.nodes.Element trElement, DesignContext designContext)Description copied from class:StaticSection.StaticRowWrites the declarative design to the given table row element.- Overrides:
writeDesignin classStaticSection.StaticRow<Header.Row.Cell>- Parameters:
trElement- Element to write design todesignContext- the design context
-
-