Interface TooltipPositioner
-
- All Known Implementing Classes:
AbstractTooltipPositioner
public interface TooltipPositioner
Interface to be implemented to create a custom tooltip positionier in order address where the tooltip must be showed on canvas.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Point
computePosition(IsChart chart, List<DatasetReference> items, Point eventPoint)
Applies own logic to returns the point where the tooltip must be showed.CustomTooltipPosition
getName()
Returns the name of tooltip position which must be used in chart options.static boolean
isValid(TooltipPositioner tooltipPositioner)
Returnstrue
if tooltip positioner passed as argument is notnull
and its name is notnull
as well.
-
-
-
Method Detail
-
isValid
static boolean isValid(TooltipPositioner tooltipPositioner)
Returnstrue
if tooltip positioner passed as argument is notnull
and its name is notnull
as well.- Parameters:
tooltipPositioner
- tooltip positioner to be checked- Returns:
true
if tooltip positioner passed as argument is notnull
and its name is notnull
-
getName
CustomTooltipPosition getName()
Returns the name of tooltip position which must be used in chart options.- Returns:
- the name of tooltip position.
- See Also:
Tooltips.setPosition(org.pepstock.charba.client.enums.IsTooltipPosition)
-
computePosition
Point computePosition(IsChart chart, List<DatasetReference> items, Point eventPoint)
Applies own logic to returns the point where the tooltip must be showed.- Parameters:
chart
- chart instanceitems
- list of dataset reference itemseventPoint
- the point of event when the method has been invoked- Returns:
- the point where the tooltip must be showed. If
null
, the default tooltip positioner will be used to provide a consistent point where tooltip will be showed
-
-