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 Modifier and Type Method Description boolean
equals(TooltipInfo other)
Indicates whether another tooltip info instance is equal to this one.
ContentMode
getContentMode()
Gets the tooltip title's content mode.
ErrorLevel
getErrorLevel()
Gets the error level.
String
getErrorMessage()
Gets the error message.
Object
getIdentifier()
Gets the tooltip's identifier.
String
getTitle()
Gets the tooltip title.
boolean
hasMessage()
Checks is a message has been defined for the tooltip.
void
setContentMode(ContentMode contentMode)
Sets the tooltip title's content mode.
void
setErrorLevel(ErrorLevel errorLevel)
Sets the error level.
void
setErrorMessage(String errorMessage)
Sets the error message.
void
setIdentifier(Object identifier)
Sets the tooltip's identifier.
void
setTitle(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 the
tooltip
for the title anderrorMessage
as 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 the
tooltip
for the title,errorMessage
as a description andidentifier
as 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 the
tooltip
for the title,errorMessage
as a description,identifier
as its id anderrorLevel
as the error level.Parameters:
tooltip
- tooltip titleerrorMessage
- error descriptionidentifier
- the tooltip's identifiererrorLevel
- error levelSince:
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 levelSince:
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 setSince:
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 compareReturns:
true
if the instances are equal,false
otherwise
-
-