Class Tooltip
java.lang.Object
org.primefaces.model.charts.optionconfig.tooltip.Tooltip
- All Implemented Interfaces:
Serializable
The tooltip configuration is passed into the options.tooltips namespace.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencode()
Write the options of TooltipGets the backgroundColorGets the bodyFontColorGets the bodyFontFamilyGets the bodyFontSizeGets the bodyFontStyleGets the bodySpacingGets the borderColorGets the borderWidthGets the caretPaddingGets the caretSizeGets the cornerRadiusGets the footerFontColorGets the footerFontFamilyGets the footerFontSizeGets the footerFontStyleGets the footerMarginTopGets the footerSpacinggetMode()
Gets the modeGets the multiKeyBackgroundGets the positionText Direction 'ltr' or 'rtl' regardless of the css specified on the canvas.Gets the titleFontColorGets the titleFontFamilyGets the titleFontSizeGets the titleFontStyleGets the titleMarginBottomGets the titleSpacingGets the xPaddingGets the yPaddingboolean
Gets the displayColorsboolean
Gets the enabledboolean
Gets the intersectboolean
isRtl()
For rendering the legends from right to left.void
setBackgroundColor
(String backgroundColor) Sets the backgroundColorvoid
setBodyFont
(ChartFont bodyFont) void
setBodyFontColor
(String bodyFontColor) Sets the bodyFontColorvoid
setBodyFontFamily
(String bodyFontFamily) Sets the bodyFontFamilyvoid
setBodyFontSize
(Number bodyFontSize) Sets the bodyFontSizevoid
setBodyFontStyle
(String bodyFontStyle) Sets the bodyFontStylevoid
setBodySpacing
(Number bodySpacing) Sets the bodySpacingvoid
setBorderColor
(String borderColor) Sets the borderColorvoid
setBorderWidth
(Number borderWidth) Sets the borderWidthvoid
setCaretPadding
(Number caretPadding) Sets the caretPaddingvoid
setCaretSize
(Number caretSize) Sets the caretSizevoid
setCornerRadius
(Number cornerRadius) Sets the cornerRadiusvoid
setDisplayColors
(boolean displayColors) Sets the displayColorsvoid
setEnabled
(boolean enabled) Sets the enabledvoid
setFooterFont
(ChartFont footerFont) void
setFooterFontColor
(String footerFontColor) Sets the footerFontColorvoid
setFooterFontFamily
(String footerFontFamily) Sets the footerFontFamilyvoid
setFooterFontSize
(Number footerFontSize) Sets the footerFontSizevoid
setFooterFontStyle
(String footerFontStyle) Sets the footerFontStylevoid
setFooterMarginTop
(Number footerMarginTop) Sets the footerMarginTopvoid
setFooterSpacing
(Number footerSpacing) Sets the footerSpacingvoid
setIntersect
(boolean intersect) Sets the intersectvoid
Sets the modevoid
setMultiKeyBackground
(String multiKeyBackground) Sets the multiKeyBackgroundvoid
setPosition
(String position) Sets the positionvoid
setRtl
(boolean rtl) For rendering the legends from right to left.void
setTextDirection
(String textDirection) Text Direction 'ltr' or 'rtl' regardless of the css specified on the canvas.void
setTitleFont
(ChartFont titleFont) void
setTitleFontColor
(String titleFontColor) Sets the titleFontColorvoid
setTitleFontFamily
(String titleFontFamily) Sets the titleFontFamilyvoid
setTitleFontSize
(Number titleFontSize) Sets the titleFontSizevoid
setTitleFontStyle
(String titleFontStyle) Sets the titleFontStylevoid
setTitleMarginBottom
(Number titleMarginBottom) Sets the titleMarginBottomvoid
setTitleSpacing
(Number titleSpacing) Sets the titleSpacingvoid
setXpadding
(Number xpadding) Sets the xPaddingvoid
setYpadding
(Number ypadding) Sets the yPadding
-
Constructor Details
-
Tooltip
public Tooltip()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Gets the enabled- Returns:
- enabled
-
setEnabled
public void setEnabled(boolean enabled) Sets the enabled- Parameters:
enabled
- Are on-canvas tooltips enabled
-
getMode
Gets the mode- Returns:
- mode
-
setMode
Sets the mode- Parameters:
mode
- Sets which elements appear in the tooltip.
-
isIntersect
public boolean isIntersect()Gets the intersect- Returns:
- intersect
-
setIntersect
public void setIntersect(boolean intersect) Sets the intersect- Parameters:
intersect
- 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
Gets the position- Returns:
- position
-
setPosition
Sets the position- Parameters:
position
- The mode for positioning the tooltip.
-
getBackgroundColor
Gets the backgroundColor- Returns:
- backgroundColor
-
setBackgroundColor
Sets the backgroundColor- Parameters:
backgroundColor
- Background color of the tooltip.
-
getTitleFontFamily
Gets the titleFontFamily- Returns:
- titleFontFamily
-
setTitleFontFamily
Sets the titleFontFamily- Parameters:
titleFontFamily
- title font
-
getTitleFontSize
Gets the titleFontSize- Returns:
- titleFontSize
-
setTitleFontSize
Sets the titleFontSize- Parameters:
titleFontSize
- Title font size
-
getTitleFontStyle
Gets the titleFontStyle- Returns:
- titleFontStyle
-
setTitleFontStyle
Sets the titleFontStyle- Parameters:
titleFontStyle
- Title font style
-
getTitleFontColor
Gets the titleFontColor- Returns:
- titleFontColor
-
setTitleFontColor
Sets the titleFontColor- Parameters:
titleFontColor
- Title font color
-
getTitleSpacing
Gets the titleSpacing- Returns:
- titleSpacing
-
setTitleSpacing
Sets the titleSpacing- Parameters:
titleSpacing
- Spacing to add to top and bottom of each title line.
-
getTitleMarginBottom
Gets the titleMarginBottom- Returns:
- titleMarginBottom
-
setTitleMarginBottom
Sets the titleMarginBottom- Parameters:
titleMarginBottom
- Margin to add on bottom of title section.
-
getBodyFontFamily
Gets the bodyFontFamily- Returns:
- bodyFontFamily
-
setBodyFontFamily
Sets the bodyFontFamily- Parameters:
bodyFontFamily
- body line font
-
getBodyFontSize
Gets the bodyFontSize- Returns:
- bodyFontSize
-
setBodyFontSize
Sets the bodyFontSize- Parameters:
bodyFontSize
- Body font size
-
getBodyFontStyle
Gets the bodyFontStyle- Returns:
- bodyFontStyle
-
setBodyFontStyle
Sets the bodyFontStyle- Parameters:
bodyFontStyle
- Body font style
-
getBodyFontColor
Gets the bodyFontColor- Returns:
- bodyFontColor
-
setBodyFontColor
Sets the bodyFontColor- Parameters:
bodyFontColor
- Body font color
-
getBodySpacing
Gets the bodySpacing- Returns:
- bodySpacing
-
setBodySpacing
Sets the bodySpacing- Parameters:
bodySpacing
- Spacing to add to top and bottom of each tooltip item.
-
getXpadding
Gets the xPadding- Returns:
- xPadding
-
setXpadding
Sets the xPadding- Parameters:
xpadding
- Padding to add on left and right of tooltip.
-
getYpadding
Gets the yPadding- Returns:
- yPadding
-
setYpadding
Sets the yPadding- Parameters:
ypadding
- Padding to add on top and bottom of tooltip.
-
getCaretPadding
Gets the caretPadding- Returns:
- caretPadding
-
setCaretPadding
Sets the caretPadding- Parameters:
caretPadding
- Extra distance to move the end of the tooltip arrow away from the tooltip point.
-
getCaretSize
Gets the caretSize- Returns:
- caretSize
-
setCaretSize
Sets the caretSize- Parameters:
caretSize
- Size, in px, of the tooltip arrow.
-
getCornerRadius
Gets the cornerRadius- Returns:
- cornerRadius
-
setCornerRadius
Sets the cornerRadius- Parameters:
cornerRadius
- Radius of tooltip corner curves.
-
getMultiKeyBackground
Gets the multiKeyBackground- Returns:
- multiKeyBackground
-
setMultiKeyBackground
Sets the multiKeyBackground- Parameters:
multiKeyBackground
- Color to draw behind the colored boxes when multiple items are in the tooltip
-
isDisplayColors
public boolean isDisplayColors()Gets the displayColors- Returns:
- displayColors
-
setDisplayColors
public void setDisplayColors(boolean displayColors) Sets the displayColors- Parameters:
displayColors
- if true, color boxes are shown in the tooltip
-
getBorderColor
Gets the borderColor- Returns:
- borderColor
-
setBorderColor
Sets the borderColor- Parameters:
borderColor
- Color of the border
-
getBorderWidth
Gets the borderWidth- Returns:
- borderWidth
-
setBorderWidth
Sets the borderWidth- Parameters:
borderWidth
- Size of the border
-
isRtl
public boolean isRtl()For rendering the legends from right to left.- Returns:
- the rtl
-
setRtl
public void setRtl(boolean rtl) For rendering the legends from right to left.- Parameters:
rtl
- the rtl to set
-
getTextDirection
Text Direction 'ltr' or 'rtl' regardless of the css specified on the canvas.- Returns:
- the textDirection
-
setTextDirection
Text Direction 'ltr' or 'rtl' regardless of the css specified on the canvas.- Parameters:
textDirection
- the textDirection to set
-
getTitleFont
-
setTitleFont
-
getBodyFont
-
setBodyFont
-
encode
Write the options of Tooltip- Returns:
- options as JSON object
- Throws:
IOException
- If an I/O error occurs
-