public final class Tooltips extends NativeObjectContainer implements IsDefaultTooltips
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAndAddToParent()
Called recursively when a property has been set in the item.
This is mandatory because it could happen that the parent item is not present, therefore it must be added. |
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()
Returns the callbacks element.
|
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 pixels, of the tooltip arrow.
|
protected Key |
getChildKey()
Returns the property name to use to add this element to its parent.
|
int |
getCornerRadius()
Returns the radius of tooltip corner curves.
|
protected D |
getDefaultValues()
Returns the default provider instance.
|
TextAlign |
getFooterAlign()
Returns the body 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.
|
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.
|
protected P |
getParent()
Returns the parent element.
|
IsTooltipPosition |
getPosition()
Returns the mode for positioning the tooltip.
|
default TextDirection |
getTextDirection()
Returns the text direction that will force on the canvas for rendering the object, regardless of the CSS specified on the
canvas.
|
org.pepstock.charba.client.options.TextDirectioner |
getTextDirectioner()
Returns a text directioner instance to use into default methods of this interface.
|
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
true if tooltips are enabled. |
boolean |
isIntersect()
if
true, the hover mode only applies when the mouse position intersects an item on the chart. |
default boolean |
isRtl()
Returns
true for rendering the object from right to left. |
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.
|
protected void |
setCallbackToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
Adds a proxy function (for callbacks) to a model at the specific key.
|
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 pixels, of the tooltip arrow.
|
void |
setCornerRadius(int cornerRadius)
Sets the radius of tooltip corner curves.
|
void |
setDisplayColors(boolean displayColors)
If
true, color boxes are shown in the tooltip. |
void |
setEnabled(boolean enabled)
Sets
true if tooltips are enabled. |
protected void |
setEventToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
Adds a proxy function (for events) to a model at the specific key.
|
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 hover mode only applies when the mouse position intersects an item on the chart. |
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(IsTooltipPosition position)
Sets the mode for positioning the tooltip.
|
default void |
setRtl(boolean rtl)
Sets
true for rendering the tooltips from right to left. |
default void |
setTextDirection(TextDirection textDirection)
Sets the text direction of the tooltips that will force the text direction on the canvas for rendering the tooltips,
regardless of the CSS specified on the canvas.
|
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.
|
checkValue, getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, keys, remove, remove, removeIfExists, setArrayValue, setArrayValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, typeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMode, isIntersectpublic org.pepstock.charba.client.options.TextDirectioner getTextDirectioner()
public TooltipsCallbacks getCallbacks()
public void setEnabled(boolean enabled)
true if tooltips are enabled.enabled - true if tooltips are enabled.public boolean isEnabled()
true if tooltips are enabled.isEnabled in interface IsDefaultTooltipstrue if tooltips are enabled.public void setPosition(IsTooltipPosition position)
position - the mode for positioning the tooltip.public IsTooltipPosition getPosition()
getPosition in interface IsDefaultTooltipspublic void setBackgroundColor(IsColor backgroundColor)
backgroundColor - background color of the tooltip.public void setBackgroundColor(String backgroundColor)
backgroundColor - background color of the tooltip.public String getBackgroundColorAsString()
getBackgroundColorAsString in interface IsDefaultTooltipspublic IsColor getBackgroundColor()
public void setTitleFontFamily(String titleFontFamily)
titleFontFamily - title font.public String getTitleFontFamily()
getTitleFontFamily in interface IsDefaultTooltipspublic void setTitleFontSize(int titleFontSize)
titleFontSize - title font size.public int getTitleFontSize()
getTitleFontSize in interface IsDefaultTooltipspublic void setTitleFontStyle(FontStyle titleFontStyle)
titleFontStyle - title font style.public FontStyle getTitleFontStyle()
getTitleFontStyle in interface IsDefaultTooltipspublic void setTitleAlign(TextAlign align)
align - title alignment.public TextAlign getTitleAlign()
getTitleAlign in interface IsDefaultTooltipspublic void setTitleFontColor(IsColor titleFontColor)
titleFontColor - title font color.public void setTitleFontColor(String titleFontColor)
titleFontColor - title font color.public String getTitleFontColorAsString()
getTitleFontColorAsString in interface IsDefaultTooltipspublic IsColor getTitleFontColor()
public void setTitleSpacing(int titleSpacing)
titleSpacing - spacing to add to top and bottom of each title line.public int getTitleSpacing()
getTitleSpacing in interface IsDefaultTooltipspublic void setTitleMarginBottom(int titleMarginBottom)
titleMarginBottom - margin to add on bottom of title section.public int getTitleMarginBottom()
getTitleMarginBottom in interface IsDefaultTooltipspublic void setBodyFontFamily(String bodyFontFamily)
bodyFontFamily - body line font.public String getBodyFontFamily()
getBodyFontFamily in interface IsDefaultTooltipspublic void setBodyFontSize(int bodyFontSize)
bodyFontSize - body font size.public int getBodyFontSize()
getBodyFontSize in interface IsDefaultTooltipspublic void setBodyFontStyle(FontStyle bodyFontStyle)
bodyFontStyle - body font style.public FontStyle getBodyFontStyle()
getBodyFontStyle in interface IsDefaultTooltipspublic void setBodyAlign(TextAlign align)
align - body alignment.public TextAlign getBodyAlign()
getBodyAlign in interface IsDefaultTooltipspublic void setBodyFontColor(IsColor bodyFontColor)
bodyFontColor - body font color.public void setBodyFontColor(String bodyFontColor)
bodyFontColor - body font color.public String getBodyFontColorAsString()
getBodyFontColorAsString in interface IsDefaultTooltipspublic IsColor getBodyFontColor()
public void setBodySpacing(int bodySpacing)
bodySpacing - spacing to add to top and bottom of each tooltip item.public int getBodySpacing()
getBodySpacing in interface IsDefaultTooltipspublic void setFooterFontFamily(String footerFontFamily)
footerFontFamily - footer font.public String getFooterFontFamily()
getFooterFontFamily in interface IsDefaultTooltipspublic void setFooterFontSize(int footerFontSize)
footerFontSize - footer font size.public int getFooterFontSize()
getFooterFontSize in interface IsDefaultTooltipspublic void setFooterFontStyle(FontStyle footerFontStyle)
footerFontStyle - the footer font style.public FontStyle getFooterFontStyle()
getFooterFontStyle in interface IsDefaultTooltipspublic void setFooterAlign(TextAlign align)
align - footer alignment.public TextAlign getFooterAlign()
getFooterAlign in interface IsDefaultTooltipspublic void setFooterFontColor(IsColor footerFontColor)
footerFontColor - footer font color.public void setFooterFontColor(String footerFontColor)
footerFontColor - footer font color.public String getFooterFontColorAsString()
getFooterFontColorAsString in interface IsDefaultTooltipspublic IsColor getFooterFontColor()
public void setFooterSpacing(int footerSpacing)
footerSpacing - spacing to add to top and bottom of each footer line.public int getFooterSpacing()
getFooterSpacing in interface IsDefaultTooltipspublic void setFooterMarginTop(int footerMarginTop)
footerMarginTop - margin to add before drawing the footer.public int getFooterMarginTop()
getFooterMarginTop in interface IsDefaultTooltipspublic void setXPadding(int xPadding)
xPadding - padding to add on left and right of tooltip.public int getXPadding()
getXPadding in interface IsDefaultTooltipspublic void setYPadding(int yPadding)
yPadding - padding to add on top and bottom of tooltip.public int getYPadding()
getYPadding in interface IsDefaultTooltipspublic void setCaretPadding(int caretPadding)
caretPadding - extra distance to move the end of the tooltip arrow away from the tooltip point.public int getCaretPadding()
getCaretPadding in interface IsDefaultTooltipspublic void setCaretSize(int caretSize)
caretSize - size, in pixels, of the tooltip arrow.public int getCaretSize()
getCaretSize in interface IsDefaultTooltipspublic void setCornerRadius(int cornerRadius)
cornerRadius - radius of tooltip corner curves.public int getCornerRadius()
getCornerRadius in interface IsDefaultTooltipspublic 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()
getMultiKeyBackgroundAsString in interface IsDefaultTooltipspublic IsColor getMultiKeyBackground()
public void setDisplayColors(boolean displayColors)
true, color boxes are shown in the tooltip.displayColors - if true, color boxes are shown in the tooltip.public boolean isDisplayColors()
true, color boxes are shown in the tooltip.isDisplayColors in interface IsDefaultTooltipstrue, color boxes are shown in the tooltip.public void setBorderColor(IsColor borderColor)
borderColor - color of the border.public void setBorderColor(String borderColor)
borderColor - color of the border.public String getBorderColorAsString()
getBorderColorAsString in interface IsDefaultTooltipspublic IsColor getBorderColor()
public void setBorderWidth(int borderWidth)
borderWidth - size of the border.public int getBorderWidth()
getBorderWidth in interface IsDefaultTooltipspublic void setRtl(boolean rtl)
true for rendering the tooltips from right to left.rtl - true for rendering the tooltips from right to leftpublic boolean isRtl()
IsDefaultTextDirectionertrue for rendering the object from right to left.isRtl in interface IsDefaultTextDirectionertrue for rendering the object from right to left.public void setTextDirection(TextDirection textDirection)
textDirection - the text direction of the tooltips.public TextDirection getTextDirection()
IsDefaultTextDirectionergetTextDirection in interface IsDefaultTextDirectionerpublic final void setMode(InteractionMode mode)
mode - which elements appear in the tooltip.public final InteractionMode getMode()
public final void setIntersect(boolean intersect)
true, the hover mode only applies when the mouse position intersects an item on the chart.intersect - if true, the hover mode only applies when the mouse position intersects an item on the
chart.public final boolean isIntersect()
true, the hover mode only applies when the mouse position intersects an item on the chart.true, the hover mode only applies when the mouse position intersects an item on the chart.protected final Key getChildKey()
null if is a root element.protected final P getParent()
null if is a root element.protected final D getDefaultValues()
protected final void setEventToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
model - element where adding the function proxykey - property name to use to add the function proxyproxy - the function proxy instance to addprotected final void setCallbackToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
model - element where adding the function proxykey - property name to use to add the function proxyproxy - the function proxy instance to addprotected final void checkAndAddToParent()