Class Tooltip
- java.lang.Object
-
- org.primefaces.model.charts.optionconfig.tooltip.Tooltip
-
- All Implemented Interfaces:
Serializable
public class Tooltip extends Object implements Serializable
The tooltip configuration is passed into the options.tooltips namespace.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Tooltip()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringencode()Write the options of TooltipStringgetBackgroundColor()Gets the backgroundColorStringgetBodyFontColor()Gets the bodyFontColorStringgetBodyFontFamily()Gets the bodyFontFamilyNumbergetBodyFontSize()Gets the bodyFontSizeStringgetBodyFontStyle()Gets the bodyFontStyleNumbergetBodySpacing()Gets the bodySpacingStringgetBorderColor()Gets the borderColorNumbergetBorderWidth()Gets the borderWidthNumbergetCaretPadding()Gets the caretPaddingNumbergetCaretSize()Gets the caretSizeNumbergetCornerRadius()Gets the cornerRadiusStringgetFooterFontColor()Gets the footerFontColorStringgetFooterFontFamily()Gets the footerFontFamilyNumbergetFooterFontSize()Gets the footerFontSizeStringgetFooterFontStyle()Gets the footerFontStyleNumbergetFooterMarginTop()Gets the footerMarginTopNumbergetFooterSpacing()Gets the footerSpacingStringgetMode()Gets the modeStringgetMultiKeyBackground()Gets the multiKeyBackgroundStringgetPosition()Gets the positionStringgetTextDirection()Text Direction 'ltr' or 'rtl' regardless of the css specified on the canvas.StringgetTitleFontColor()Gets the titleFontColorStringgetTitleFontFamily()Gets the titleFontFamilyNumbergetTitleFontSize()Gets the titleFontSizeStringgetTitleFontStyle()Gets the titleFontStyleNumbergetTitleMarginBottom()Gets the titleMarginBottomNumbergetTitleSpacing()Gets the titleSpacingNumbergetXpadding()Gets the xPaddingNumbergetYpadding()Gets the yPaddingbooleanisDisplayColors()Gets the displayColorsbooleanisEnabled()Gets the enabledbooleanisIntersect()Gets the intersectbooleanisRtl()For rendering the legends from right to left.voidsetBackgroundColor(String backgroundColor)Sets the backgroundColorvoidsetBodyFontColor(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 enabledvoidsetFooterFontColor(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 intersectvoidsetMode(String mode)Sets 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.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
-
-
-
Method Detail
-
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
public String getMode()
Gets the mode- Returns:
- mode
-
setMode
public void setMode(String mode)
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
public String getPosition()
Gets the position- Returns:
- position
-
setPosition
public void setPosition(String position)
Sets the position- Parameters:
position- The mode for positioning the tooltip.
-
getBackgroundColor
public String getBackgroundColor()
Gets the backgroundColor- Returns:
- backgroundColor
-
setBackgroundColor
public void setBackgroundColor(String backgroundColor)
Sets the backgroundColor- Parameters:
backgroundColor- Background color of the tooltip.
-
getTitleFontFamily
public String getTitleFontFamily()
Gets the titleFontFamily- Returns:
- titleFontFamily
-
setTitleFontFamily
public void setTitleFontFamily(String titleFontFamily)
Sets the titleFontFamily- Parameters:
titleFontFamily- title font
-
getTitleFontSize
public Number getTitleFontSize()
Gets the titleFontSize- Returns:
- titleFontSize
-
setTitleFontSize
public void setTitleFontSize(Number titleFontSize)
Sets the titleFontSize- Parameters:
titleFontSize- Title font size
-
getTitleFontStyle
public String getTitleFontStyle()
Gets the titleFontStyle- Returns:
- titleFontStyle
-
setTitleFontStyle
public void setTitleFontStyle(String titleFontStyle)
Sets the titleFontStyle- Parameters:
titleFontStyle- Title font style
-
getTitleFontColor
public String getTitleFontColor()
Gets the titleFontColor- Returns:
- titleFontColor
-
setTitleFontColor
public void setTitleFontColor(String titleFontColor)
Sets the titleFontColor- Parameters:
titleFontColor- Title font color
-
getTitleSpacing
public Number getTitleSpacing()
Gets the titleSpacing- Returns:
- titleSpacing
-
setTitleSpacing
public void setTitleSpacing(Number titleSpacing)
Sets the titleSpacing- Parameters:
titleSpacing- Spacing to add to top and bottom of each title line.
-
getTitleMarginBottom
public Number getTitleMarginBottom()
Gets the titleMarginBottom- Returns:
- titleMarginBottom
-
setTitleMarginBottom
public void setTitleMarginBottom(Number titleMarginBottom)
Sets the titleMarginBottom- Parameters:
titleMarginBottom- Margin to add on bottom of title section.
-
getBodyFontFamily
public String getBodyFontFamily()
Gets the bodyFontFamily- Returns:
- bodyFontFamily
-
setBodyFontFamily
public void setBodyFontFamily(String bodyFontFamily)
Sets the bodyFontFamily- Parameters:
bodyFontFamily- body line font
-
getBodyFontSize
public Number getBodyFontSize()
Gets the bodyFontSize- Returns:
- bodyFontSize
-
setBodyFontSize
public void setBodyFontSize(Number bodyFontSize)
Sets the bodyFontSize- Parameters:
bodyFontSize- Body font size
-
getBodyFontStyle
public String getBodyFontStyle()
Gets the bodyFontStyle- Returns:
- bodyFontStyle
-
setBodyFontStyle
public void setBodyFontStyle(String bodyFontStyle)
Sets the bodyFontStyle- Parameters:
bodyFontStyle- Body font style
-
getBodyFontColor
public String getBodyFontColor()
Gets the bodyFontColor- Returns:
- bodyFontColor
-
setBodyFontColor
public void setBodyFontColor(String bodyFontColor)
Sets the bodyFontColor- Parameters:
bodyFontColor- Body font color
-
getBodySpacing
public Number getBodySpacing()
Gets the bodySpacing- Returns:
- bodySpacing
-
setBodySpacing
public void setBodySpacing(Number bodySpacing)
Sets the bodySpacing- Parameters:
bodySpacing- Spacing to add to top and bottom of each tooltip item.
-
getFooterFontFamily
public String getFooterFontFamily()
Gets the footerFontFamily- Returns:
- footerFontFamily
-
setFooterFontFamily
public void setFooterFontFamily(String footerFontFamily)
Sets the footerFontFamily- Parameters:
footerFontFamily- footer font
-
getFooterFontSize
public Number getFooterFontSize()
Gets the footerFontSize- Returns:
- footerFontSize
-
setFooterFontSize
public void setFooterFontSize(Number footerFontSize)
Sets the footerFontSize- Parameters:
footerFontSize- Footer font size
-
getFooterFontStyle
public String getFooterFontStyle()
Gets the footerFontStyle- Returns:
- footerFontStyle
-
setFooterFontStyle
public void setFooterFontStyle(String footerFontStyle)
Sets the footerFontStyle- Parameters:
footerFontStyle- Footer font style
-
getFooterFontColor
public String getFooterFontColor()
Gets the footerFontColor- Returns:
- footerFontColor
-
setFooterFontColor
public void setFooterFontColor(String footerFontColor)
Sets the footerFontColor- Parameters:
footerFontColor- Footer font color
-
getFooterSpacing
public Number getFooterSpacing()
Gets the footerSpacing- Returns:
- footerSpacing
-
setFooterSpacing
public void setFooterSpacing(Number footerSpacing)
Sets the footerSpacing- Parameters:
footerSpacing- Spacing to add to top and bottom of each footer line.
-
getFooterMarginTop
public Number getFooterMarginTop()
Gets the footerMarginTop- Returns:
- footerMarginTop
-
setFooterMarginTop
public void setFooterMarginTop(Number footerMarginTop)
Sets the footerMarginTop- Parameters:
footerMarginTop- Margin to add before drawing the footer.
-
getXpadding
public Number getXpadding()
Gets the xPadding- Returns:
- xPadding
-
setXpadding
public void setXpadding(Number xpadding)
Sets the xPadding- Parameters:
xpadding- Padding to add on left and right of tooltip.
-
getYpadding
public Number getYpadding()
Gets the yPadding- Returns:
- yPadding
-
setYpadding
public void setYpadding(Number ypadding)
Sets the yPadding- Parameters:
ypadding- Padding to add on top and bottom of tooltip.
-
getCaretPadding
public Number getCaretPadding()
Gets the caretPadding- Returns:
- caretPadding
-
setCaretPadding
public void setCaretPadding(Number caretPadding)
Sets the caretPadding- Parameters:
caretPadding- Extra distance to move the end of the tooltip arrow away from the tooltip point.
-
getCaretSize
public Number getCaretSize()
Gets the caretSize- Returns:
- caretSize
-
setCaretSize
public void setCaretSize(Number caretSize)
Sets the caretSize- Parameters:
caretSize- Size, in px, of the tooltip arrow.
-
getCornerRadius
public Number getCornerRadius()
Gets the cornerRadius- Returns:
- cornerRadius
-
setCornerRadius
public void setCornerRadius(Number cornerRadius)
Sets the cornerRadius- Parameters:
cornerRadius- Radius of tooltip corner curves.
-
getMultiKeyBackground
public String getMultiKeyBackground()
Gets the multiKeyBackground- Returns:
- multiKeyBackground
-
setMultiKeyBackground
public void setMultiKeyBackground(String multiKeyBackground)
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
public String getBorderColor()
Gets the borderColor- Returns:
- borderColor
-
setBorderColor
public void setBorderColor(String borderColor)
Sets the borderColor- Parameters:
borderColor- Color of the border
-
getBorderWidth
public Number getBorderWidth()
Gets the borderWidth- Returns:
- borderWidth
-
setBorderWidth
public void setBorderWidth(Number borderWidth)
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
public String getTextDirection()
Text Direction 'ltr' or 'rtl' regardless of the css specified on the canvas.- Returns:
- the textDirection
-
setTextDirection
public void setTextDirection(String textDirection)
Text Direction 'ltr' or 'rtl' regardless of the css specified on the canvas.- Parameters:
textDirection- the textDirection to set
-
encode
public String encode() throws IOException
Write the options of Tooltip- Returns:
- options as JSON object
- Throws:
IOException- If an I/O error occurs
-
-