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.
|
Set<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 |
setEvents(Set<Event> events)
Sets the browser events that the legend 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, setEventToModel
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, 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, setValueOrArray, toJSON, type
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMode, isIntersect
getAnimation, getAnimations, getTransitions, isAnimationEnabled, setAnimationEnabled
public org.pepstock.charba.client.options.BoxHandler getBoxHandler()
public org.pepstock.charba.client.options.TextDirectionHandler getTextDirectionHandler()
public AnimationContainer getAnimationContainer()
HasAnimationOptions
getAnimationContainer
in interface HasAnimationOptions
public TooltipsCallbacks getCallbacks()
public Padding getPadding()
getPadding
in interface IsDefaultTooltips
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 IsDefaultTooltips
true
if tooltips are enabled.public void setEvents(Event... events)
events
- the browser events that the tooltip should listen to.public void setEvents(Set<Event> events)
events
- the browser events that the legend should listen to.public Set<Event> getEvents()
getEvents
in interface IsDefaultTooltips
public void setPosition(IsTooltipPosition position)
position
- the mode for positioning the tooltip.public IsTooltipPosition getPosition()
getPosition
in interface IsDefaultTooltips
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()
getBackgroundColorAsString
in interface IsDefaultTooltips
public IsColor getBackgroundColor()
public void setXAlign(TooltipAlign align)
align
- the alignment of the tooltip caret in the X direction.public TooltipAlign getXAlign()
getXAlign
in interface IsDefaultTooltips
public void setYAlign(TooltipAlign align)
align
- the alignment of the tooltip caret in the Y direction.public TooltipAlign getYAlign()
getYAlign
in interface IsDefaultTooltips
public Font getTitleFont()
getTitleFont
in interface IsDefaultTooltips
public void setTitleColor(IsColor color)
color
- title font color.public void setTitleColor(String color)
color
- title font color.public String getTitleColorAsString()
getTitleColorAsString
in interface IsDefaultTooltips
public IsColor getTitleColor()
public void setTitleAlign(TextAlign align)
align
- title alignment.public TextAlign getTitleAlign()
getTitleAlign
in interface IsDefaultTooltips
public void setTitleSpacing(int titleSpacing)
titleSpacing
- spacing to add to top and bottom of each title line.public int getTitleSpacing()
getTitleSpacing
in interface IsDefaultTooltips
public void setTitleMarginBottom(int titleMarginBottom)
titleMarginBottom
- margin to add on bottom of title section.public int getTitleMarginBottom()
getTitleMarginBottom
in interface IsDefaultTooltips
public Font getBodyFont()
getBodyFont
in interface IsDefaultTooltips
public void setBodyColor(IsColor color)
color
- body font color.public void setBodyColor(String color)
color
- body font color.public String getBodyColorAsString()
getBodyColorAsString
in interface IsDefaultTooltips
public IsColor getBodyColor()
public void setBodyAlign(TextAlign align)
align
- body alignment.public TextAlign getBodyAlign()
getBodyAlign
in interface IsDefaultTooltips
public void setBodySpacing(int bodySpacing)
bodySpacing
- spacing to add to top and bottom of each tooltip item.public int getBodySpacing()
getBodySpacing
in interface IsDefaultTooltips
public Font getFooterFont()
getFooterFont
in interface IsDefaultTooltips
public void setFooterColor(IsColor color)
color
- footer font color.public void setFooterColor(String color)
color
- footer font color.public String getFooterColorAsString()
getFooterColorAsString
in interface IsDefaultTooltips
public IsColor getFooterColor()
public void setFooterAlign(TextAlign align)
align
- footer alignment.public TextAlign getFooterAlign()
getFooterAlign
in interface IsDefaultTooltips
public void setFooterSpacing(int footerSpacing)
footerSpacing
- spacing to add to top and bottom of each footer line.public int getFooterSpacing()
getFooterSpacing
in interface IsDefaultTooltips
public void setFooterMarginTop(int footerMarginTop)
footerMarginTop
- margin to add before drawing the footer.public int getFooterMarginTop()
getFooterMarginTop
in interface IsDefaultTooltips
public 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 IsDefaultTooltips
public void setCaretSize(int caretSize)
caretSize
- size, in pixels, of the tooltip arrow.public int getCaretSize()
getCaretSize
in interface IsDefaultTooltips
public void setCornerRadius(int cornerRadius)
cornerRadius
- radius of tooltip corner curves.public int getCornerRadius()
getCornerRadius
in interface IsDefaultTooltips
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()
getMultiKeyBackgroundAsString
in interface IsDefaultTooltips
public 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 IsDefaultTooltips
true
, 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 IsDefaultTooltips
public IsColor getBorderColor()
public void setBorderWidth(int borderWidth)
borderWidth
- size of the border.public int getBorderWidth()
getBorderWidth
in interface IsDefaultTooltips
public 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 IsDefaultTooltips
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 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()
IsDefaultTextDirectionHandler
true
for rendering the object from right to left.isRtl
in interface IsDefaultTextDirectionHandler
true
for rendering the object from right to left.public void setTextDirection(TextDirection textDirection)
textDirection
- the text direction of the tooltips.public TextDirection getTextDirection()
IsDefaultTextDirectionHandler
getTextDirection
in interface IsDefaultTextDirectionHandler
public void setBoxWidth(int boxWidth)
boxWidth
- width of colored box.public int getBoxWidth()
getBoxWidth
in interface IsDefaultBoxHandler
public void setBoxHeight(int boxHeight)
boxHeight
- width of colored box.public int getBoxHeight()
getBoxHeight
in interface IsDefaultBoxHandler
public 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.