Interface HeaderCell

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    Header.Row.Cell

    public interface HeaderCell
    extends java.io.Serializable
    An individual cell on a Grid header row.
    Since:
    8.0
    Author:
    Vaadin Ltd
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      com.vaadin.shared.ui.grid.GridStaticCellType getCellType()
      Returns the type of content stored in this cell.
      java.lang.String getColumnId()
      Gets the column id where this cell is.
      Component getComponent()
      Returns the component displayed in this cell.
      java.lang.String getDescription()
      Gets the tooltip for the cell.
      com.vaadin.shared.ui.ContentMode getDescriptionContentMode()
      Gets the content mode for the tooltip.
      java.lang.String getHtml()
      Returns the HTML content displayed in this cell.
      java.lang.String getStyleName()
      Returns the custom style name for this cell.
      java.lang.String getText()
      Returns the textual caption of this cell.
      void setComponent​(Component component)
      Sets the component displayed in this cell.
      void setDescription​(java.lang.String description)
      Sets the tooltip for the cell.
      void setDescription​(java.lang.String description, com.vaadin.shared.ui.ContentMode descriptionContentMode)
      Sets the tooltip for the cell to be shown with the given content mode.
      void setDescriptionContentMode​(com.vaadin.shared.ui.ContentMode descriptionContentMode)
      Sets the content mode for the tooltip.
      void setHtml​(java.lang.String html)
      Sets the HTML content displayed in this cell.
      void setStyleName​(java.lang.String styleName)
      Sets a custom style name for this cell.
      void setText​(java.lang.String text)
      Sets the textual caption of this cell.
    • Method Detail

      • getText

        java.lang.String getText()
        Returns the textual caption of this cell.
        Returns:
        the header caption
      • setText

        void setText​(java.lang.String text)
        Sets the textual caption of this cell.
        Parameters:
        text - the header caption to set, not null
      • getHtml

        java.lang.String getHtml()
        Returns the HTML content displayed in this cell.
        Returns:
        the html
      • setHtml

        void setHtml​(java.lang.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

        com.vaadin.shared.ui.grid.GridStaticCellType getCellType()
        Returns the type of content stored in this cell.
        Returns:
        cell content type
      • getColumnId

        java.lang.String getColumnId()
        Gets the column id where this cell is.
        Returns:
        column id for this cell
      • getStyleName

        java.lang.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​(java.lang.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

        java.lang.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​(java.lang.String description,
                            com.vaadin.shared.ui.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

        com.vaadin.shared.ui.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​(com.vaadin.shared.ui.ContentMode descriptionContentMode)
        Sets the content mode for the tooltip.
        Parameters:
        descriptionContentMode - the content mode for the tooltip
        Since:
        8.4
        See Also:
        ContentMode