public class Tooltips extends Object
Modifier and Type | Method and Description |
---|---|
IsColor |
getBackgroundColor()
Returns the background color of the tooltip.
|
String |
getBackgroundColorAsString()
Returns the background color of the tooltip.
|
TextAlign |
getBodyAlign()
Returns the body alignment.
|
IsColor |
getBodyFontColor()
Returns the body font color.
|
String |
getBodyFontColorAsString()
Returns the body font color.
|
String |
getBodyFontFamily()
Returns the body line font.
|
int |
getBodyFontSize()
Returns the body font size.
|
FontStyle |
getBodyFontStyle()
Returns the body font style.
|
int |
getBodySpacing()
Returns the spacing to add to top and bottom of each tooltip item.
|
IsColor |
getBorderColor()
Returns the color of the border.
|
String |
getBorderColorAsString()
Returns the color of the border.
|
int |
getBorderWidth()
Returns the size of the border.
|
TooltipsCallbacks |
getCallbacks() |
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.
|
AbstractChart<?,?> |
getChart()
Returns the chart instance
|
protected T |
getConfiguration()
Returns the configuration element.
|
int |
getCornerRadius()
Returns the radius of tooltip corner curves.
|
TooltipCustomCallback |
getCustomCallback()
Returns the user custom callback.
|
TooltipFilterCallback |
getFilterCallback()
Returns the user filter callback.
|
TextAlign |
getFooterAlign()
Returns the footer alignment.
|
IsColor |
getFooterFontColor()
Returns the footer font color.
|
String |
getFooterFontColorAsString()
Returns the footer font color.
|
String |
getFooterFontFamily()
Returns the footer font.
|
int |
getFooterFontSize()
Returns the footer font size.
|
FontStyle |
getFooterFontStyle()
Returns the footer font style.
|
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.
|
TooltipItemSortCallback |
getItemSortCallback()
Returns the user item sort callback.
|
InteractionMode |
getMode()
Returns which elements appear in the tooltip.
|
IsColor |
getMultiKeyBackground()
Returns the color to draw behind the colored boxes when multiple items are in the tooltip.
|
String |
getMultiKeyBackgroundAsString()
Returns the color to draw behind the colored boxes when multiple items are in the tooltip.
|
TooltipPosition |
getPosition()
Returns the mode for positioning the tooltip.
|
TextAlign |
getTitleAlign()
Returns the title alignment.
|
IsColor |
getTitleFontColor()
Returns the title font color.
|
String |
getTitleFontColorAsString()
Returns the title font color.
|
String |
getTitleFontFamily()
Returns the title font.
|
int |
getTitleFontSize()
Returns the title font size.
|
FontStyle |
getTitleFontStyle()
Returns the title font style.
|
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.
|
int |
getXPadding()
Returns the padding to add on left and right of tooltip.
|
int |
getYPadding()
Returns the padding to add on top and bottom of tooltip.
|
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.
|
void |
setBackgroundColor(IsColor backgroundColor)
Sets the background color of the tooltip.
|
void |
setBackgroundColor(String backgroundColor)
Sets the background color of the tooltip.
|
void |
setBodyAlign(TextAlign align)
Sets the body alignment.
|
void |
setBodyFontColor(IsColor bodyFontColor)
Sets the body font color.
|
void |
setBodyFontColor(String bodyFontColor)
Sets the body font color.
|
void |
setBodyFontFamily(String bodyFontFamily)
Sets the body line font.
|
void |
setBodyFontSize(int bodyFontSize)
Sets the body font size.
|
void |
setBodyFontStyle(FontStyle bodyFontStyle)
Sets the body font style.
|
void |
setBodySpacing(int bodySpacing)
Sets the spacing to add to top and bottom of each tooltip item.
|
void |
setBorderColor(IsColor borderColor)
Sets the color of the border.
|
void |
setBorderColor(String borderColor)
Sets the color of the border.
|
void |
setBorderWidth(int borderWidth)
Sets the size of the border.
|
void |
setCaretPadding(int caretPadding)
Sets the extra distance to move the end of the tooltip arrow away from the tooltip point.
|
void |
setCaretSize(int caretSize)
Sets the size, in px, of the tooltip arrow.
|
protected void |
setConfiguration(T configuration) |
void |
setCornerRadius(int cornerRadius)
Sets the radius of tooltip corner curves.
|
void |
setCustomCallback(TooltipCustomCallback customCallback)
Sets the user custom callback.
|
void |
setDisplayColors(boolean displayColors)
If true, color boxes are shown in the tooltip.
|
void |
setEnabled(boolean enabled)
Sets if tooltips are enabled.
|
void |
setFilterCallback(TooltipFilterCallback filterCallback)
Sets the user filter callback.
|
void |
setFooterAlign(TextAlign align)
Sets the footer alignment.
|
void |
setFooterFontColor(IsColor footerFontColor)
Sets the footer font color.
|
void |
setFooterFontColor(String footerFontColor)
Sets the footer font color.
|
void |
setFooterFontFamily(String footerFontFamily)
Sets the footer font.
|
void |
setFooterFontSize(int footerFontSize)
Sets the footer font size.
|
void |
setFooterFontStyle(FontStyle footerFontStyle)
Sets the footer font style.
|
void |
setFooterMarginTop(int footerMarginTop)
Sets the margin to add before drawing the footer.
|
void |
setFooterSpacing(int footerSpacing)
Sets the spacing to add to top and bottom of each footer line.
|
void |
setIntersect(boolean intersect)
if true, the tooltip mode applies only when the mouse position intersects with an element.
|
void |
setItemSortCallback(TooltipItemSortCallback itemSortCallback)
Sets the user item sort callback.
|
void |
setMode(InteractionMode mode)
Sets which elements appear in the tooltip.
|
void |
setMultiKeyBackground(IsColor multiKeyBackground)
Sets the color to draw behind the colored boxes when multiple items are in the tooltip.
|
void |
setMultiKeyBackground(String multiKeyBackground)
Sets the color to draw behind the colored boxes when multiple items are in the tooltip.
|
void |
setPosition(TooltipPosition position)
Sets the mode for positioning the tooltip.
|
void |
setTitleAlign(TextAlign align)
Sets the title alignment.
|
void |
setTitleFontColor(IsColor titleFontColor)
Sets the title font color.
|
void |
setTitleFontColor(String titleFontColor)
Sets the title font color.
|
void |
setTitleFontFamily(String titleFontFamily)
Sets the title font.
|
void |
setTitleFontSize(int titleFontSize)
Sets the title font size.
|
void |
setTitleFontStyle(FontStyle titleFontStyle)
Sets the title font style.
|
void |
setTitleMarginBottom(int titleMarginBottom)
Sets the margin to add on bottom of title section.
|
void |
setTitleSpacing(int titleSpacing)
Sets the spacing to add to top and bottom of each title line.
|
void |
setXPadding(int xPadding)
Sets the padding to add on left and right of tooltip.
|
void |
setYPadding(int yPadding)
Sets the padding to add on top and bottom of tooltip.
|
String |
toJSON()
Returns the JSON representation of the object.
|
public TooltipsCallbacks getCallbacks()
public void setEnabled(boolean enabled)
enabled
- if tooltips are enabled.public boolean isEnabled()
public void setMode(InteractionMode mode)
mode
- which elements appear in the tooltip.public InteractionMode getMode()
public void setIntersect(boolean intersect)
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.public boolean isIntersect()
public void setPosition(TooltipPosition position)
position
- the mode for positioning the tooltip.public TooltipPosition getPosition()
public void setBackgroundColor(IsColor backgroundColor)
backgroundColor
- background color of the tooltip.public void setBackgroundColor(String backgroundColor)
backgroundColor
- background color of the tooltip.public String getBackgroundColorAsString()
public IsColor getBackgroundColor()
public void setTitleFontFamily(String titleFontFamily)
titleFontFamily
- title font.public String getTitleFontFamily()
public void setTitleFontSize(int titleFontSize)
titleFontSize
- title font size.public int getTitleFontSize()
public void setTitleFontStyle(FontStyle titleFontStyle)
titleFontStyle
- title font style.public FontStyle getTitleFontStyle()
public void setTitleAlign(TextAlign align)
align
- title alignment.public TextAlign getTitleAlign()
public void setTitleFontColor(IsColor titleFontColor)
titleFontColor
- title font color.public void setTitleFontColor(String titleFontColor)
titleFontColor
- title font color.public String getTitleFontColorAsString()
public IsColor getTitleFontColor()
public void setTitleSpacing(int titleSpacing)
titleSpacing
- spacing to add to top and bottom of each title line.public int getTitleSpacing()
public void setTitleMarginBottom(int titleMarginBottom)
titleMarginBottom
- margin to add on bottom of title section.public int getTitleMarginBottom()
public void setBodyFontFamily(String bodyFontFamily)
bodyFontFamily
- body line font.public String getBodyFontFamily()
public void setBodyFontSize(int bodyFontSize)
bodyFontSize
- body font size.public int getBodyFontSize()
public void setBodyFontStyle(FontStyle bodyFontStyle)
bodyFontStyle
- body font style.public FontStyle getBodyFontStyle()
public void setBodyAlign(TextAlign align)
align
- body alignment.public TextAlign getBodyAlign()
public void setBodyFontColor(IsColor bodyFontColor)
bodyFontColor
- body font color.public void setBodyFontColor(String bodyFontColor)
bodyFontColor
- body font color.public String getBodyFontColorAsString()
public IsColor getBodyFontColor()
public void setBodySpacing(int bodySpacing)
bodySpacing
- spacing to add to top and bottom of each tooltip item.public int getBodySpacing()
public void setFooterFontFamily(String footerFontFamily)
footerFontFamily
- footer font.public String getFooterFontFamily()
public void setFooterFontSize(int footerFontSize)
footerFontSize
- footer font size.public int getFooterFontSize()
public void setFooterFontStyle(FontStyle footerFontStyle)
footerFontStyle
- the footer font style.public FontStyle getFooterFontStyle()
public void setFooterAlign(TextAlign align)
align
- footer alignment.public TextAlign getFooterAlign()
public void setFooterFontColor(IsColor footerFontColor)
footerFontColor
- footer font color.public void setFooterFontColor(String footerFontColor)
footerFontColor
- footer font color.public String getFooterFontColorAsString()
public IsColor getFooterFontColor()
public void setFooterSpacing(int footerSpacing)
footerSpacing
- spacing to add to top and bottom of each footer line.public int getFooterSpacing()
public void setFooterMarginTop(int footerMarginTop)
footerMarginTop
- margin to add before drawing the footer.public int getFooterMarginTop()
public void setXPadding(int xPadding)
xPadding
- padding to add on left and right of tooltip.public int getXPadding()
public void setYPadding(int yPadding)
yPadding
- padding to add on top and bottom of tooltip.public int getYPadding()
public void setCaretPadding(int caretPadding)
caretPadding
- extra distance to move the end of the tooltip arrow away from the tooltip point.public int getCaretPadding()
public void setCaretSize(int caretSize)
caretSize
- size, in px, of the tooltip arrow.public int getCaretSize()
public void setCornerRadius(int cornerRadius)
cornerRadius
- radius of tooltip corner curves.public int getCornerRadius()
public void setMultiKeyBackground(IsColor multiKeyBackground)
multiKeyBackground
- color to draw behind the colored boxes when multiple items are in the tooltip.public void setMultiKeyBackground(String multiKeyBackground)
multiKeyBackground
- color to draw behind the colored boxes when multiple items are in the tooltip.public String getMultiKeyBackgroundAsString()
public IsColor getMultiKeyBackground()
public void setDisplayColors(boolean displayColors)
displayColors
- if true, color boxes are shown in the tooltip.public boolean isDisplayColors()
public void setBorderColor(IsColor borderColor)
borderColor
- color of the border.public void setBorderColor(String borderColor)
borderColor
- color of the border.public String getBorderColorAsString()
public IsColor getBorderColor()
public void setBorderWidth(int borderWidth)
borderWidth
- size of the border.public int getBorderWidth()
public TooltipCustomCallback getCustomCallback()
public void setCustomCallback(TooltipCustomCallback customCallback)
customCallback
- the customCallback to setpublic TooltipItemSortCallback getItemSortCallback()
public void setItemSortCallback(TooltipItemSortCallback itemSortCallback)
itemSortCallback
- the itemSortCallback to setpublic TooltipFilterCallback getFilterCallback()
public void setFilterCallback(TooltipFilterCallback filterCallback)
filterCallback
- the filterCallback to setprotected final void setConfiguration(T configuration)
configuration
- the configuration to setprotected final T getConfiguration()
public final String toJSON()
public final AbstractChart<?,?> getChart()