Class DefaultTooltips
- java.lang.Object
-
- org.pepstock.charba.client.defaults.globals.DefaultTooltips
-
- All Implemented Interfaces:
IsDefaultAnimationContainer
,IsDefaultAnimationTransition
,IsDefaultBoxHandler
,IsDefaultTextDirectionHandler
,IsDefaultTooltips
public final class DefaultTooltips extends Object implements IsDefaultTooltips
CHART.JS default values for TOOLTIPS element.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IsDefaultAnimation
getAnimation()
Returns the animation element.IsDefaultAnimations
getAnimations()
Returns the animations collection element.String
getBackgroundColorAsString()
Returns the background color of the tooltip.TextAlign
getBodyAlign()
Returns the body alignment.String
getBodyColorAsString()
Returns the body font color as string.IsDefaultFont
getBodyFont()
Returns the body line font.int
getBodySpacing()
Returns the spacing to add to top and bottom of each tooltip item.String
getBorderColorAsString()
Returns the color of the border.int
getBorderWidth()
Returns the size of the border.int
getBoxHeight()
Returns the height of colored box.int
getBoxPadding()
Returns the padding between the color box and the text.int
getBoxWidth()
Returns the width of colored box.int
getCaretPadding()
Returns the extra distance to move the end of the tooltip arrow away from the tooltip point.int
getCaretSize()
Returns the size, in px, of the tooltip arrow.int
getCornerRadius()
Returns the radius of tooltip corner curves.Set<Event>
getEvents()
Returns the browser events that the tooltip should listen to.TextAlign
getFooterAlign()
Returns the footer alignment.String
getFooterColorAsString()
Returns the footer font color as string.IsDefaultFont
getFooterFont()
Returns the footer font.int
getFooterMarginTop()
Returns the margin to add before drawing the footer.int
getFooterSpacing()
Returns the spacing to add to top and bottom of each footer line.InteractionMode
getMode()
Returns which elements appear in the tooltip.String
getMultiKeyBackgroundAsString()
Returns the color to draw behind the colored boxes when multiple items are in the tooltip.IsDefaultPadding
getPadding()
Returns padding object defaults.IsTooltipPosition
getPosition()
Returns the mode for positioning the tooltip.TextDirection
getTextDirection()
Returns the text direction that will force on the canvas for rendering the object, regardless of the CSS specified on the canvas.TextAlign
getTitleAlign()
Returns the title alignment.String
getTitleColorAsString()
Returns the title font color as string.IsDefaultFont
getTitleFont()
Returns the title font.int
getTitleMarginBottom()
Returns the margin to add on bottom of title section.int
getTitleSpacing()
Returns the spacing to add to top and bottom of each title line.IsDefaultTransitions
getTransitions()
Returns the animation transition element.TooltipAlign
getXAlign()
Returns the alignment of the tooltip caret in the X direction.TooltipAlign
getYAlign()
Returns the alignment of the tooltip caret in the Y direction.boolean
isDisplayColors()
If true, color boxes are shown in the tooltip.boolean
isEnabled()
Returns if tooltips are enabled.boolean
isIntersect()
if true, the tooltip mode applies only when the mouse position intersects with an element.boolean
isRtl()
Returnstrue
for rendering the object from right to left.boolean
isUsePointStyle()
Returns if to use the corresponding point style (from data set options) instead of color boxes (size is based on the minimum value between boxWidth and boxHeight).
-
-
-
Method Detail
-
getTransitions
public IsDefaultTransitions getTransitions()
Description copied from interface:IsDefaultAnimationContainer
Returns the animation transition element.- Specified by:
getTransitions
in interfaceIsDefaultAnimationContainer
- Returns:
- the animation transition
-
getAnimation
public IsDefaultAnimation getAnimation()
Description copied from interface:IsDefaultAnimationTransition
Returns the animation element.- Specified by:
getAnimation
in interfaceIsDefaultAnimationTransition
- Returns:
- the animation
-
getAnimations
public IsDefaultAnimations getAnimations()
Description copied from interface:IsDefaultAnimationTransition
Returns the animations collection element.- Specified by:
getAnimations
in interfaceIsDefaultAnimationTransition
- Returns:
- the animations collection
-
getPadding
public IsDefaultPadding getPadding()
Description copied from interface:IsDefaultTooltips
Returns padding object defaults.- Specified by:
getPadding
in interfaceIsDefaultTooltips
- Returns:
- padding object defaults.
-
isEnabled
public boolean isEnabled()
Description copied from interface:IsDefaultTooltips
Returns if tooltips are enabled.- Specified by:
isEnabled
in interfaceIsDefaultTooltips
- Returns:
- if tooltips are enabled.
-
getEvents
public Set<Event> getEvents()
Description copied from interface:IsDefaultTooltips
Returns the browser events that the tooltip should listen to.- Specified by:
getEvents
in interfaceIsDefaultTooltips
- Returns:
- the browser events that the tooltip should listen to.
-
getMode
public InteractionMode getMode()
Description copied from interface:IsDefaultTooltips
Returns which elements appear in the tooltip.- Specified by:
getMode
in interfaceIsDefaultTooltips
- Returns:
- which elements appear in the tooltip.
-
isIntersect
public boolean isIntersect()
Description copied from interface:IsDefaultTooltips
if true, the tooltip mode applies only when the mouse position intersects with an element. If false, the mode will be applied at all times.- Specified by:
isIntersect
in interfaceIsDefaultTooltips
- Returns:
- if true, the tooltip mode applies only when the mouse position intersects with an element. If false, the mode will be applied at all times.
-
getPosition
public IsTooltipPosition getPosition()
Description copied from interface:IsDefaultTooltips
Returns the mode for positioning the tooltip.- Specified by:
getPosition
in interfaceIsDefaultTooltips
- Returns:
- mode for positioning the tooltip.
-
getBackgroundColorAsString
public String getBackgroundColorAsString()
Description copied from interface:IsDefaultTooltips
Returns the background color of the tooltip.- Specified by:
getBackgroundColorAsString
in interfaceIsDefaultTooltips
- Returns:
- Background color of the tooltip.
-
getTitleFont
public IsDefaultFont getTitleFont()
Description copied from interface:IsDefaultTooltips
Returns the title font.- Specified by:
getTitleFont
in interfaceIsDefaultTooltips
- Returns:
- the title font.
-
getTitleColorAsString
public String getTitleColorAsString()
Description copied from interface:IsDefaultTooltips
Returns the title font color as string.- Specified by:
getTitleColorAsString
in interfaceIsDefaultTooltips
- Returns:
- title font color as string
-
getTitleAlign
public TextAlign getTitleAlign()
Description copied from interface:IsDefaultTooltips
Returns the title alignment.- Specified by:
getTitleAlign
in interfaceIsDefaultTooltips
- Returns:
- title alignment.
-
getTitleSpacing
public int getTitleSpacing()
Description copied from interface:IsDefaultTooltips
Returns the spacing to add to top and bottom of each title line.- Specified by:
getTitleSpacing
in interfaceIsDefaultTooltips
- Returns:
- spacing to add to top and bottom of each title line.
-
getTitleMarginBottom
public int getTitleMarginBottom()
Description copied from interface:IsDefaultTooltips
Returns the margin to add on bottom of title section.- Specified by:
getTitleMarginBottom
in interfaceIsDefaultTooltips
- Returns:
- margin to add on bottom of title section.
-
getBodyFont
public IsDefaultFont getBodyFont()
Description copied from interface:IsDefaultTooltips
Returns the body line font.- Specified by:
getBodyFont
in interfaceIsDefaultTooltips
- Returns:
- body line font.
-
getBodyColorAsString
public String getBodyColorAsString()
Description copied from interface:IsDefaultTooltips
Returns the body font color as string.- Specified by:
getBodyColorAsString
in interfaceIsDefaultTooltips
- Returns:
- body font color as string
-
getBodyAlign
public TextAlign getBodyAlign()
Description copied from interface:IsDefaultTooltips
Returns the body alignment.- Specified by:
getBodyAlign
in interfaceIsDefaultTooltips
- Returns:
- body alignment.
-
getBodySpacing
public int getBodySpacing()
Description copied from interface:IsDefaultTooltips
Returns the spacing to add to top and bottom of each tooltip item.- Specified by:
getBodySpacing
in interfaceIsDefaultTooltips
- Returns:
- spacing to add to top and bottom of each tooltip item.
-
getFooterFont
public IsDefaultFont getFooterFont()
Description copied from interface:IsDefaultTooltips
Returns the footer font.- Specified by:
getFooterFont
in interfaceIsDefaultTooltips
- Returns:
- footer font.
-
getFooterColorAsString
public String getFooterColorAsString()
Description copied from interface:IsDefaultTooltips
Returns the footer font color as string.- Specified by:
getFooterColorAsString
in interfaceIsDefaultTooltips
- Returns:
- footer font color as string
-
getFooterAlign
public TextAlign getFooterAlign()
Description copied from interface:IsDefaultTooltips
Returns the footer alignment.- Specified by:
getFooterAlign
in interfaceIsDefaultTooltips
- Returns:
- footer alignment.
-
getFooterSpacing
public int getFooterSpacing()
Description copied from interface:IsDefaultTooltips
Returns the spacing to add to top and bottom of each footer line.- Specified by:
getFooterSpacing
in interfaceIsDefaultTooltips
- Returns:
- spacing to add to top and bottom of each footer line.
-
getFooterMarginTop
public int getFooterMarginTop()
Description copied from interface:IsDefaultTooltips
Returns the margin to add before drawing the footer.- Specified by:
getFooterMarginTop
in interfaceIsDefaultTooltips
- Returns:
- margin to add before drawing the footer.
-
getCaretPadding
public int getCaretPadding()
Description copied from interface:IsDefaultTooltips
Returns the extra distance to move the end of the tooltip arrow away from the tooltip point.- Specified by:
getCaretPadding
in interfaceIsDefaultTooltips
- Returns:
- extra distance to move the end of the tooltip arrow away from the tooltip point.
-
getCaretSize
public int getCaretSize()
Description copied from interface:IsDefaultTooltips
Returns the size, in px, of the tooltip arrow.- Specified by:
getCaretSize
in interfaceIsDefaultTooltips
- Returns:
- size, in px, of the tooltip arrow.
-
getCornerRadius
public int getCornerRadius()
Description copied from interface:IsDefaultTooltips
Returns the radius of tooltip corner curves.- Specified by:
getCornerRadius
in interfaceIsDefaultTooltips
- Returns:
- radius of tooltip corner curves.
-
getMultiKeyBackgroundAsString
public String getMultiKeyBackgroundAsString()
Description copied from interface:IsDefaultTooltips
Returns the color to draw behind the colored boxes when multiple items are in the tooltip.- Specified by:
getMultiKeyBackgroundAsString
in interfaceIsDefaultTooltips
- Returns:
- color to draw behind the colored boxes when multiple items are in the tooltip.
-
isDisplayColors
public boolean isDisplayColors()
Description copied from interface:IsDefaultTooltips
If true, color boxes are shown in the tooltip.- Specified by:
isDisplayColors
in interfaceIsDefaultTooltips
- Returns:
- if true, color boxes are shown in the tooltip.
-
getBorderColorAsString
public String getBorderColorAsString()
Description copied from interface:IsDefaultTooltips
Returns the color of the border.- Specified by:
getBorderColorAsString
in interfaceIsDefaultTooltips
- Returns:
- color of the border.
-
getBorderWidth
public int getBorderWidth()
Description copied from interface:IsDefaultTooltips
Returns the size of the border.- Specified by:
getBorderWidth
in interfaceIsDefaultTooltips
- Returns:
- size of the border.
-
isRtl
public boolean isRtl()
Description copied from interface:IsDefaultTextDirectionHandler
Returnstrue
for rendering the object from right to left.- Specified by:
isRtl
in interfaceIsDefaultTextDirectionHandler
- Returns:
true
for rendering the object from right to left.
-
getTextDirection
public TextDirection getTextDirection()
Description copied from interface:IsDefaultTextDirectionHandler
Returns the text direction that will force on the canvas for rendering the object, regardless of the CSS specified on the canvas.- Specified by:
getTextDirection
in interfaceIsDefaultTextDirectionHandler
- Returns:
- the text direction that will force on the canvas for rendering the object, regardless of the CSS specified on the canvas
-
getBoxWidth
public int getBoxWidth()
Description copied from interface:IsDefaultBoxHandler
Returns the width of colored box.- Specified by:
getBoxWidth
in interfaceIsDefaultBoxHandler
- Returns:
- width of colored box.
-
getBoxHeight
public int getBoxHeight()
Description copied from interface:IsDefaultBoxHandler
Returns the height of colored box.- Specified by:
getBoxHeight
in interfaceIsDefaultBoxHandler
- Returns:
- height of colored box.
-
isUsePointStyle
public boolean isUsePointStyle()
Description copied from interface:IsDefaultTooltips
Returns if to use the corresponding point style (from data set options) instead of color boxes (size is based on the minimum value between boxWidth and boxHeight).- Specified by:
isUsePointStyle
in interfaceIsDefaultTooltips
- Returns:
true
if to use the corresponding point style (from data set options) instead of color boxes (size is based on the minimum value between boxWidth and boxHeight)
-
getXAlign
public TooltipAlign getXAlign()
Description copied from interface:IsDefaultTooltips
Returns the alignment of the tooltip caret in the X direction.- Specified by:
getXAlign
in interfaceIsDefaultTooltips
- Returns:
- the alignment of the tooltip caret in the X direction
-
getYAlign
public TooltipAlign getYAlign()
Description copied from interface:IsDefaultTooltips
Returns the alignment of the tooltip caret in the Y direction.- Specified by:
getYAlign
in interfaceIsDefaultTooltips
- Returns:
- the alignment of the tooltip caret in the Y direction
-
getBoxPadding
public int getBoxPadding()
Description copied from interface:IsDefaultTooltips
Returns the padding between the color box and the text.- Specified by:
getBoxPadding
in interfaceIsDefaultTooltips
- Returns:
- padding between the color box and the text
-
-