com.vaadin.ui.components.grid.

Interface HeaderCell

  • All Superinterfaces:

    Serializable

    All Known Implementing Classes:

    Header.Row.Cell

    public interface HeaderCell
    extends Serializable

    An individual cell on a Grid header row.

    Since:

    8.0

    Author:

    Vaadin Ltd

    • Method Detail

      • getText

        String getText()

        Returns the textual caption of this cell.

        Returns:

        the header caption

      • setText

        void setText​(String text)

        Sets the textual caption of this cell.

        Parameters:

        text - the header caption to set, not null

      • getHtml

        String getHtml()

        Returns the HTML content displayed in this cell.

        Returns:

        the html

      • setHtml

        void setHtml​(String html)

        Sets the HTML content displayed in this cell.

        Parameters:

        html - the html to set

      • getComponent

        Component getComponent()

        Returns the component displayed in this cell.

        Returns:

        the component

      • setComponent

        void setComponent​(Component component)

        Sets the component displayed in this cell.

        Parameters:

        component - the component to set

      • getCellType

        GridStaticCellType getCellType()

        Returns the type of content stored in this cell.

        Returns:

        cell content type

      • getColumnId

        String getColumnId()

        Gets the column id where this cell is.

        Returns:

        column id for this cell

      • getStyleName

        String getStyleName()

        Returns the custom style name for this cell.

        Returns:

        the style name or null if no style name has been set

      • setStyleName

        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

      • getDescription

        String getDescription()

        Gets the tooltip for the cell.

        The tooltip is shown in the mode returned by getDescriptionContentMode().

        Returns:

        the tooltip text for this cell

        Since:

        8.4

      • setDescription

        void setDescription​(String description,
                            ContentMode descriptionContentMode)

        Sets the tooltip for the cell to be shown with the given content mode.

        Parameters:

        description - the tooltip to show when hovering the cell

        descriptionContentMode - the content mode to use for the tooltip (HTML or plain text)

        Since:

        8.4

        See Also:

        ContentMode

      • getDescriptionContentMode

        ContentMode getDescriptionContentMode()

        Gets the content mode for the tooltip.

        Returns:

        the content mode for the tooltip

        Since:

        8.4

        See Also:

        ContentMode

      • setDescriptionContentMode

        void setDescriptionContentMode​(ContentMode descriptionContentMode)

        Sets the content mode for the tooltip.

        Parameters:

        descriptionContentMode - the content mode for the tooltip

        Since:

        8.4

        See Also:

        ContentMode