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

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

        Constructs a new instance using the tooltip for the title, errorMessage as a description and identifier as its id.

        Parameters:

        tooltip - tooltip title

        errorMessage - error description

        identifier - the tooltip's identifier

      • TooltipInfo

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

        Constructs a new instance using the tooltip for the title, errorMessage as a description, identifier as its id and errorLevel as the error level.

        Parameters:

        tooltip - tooltip title

        errorMessage - error description

        identifier - the tooltip's identifier

        errorLevel - error level

        Since:

        8.2

      • TooltipInfo

        public TooltipInfo​(String tooltip,
                           ContentMode mode)

        Constructs a new tooltip info instance.

        Parameters:

        tooltip - tooltip title

        mode - content mode

      • TooltipInfo

        public TooltipInfo​(String tooltip,
                           ContentMode mode,
                           String errorMessage)

        Constructs a new tooltip info instance.

        Parameters:

        tooltip - tooltip title

        mode - content mode

        errorMessage - error message

      • TooltipInfo

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

        Constructs a new tooltip info instance.

        Parameters:

        tooltip - tooltip title

        mode - content mode

        errorMessage - error message

        identifier - the tooltip's identifier

      • TooltipInfo

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

        Constructs a new tooltip info instance.

        Parameters:

        tooltip - tooltip title

        mode - content mode

        errorMessage - error message

        identifier - the tooltip's identifier

        errorLevel - error level

        Since:

        8.2

    • 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

      • getContentMode

        public ContentMode getContentMode()

        Gets the tooltip title's content mode.

        Returns:

        the content mode

      • setContentMode

        public void setContentMode​(ContentMode contentMode)

        Sets the tooltip title's content mode.

        Parameters:

        contentMode - the content mode to set

      • getErrorLevel

        public ErrorLevel getErrorLevel()

        Gets the error level.

        Returns:

        the error level

        Since:

        8.2

      • setErrorLevel

        public void setErrorLevel​(ErrorLevel errorLevel)

        Sets the error level.

        Parameters:

        errorLevel - the error level to set

        Since:

        8.2

      • 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