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:
Enclosing class:
public class Header.Row extends StaticSection.StaticRow<Header.Row.Cell> implements HeaderRow
A row in a Grid header.
See Also:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Header.Row.Cell
A cell in a Grid header row.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Row()
Creates a new header row.
-
Method Summary
All Methods Modifier and Type Method Description protected Header.Row.Cell
createCell()
Creates and returns a new instance of the cell type.
protected String
getCellTagName()
Returns the declarative tag name used for the cells in this row.
protected boolean
isDefault()
Returns whether this row is the default header row.
HeaderCell
join(HeaderCell... cellsToMerge)
Merges column cells in the row.
HeaderCell
join(Grid.Column<?,?>... columnsToMerge)
Merges cells corresponding to the given columns in the row.
HeaderCell
join(String... columnIdsToMerge)
Merges cells corresponding to the given column ids in the row.
HeaderCell
join(Set<HeaderCell> cellsToMerge)
Merges column cells in the row.
protected void
readDesign(org.jsoup.nodes.Element trElement, DesignContext designContext)
Reads the declarative design from the given table row element.
protected void
setDefault(boolean defaultHeader)
Sets whether this row is the default header row.
protected void
writeDesign(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.StaticRow
Creates and returns a new instance of the cell type.
Specified by:
createCell
in classStaticSection.StaticRow<Header.Row.Cell>
Returns:
the created cell
-
getCellTagName
protected String getCellTagName()
Description copied from class:
StaticSection.StaticRow
Returns the declarative tag name used for the cells in this row.
Specified by:
getCellTagName
in classStaticSection.StaticRow<Header.Row.Cell>
Returns:
the cell tag name
-
isDefault
protected boolean isDefault()
Returns whether this row is the default header row.
Returns:
true
if this row is the default row,false
otherwise.
-
setDefault
protected void setDefault(boolean defaultHeader)
Sets whether this row is the default header row.
Parameters:
defaultHeader
-true
to set to default,false
otherwise.
-
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:
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
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:
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
public HeaderCell join(Grid.Column<?,?>... columnsToMerge)
Description copied from interface:
HeaderRow
Merges 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:
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:
-
join
public HeaderCell join(String... columnIdsToMerge)
Description copied from interface:
HeaderRow
Merges 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:
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:
-
readDesign
protected void readDesign(org.jsoup.nodes.Element trElement, DesignContext designContext)
Description copied from class:
StaticSection.StaticRow
Reads the declarative design from the given table row element.
Overrides:
readDesign
in 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.StaticRow
Writes the declarative design to the given table row element.
Overrides:
writeDesign
in classStaticSection.StaticRow<Header.Row.Cell>
Parameters:
trElement
- Element to write design todesignContext
- the design context
-
-