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 String
encode()
Write the options of TooltipString
getBackgroundColor()
Gets the backgroundColorString
getBodyFontColor()
Gets the bodyFontColorString
getBodyFontFamily()
Gets the bodyFontFamilyNumber
getBodyFontSize()
Gets the bodyFontSizeString
getBodyFontStyle()
Gets the bodyFontStyleNumber
getBodySpacing()
Gets the bodySpacingString
getBorderColor()
Gets the borderColorNumber
getBorderWidth()
Gets the borderWidthNumber
getCaretPadding()
Gets the caretPaddingNumber
getCaretSize()
Gets the caretSizeNumber
getCornerRadius()
Gets the cornerRadiusString
getFooterFontColor()
Gets the footerFontColorString
getFooterFontFamily()
Gets the footerFontFamilyNumber
getFooterFontSize()
Gets the footerFontSizeString
getFooterFontStyle()
Gets the footerFontStyleNumber
getFooterMarginTop()
Gets the footerMarginTopNumber
getFooterSpacing()
Gets the footerSpacingString
getMode()
Gets the modeString
getMultiKeyBackground()
Gets the multiKeyBackgroundString
getPosition()
Gets the positionString
getTextDirection()
Text Direction 'ltr' or 'rtl' regardless of the css specified on the canvas.String
getTitleFontColor()
Gets the titleFontColorString
getTitleFontFamily()
Gets the titleFontFamilyNumber
getTitleFontSize()
Gets the titleFontSizeString
getTitleFontStyle()
Gets the titleFontStyleNumber
getTitleMarginBottom()
Gets the titleMarginBottomNumber
getTitleSpacing()
Gets the titleSpacingNumber
getXpadding()
Gets the xPaddingNumber
getYpadding()
Gets the yPaddingboolean
isDisplayColors()
Gets the displayColorsboolean
isEnabled()
Gets the enabledboolean
isIntersect()
Gets the intersectboolean
isRtl()
For rendering the legends from right to left.void
setBackgroundColor(String backgroundColor)
Sets the backgroundColorvoid
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
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
setMode(String mode)
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
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
-
-
-
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
-
-