com.vaadin.client.widgets.

Class Grid.StaticSection.StaticCell

    • Constructor Detail

      • StaticCell

        public StaticCell()
    • Method Detail

      • 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

      • getColspan

        public int getColspan()

        Returns the amount of columns the cell spans. By default is 1.

        Returns:

        The amount of columns the cell spans.

      • setColspan

        public void setColspan​(int colspan)

        Sets the amount of columns the cell spans. Must be more or equal to 1. By default is 1.

        Parameters:

        colspan - the colspan to set

      • setHtml

        public void setHtml​(String html)

        Sets the content of the cell to the provided html. All previous content is discarded and the cell type is set to GridStaticCellType.HTML.

        Parameters:

        html - The html content of the cell

      • setWidget

        public void setWidget​(com.google.gwt.user.client.ui.Widget widget)

        Set widget as the content of the cell. The type of the cell becomes GridStaticCellType.WIDGET. All previous content is discarded.

        Parameters:

        widget - The widget to add to the cell. Should not be previously attached anywhere (widget.getParent == null).

      • getType

        public GridStaticCellType getType()

        Returns the type of the cell.

        Returns:

        the type of content the cell contains.

      • 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