public static class Grid.StaticSection.StaticCell extends Object
| Constructor and Description |
|---|
StaticCell() |
| Modifier and Type | Method and Description |
|---|---|
int |
getColspan()
Returns the amount of columns the cell spans.
|
String |
getDescription()
Gets the tooltip for the cell.
|
ContentMode |
getDescriptionContentMode()
Gets the content mode for the tooltip.
|
String |
getHtml()
Returns the html inside the cell.
|
protected Grid.StaticSection<?> |
getSection()
Returns the section where this cell belongs.
|
String |
getStyleName()
Returns the custom style name for this cell.
|
String |
getText()
Returns the text displayed in this cell.
|
GridStaticCellType |
getType()
Returns the type of the cell.
|
com.google.gwt.user.client.ui.Widget |
getWidget()
Returns the widget in the cell.
|
void |
setColspan(int colspan)
Sets the amount of columns the cell spans.
|
void |
setDescription(String description)
Sets the tooltip for the cell.
|
void |
setDescription(String description,
ContentMode descriptionContentMode)
Sets the tooltip for the cell to be shown with the given content
mode.
|
void |
setDescriptionContentMode(ContentMode descriptionContentMode)
Sets the content mode for the tooltip.
|
void |
setHtml(String html)
Sets the content of the cell to the provided html.
|
protected void |
setSection(Grid.StaticSection<?> section)
Sets the section where this cell belongs.
|
void |
setStyleName(String styleName)
Sets a custom style name for this cell.
|
void |
setText(String text)
Sets the text displayed in this cell.
|
void |
setWidget(com.google.gwt.user.client.ui.Widget widget)
Set widget as the content of the cell.
|
public void setText(String text)
text - a plain text captionpublic String getText()
protected Grid.StaticSection<?> getSection()
protected void setSection(Grid.StaticSection<?> section)
section - the section to setpublic int getColspan()
public void setColspan(int colspan)
colspan - the colspan to setpublic String getHtml()
IllegalStateException - if trying to retrive HTML from a cell with a type
other than GridStaticCellType.HTML.public void setHtml(String html)
GridStaticCellType.HTML.html - The html content of the cellpublic com.google.gwt.user.client.ui.Widget getWidget()
IllegalStateException - if the cell is not GridStaticCellType.WIDGETpublic void setWidget(com.google.gwt.user.client.ui.Widget widget)
GridStaticCellType.WIDGET. All previous content
is discarded.widget - The widget to add to the cell. Should not be
previously attached anywhere (widget.getParent ==
null).public GridStaticCellType getType()
public String getStyleName()
public void setStyleName(String styleName)
styleName - the style name to set or null to not use any style
namepublic String getDescription()
The tooltip is shown in the mode returned by
getDescriptionContentMode().
public void setDescription(String description)
By default, tooltips are shown as plain text. For HTML tooltips,
see setDescription(String, ContentMode) or
setDescriptionContentMode(ContentMode).
description - the tooltip to show when hovering the cellpublic void setDescription(String description, ContentMode descriptionContentMode)
description - the tooltip to show when hovering the celldescriptionContentMode - the content mode to use for the tooltip (HTML or plain
text)ContentModepublic ContentMode getDescriptionContentMode()
The content mode determines how the tooltip is shown.
ContentModepublic void setDescriptionContentMode(ContentMode descriptionContentMode)
descriptionContentMode - the content mode for the tooltipContentModeCopyright © 2021 Vaadin Ltd. All rights reserved.