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 yPaddingbooleanGets the displayColorsbooleanGets the enabledbooleanGets the intersectbooleanisRtl()For rendering the legends from right to left.voidsetBackgroundColor(String backgroundColor) Sets the backgroundColorvoidsetBodyFont(ChartFont bodyFont) voidsetBodyFontColor(String bodyFontColor) Sets the bodyFontColorvoidsetBodyFontFamily(String bodyFontFamily) Sets the bodyFontFamilyvoidsetBodyFontSize(Number bodyFontSize) Sets the bodyFontSizevoidsetBodyFontStyle(String bodyFontStyle) Sets the bodyFontStylevoidsetBodySpacing(Number bodySpacing) Sets the bodySpacingvoidsetBorderColor(String borderColor) Sets the borderColorvoidsetBorderWidth(Number borderWidth) Sets the borderWidthvoidsetCaretPadding(Number caretPadding) Sets the caretPaddingvoidsetCaretSize(Number caretSize) Sets the caretSizevoidsetCornerRadius(Number cornerRadius) Sets the cornerRadiusvoidsetDisplayColors(boolean displayColors) Sets the displayColorsvoidsetEnabled(boolean enabled) Sets the enabledvoidsetFooterFont(ChartFont footerFont) voidsetFooterFontColor(String footerFontColor) Sets the footerFontColorvoidsetFooterFontFamily(String footerFontFamily) Sets the footerFontFamilyvoidsetFooterFontSize(Number footerFontSize) Sets the footerFontSizevoidsetFooterFontStyle(String footerFontStyle) Sets the footerFontStylevoidsetFooterMarginTop(Number footerMarginTop) Sets the footerMarginTopvoidsetFooterSpacing(Number footerSpacing) Sets the footerSpacingvoidsetIntersect(boolean intersect) Sets the intersectvoidSets the modevoidsetMultiKeyBackground(String multiKeyBackground) Sets the multiKeyBackgroundvoidsetPosition(String position) Sets the positionvoidsetRtl(boolean rtl) For rendering the legends from right to left.voidsetTextDirection(String textDirection) Text Direction 'ltr' or 'rtl' regardless of the css specified on the canvas.voidsetTitleFont(ChartFont titleFont) voidsetTitleFontColor(String titleFontColor) Sets the titleFontColorvoidsetTitleFontFamily(String titleFontFamily) Sets the titleFontFamilyvoidsetTitleFontSize(Number titleFontSize) Sets the titleFontSizevoidsetTitleFontStyle(String titleFontStyle) Sets the titleFontStylevoidsetTitleMarginBottom(Number titleMarginBottom) Sets the titleMarginBottomvoidsetTitleSpacing(Number titleSpacing) Sets the titleSpacingvoidsetXpadding(Number xpadding) Sets the xPaddingvoidsetYpadding(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
-