com.vaadin.client.

Class TooltipInfo

  • public class TooltipInfo
    extends Object

    An object that contains information about a tooltip, such as the tooltip's title, error message, error level and an ID.

    • Constructor Detail

      • TooltipInfo

        public TooltipInfo()

        Constructs a new tooltip info instance.

      • TooltipInfo

        public TooltipInfo​(String tooltip)

        Constructs a new tooltip info instance.

        Parameters:

        tooltip - tooltip title

      • TooltipInfo

        public TooltipInfo​(String tooltip,
                           String errorMessage)

        Constructs a new tooltip info instance.

        Parameters:

        tooltip - tooltip title

        errorMessage - error message

      • TooltipInfo

        public TooltipInfo​(String tooltip,
                           String errorMessage,
                           Object identifier)

        Constructs a new tooltip info instance.

        Parameters:

        tooltip - tooltip title

        errorMessage - error message

        identifier - the tooltip's identifier

      • TooltipInfo

        public TooltipInfo​(String tooltip,
                           String errorMessage,
                           Object identifier,
                           ErrorLevel errorLevel)

        Constructs a new tooltip info instance.

        Parameters:

        tooltip - tooltip title

        errorMessage - error message

        identifier - the tooltip's identifier

        errorLevel - error level

        Since:

        7.7.11

    • Method Detail

      • setIdentifier

        public void setIdentifier​(Object identifier)

        Sets the tooltip's identifier.

        Parameters:

        identifier - the identifier to set

      • getIdentifier

        public Object getIdentifier()

        Gets the tooltip's identifier.

        Returns:

        the identifier

      • getTitle

        public String getTitle()

        Gets the tooltip title.

        Returns:

        the title

      • setTitle

        public void setTitle​(String title)

        Sets the tooltip title.

        Parameters:

        title - the title to set

      • getErrorMessage

        public String getErrorMessage()

        Gets the error message.

        Returns:

        the error message

      • setErrorMessage

        public void setErrorMessage​(String errorMessage)

        Sets the error message.

        Parameters:

        errorMessage - the error message to set

      • getErrorLevel

        public ErrorLevel getErrorLevel()

        Gets the error level.

        Returns:

        the error level

        Since:

        7.7.11

      • setErrorLevel

        public void setErrorLevel​(ErrorLevel errorLevel)

        Sets the error level.

        Parameters:

        errorLevel - the error level to set

        Since:

        7.7.11

      • hasMessage

        public boolean hasMessage()

        Checks is a message has been defined for the tooltip.

        Returns:

        true if title or error message is present, false if both are empty

      • equals

        public boolean equals​(TooltipInfo other)

        Indicates whether another tooltip info instance is equal to this one. Two instances are equal if their title, error message, error level and identifier are equal.

        Parameters:

        other - the reference tooltip info instance with which to compare

        Returns:

        true if the instances are equal, false otherwise

      • getContentMode

        public ContentMode getContentMode()

        Gets the tooltip title's content mode.

        Returns:

        the content mode

        Since:

        7.7.14

      • setContentMode

        public void setContentMode​(ContentMode contentMode)

        Sets the tooltip title's content mode.

        Parameters:

        contentMode - the content mode to set

        Since:

        7.7.14