public final class Tooltips extends AbstractModel<P,D> implements IsDefaultTooltips, HasAnimationOptions
| Modifier and Type | Method and Description |
|---|---|
AnimationContainer |
getAnimationContainer()
Returns an animation container instance to use in the default methods of this interface.
|
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 |
getBodyColor()
Returns the body font color.
|
String |
getBodyColorAsString()
Returns the body font color as string.
|
Font |
getBodyFont()
Returns the body font element.
|
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.
|
org.pepstock.charba.client.options.BoxHandler |
getBoxHandler()
Returns a box handler instance to use in the default methods of this interface.
|
default int |
getBoxHeight()
Returns the height of colored box.
|
default int |
getBoxWidth()
Returns the width of colored box.
|
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.
|
int |
getCornerRadius()
Returns the radius of tooltip corner curves.
|
List<Event> |
getEvents()
Returns the browser events that the tooltip should listen to.
|
TextAlign |
getFooterAlign()
Returns the body alignment.
|
IsColor |
getFooterColor()
Returns the footer font color.
|
String |
getFooterColorAsString()
Returns the footer font color as string.
|
Font |
getFooterFont()
Returns the footer font element.
|
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.
|
Padding |
getPadding()
Returns the padding 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.TextDirectionHandler |
getTextDirectionHandler()
Returns a text direction handler instance to use in the default methods of this interface.
|
TextAlign |
getTitleAlign()
Returns the title alignment.
|
IsColor |
getTitleColor()
Returns the title font color.
|
String |
getTitleColorAsString()
Returns the title font color as string.
|
Font |
getTitleFont()
Returns the title font element.
|
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.
|
TooltipAlign |
getXAlign()
Returns the alignment of the tooltip caret in the X direction.
|
TooltipAlign |
getYAlign()
Returns the alignment of the tooltip caret in the Y direction.
|
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. |
boolean |
isUsePointStyle()
Returns if to use the corresponding point style (from dataset options) instead of color boxes (size is based on the minimum value between boxWidth and boxHeight).
|
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 |
setBodyColor(IsColor color)
Sets the body font color.
|
void |
setBodyColor(String color)
Sets the body font color.
|
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.
|
default void |
setBoxHeight(int boxHeight)
Sets the height of colored box.
|
default void |
setBoxWidth(int boxWidth)
Sets the width of colored box.
|
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. |
void |
setEvents(Event... events)
Sets the browser events that the tooltip should listen to.
|
void |
setFooterAlign(TextAlign align)
Sets the footer alignment.
|
void |
setFooterColor(IsColor color)
Sets the footer font color.
|
void |
setFooterColor(String color)
Sets the footer font color.
|
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 |
setTitleColor(IsColor color)
Sets the title font color.
|
void |
setTitleColor(String color)
Sets the title font color.
|
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 |
setUsePointStyle(boolean usePointStyle)
Sets if to use the corresponding point style (from dataset options) instead of color boxes (size is based on the minimum value between boxWidth and boxHeight).
|
void |
setXAlign(TooltipAlign align)
Sets the alignment of the tooltip caret in the X direction.
|
void |
setYAlign(TooltipAlign align)
Sets the alignment of the tooltip caret in the Y direction.
|
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModelcheckAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParentcheckDefaultValuesArgument, empty, getArrayValue, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, typeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMode, isIntersectgetAnimation, getAnimations, getTransitions, isAnimationEnabled, setAnimationEnabledpublic org.pepstock.charba.client.options.BoxHandler getBoxHandler()
public org.pepstock.charba.client.options.TextDirectionHandler getTextDirectionHandler()
public AnimationContainer getAnimationContainer()
HasAnimationOptionsgetAnimationContainer in interface HasAnimationOptionspublic TooltipsCallbacks getCallbacks()
public Padding getPadding()
getPadding in interface IsDefaultTooltipspublic 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 setEvents(Event... events)
events - the browser events that the tooltip should listen to.public List<Event> getEvents()
getEvents in interface IsDefaultTooltipspublic 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 setXAlign(TooltipAlign align)
align - the alignment of the tooltip caret in the X direction.public TooltipAlign getXAlign()
getXAlign in interface IsDefaultTooltipspublic void setYAlign(TooltipAlign align)
align - the alignment of the tooltip caret in the Y direction.public TooltipAlign getYAlign()
getYAlign in interface IsDefaultTooltipspublic Font getTitleFont()
getTitleFont in interface IsDefaultTooltipspublic void setTitleColor(IsColor color)
color - title font color.public void setTitleColor(String color)
color - title font color.public String getTitleColorAsString()
getTitleColorAsString in interface IsDefaultTooltipspublic IsColor getTitleColor()
public void setTitleAlign(TextAlign align)
align - title alignment.public TextAlign getTitleAlign()
getTitleAlign in interface IsDefaultTooltipspublic 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 Font getBodyFont()
getBodyFont in interface IsDefaultTooltipspublic void setBodyColor(IsColor color)
color - body font color.public void setBodyColor(String color)
color - body font color.public String getBodyColorAsString()
getBodyColorAsString in interface IsDefaultTooltipspublic IsColor getBodyColor()
public void setBodyAlign(TextAlign align)
align - body alignment.public TextAlign getBodyAlign()
getBodyAlign in interface IsDefaultTooltipspublic void setBodySpacing(int bodySpacing)
bodySpacing - spacing to add to top and bottom of each tooltip item.public int getBodySpacing()
getBodySpacing in interface IsDefaultTooltipspublic Font getFooterFont()
getFooterFont in interface IsDefaultTooltipspublic void setFooterColor(IsColor color)
color - footer font color.public void setFooterColor(String color)
color - footer font color.public String getFooterColorAsString()
getFooterColorAsString in interface IsDefaultTooltipspublic IsColor getFooterColor()
public void setFooterAlign(TextAlign align)
align - footer alignment.public TextAlign getFooterAlign()
getFooterAlign in interface IsDefaultTooltipspublic 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 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 setUsePointStyle(boolean usePointStyle)
usePointStyle - true if to use the corresponding point style (from dataset options) instead of color boxes (size is based on the minimum value between
boxWidth and boxHeight)public boolean isUsePointStyle()
isUsePointStyle in interface IsDefaultTooltipstrue if to use the corresponding point style (from dataset options) instead of color boxes (size is based on the minimum value between boxWidth and
boxHeight)public 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()
IsDefaultTextDirectionHandlertrue for rendering the object from right to left.isRtl in interface IsDefaultTextDirectionHandlertrue for rendering the object from right to left.public void setTextDirection(TextDirection textDirection)
textDirection - the text direction of the tooltips.public TextDirection getTextDirection()
IsDefaultTextDirectionHandlergetTextDirection in interface IsDefaultTextDirectionHandlerpublic void setBoxWidth(int boxWidth)
boxWidth - width of colored box.public int getBoxWidth()
getBoxWidth in interface IsDefaultBoxHandlerpublic void setBoxHeight(int boxHeight)
boxHeight - width of colored box.public int getBoxHeight()
getBoxHeight in interface IsDefaultBoxHandlerpublic 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.