Package com.vaadin.ui
Class Grid.HeaderCell
- java.lang.Object
-
- com.vaadin.ui.Grid.HeaderCell
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- Grid
public static class Grid.HeaderCell extends Object
Represents a header cell in Grid. Can be a merged cell for multiple columns.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HeaderCell(Grid.HeaderRow row)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected GridStaticSectionState.CellState
getCellState()
GridStaticCellType
getCellType()
Returns the type of content stored in this cell.Component
getComponent()
Returns the component displayed in this cell.String
getHtml()
Returns the HTML content displayed in this cell.Grid.StaticSection.StaticRow<?>
getRow()
Gets the row where this cell is.String
getStyleName()
Returns the custom style name for this cell.String
getText()
Returns the text displayed in this cell.protected void
readDesign(org.jsoup.nodes.Element cellElement, DesignContext designContext)
Reads the declarative design from the given table cell element.void
setComponent(Component component)
Sets the component displayed in this cell.void
setHtml(String html)
Sets the HTML content displayed in this cell.void
setStyleName(String styleName)
Sets a custom style name for this cell.void
setText(String text)
Sets the text displayed in this cell.protected void
writeDesign(org.jsoup.nodes.Element cellElement, DesignContext designContext)
Writes the declarative design to the given table cell element.
-
-
-
Constructor Detail
-
HeaderCell
protected HeaderCell(Grid.HeaderRow row)
-
-
Method Detail
-
getRow
public Grid.StaticSection.StaticRow<?> getRow()
Gets the row where this cell is.- Returns:
- row for this cell
-
getCellState
protected GridStaticSectionState.CellState getCellState()
-
setText
public void setText(String text)
Sets the text displayed in this cell.- Parameters:
text
- a plain text caption
-
getText
public String getText()
Returns the text displayed in this cell.- Returns:
- the plain text caption
-
getHtml
public String getHtml()
Returns the HTML content displayed in this cell.- Returns:
- the html
-
setHtml
public void setHtml(String html)
Sets the HTML content displayed in this cell.- Parameters:
html
- the html to set
-
getComponent
public Component getComponent()
Returns the component displayed in this cell.- Returns:
- the component
-
setComponent
public void setComponent(Component component)
Sets the component displayed in this cell.- Parameters:
component
- the component to set
-
getCellType
public GridStaticCellType getCellType()
Returns the type of content stored in this cell.- Returns:
- cell content type
-
getStyleName
public String getStyleName()
Returns the custom style name for this cell.- 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 cell.- Parameters:
styleName
- the style name to set or null to not use any style name
-
writeDesign
protected void writeDesign(org.jsoup.nodes.Element cellElement, DesignContext designContext)
Writes the declarative design to the given table cell element.- Parameters:
cellElement
- Element to write design todesignContext
- the design context- Since:
- 7.5.0
-
readDesign
protected void readDesign(org.jsoup.nodes.Element cellElement, DesignContext designContext)
Reads the declarative design from the given table cell element.- Parameters:
cellElement
- Element to read design fromdesignContext
- the design context- Since:
- 7.5.0
-
-