Package com.vaadin.client
Class TooltipInfo
- java.lang.Object
-
- com.vaadin.client.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 Summary
Constructors Constructor Description TooltipInfo()Constructs a new tooltip info instance.TooltipInfo(String tooltip)Constructs a new tooltip info instance.TooltipInfo(String tooltip, ContentMode mode)Constructs a new tooltip info instance.TooltipInfo(String tooltip, ContentMode mode, String errorMessage)Constructs a new tooltip info instance.TooltipInfo(String tooltip, ContentMode mode, String errorMessage, Object identifier)Constructs a new tooltip info instance.TooltipInfo(String tooltip, ContentMode mode, String errorMessage, Object identifier, ErrorLevel errorLevel)Constructs a new tooltip info instance.TooltipInfo(String tooltip, String errorMessage)Deprecated.useTooltipInfo(String, ContentMode, String)insteadTooltipInfo(String tooltip, String errorMessage, Object identifier)Deprecated.useTooltipInfo(String, ContentMode, String, Object)insteadTooltipInfo(String tooltip, String errorMessage, Object identifier, ErrorLevel errorLevel)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(TooltipInfo other)Indicates whether another tooltip info instance is equal to this one.ContentModegetContentMode()Gets the tooltip title's content mode.ErrorLevelgetErrorLevel()Gets the error level.StringgetErrorMessage()Gets the error message.ObjectgetIdentifier()Gets the tooltip's identifier.StringgetTitle()Gets the tooltip title.booleanhasMessage()Checks is a message has been defined for the tooltip.voidsetContentMode(ContentMode contentMode)Sets the tooltip title's content mode.voidsetErrorLevel(ErrorLevel errorLevel)Sets the error level.voidsetErrorMessage(String errorMessage)Sets the error message.voidsetIdentifier(Object identifier)Sets the tooltip's identifier.voidsetTitle(String title)Sets the tooltip title.
-
-
-
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)
Deprecated.useTooltipInfo(String, ContentMode, String)insteadConstructs a new instance using thetooltipfor the title anderrorMessageas a description.- Parameters:
tooltip- tooltip titleerrorMessage- error description
-
TooltipInfo
@Deprecated public TooltipInfo(String tooltip, String errorMessage, Object identifier)
Deprecated.useTooltipInfo(String, ContentMode, String, Object)insteadConstructs a new instance using thetooltipfor the title,errorMessageas a description andidentifieras its id.- Parameters:
tooltip- tooltip titleerrorMessage- error descriptionidentifier- the tooltip's identifier
-
TooltipInfo
@Deprecated public TooltipInfo(String tooltip, String errorMessage, Object identifier, ErrorLevel errorLevel)
Deprecated.Constructs a new instance using thetooltipfor the title,errorMessageas a description,identifieras its id anderrorLevelas the error level.- Parameters:
tooltip- tooltip titleerrorMessage- error descriptionidentifier- the tooltip's identifiererrorLevel- error level- Since:
- 8.2
-
TooltipInfo
public TooltipInfo(String tooltip, ContentMode mode)
Constructs a new tooltip info instance.- Parameters:
tooltip- tooltip titlemode- content mode
-
TooltipInfo
public TooltipInfo(String tooltip, ContentMode mode, String errorMessage)
Constructs a new tooltip info instance.- Parameters:
tooltip- tooltip titlemode- content modeerrorMessage- error message
-
TooltipInfo
public TooltipInfo(String tooltip, ContentMode mode, String errorMessage, Object identifier)
Constructs a new tooltip info instance.- Parameters:
tooltip- tooltip titlemode- content modeerrorMessage- error messageidentifier- 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 titlemode- content modeerrorMessage- error messageidentifier- the tooltip's identifiererrorLevel- 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:
trueif the instances are equal,falseotherwise
-
-