Class RadialPointLabels
- java.lang.Object
-
- org.pepstock.charba.client.configuration.RadialPointLabels
-
- All Implemented Interfaces:
IsScriptableFontProvider<ScaleContext>
public class RadialPointLabels extends Object implements IsScriptableFontProvider<ScaleContext>
It is used to configure the point labels that are shown on the perimeter of the scale.
Note that these options only apply if display is true.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Axis
getAxis()
Returns the axis instance.IsColor
getBackdropColor()
Returns the background color of the point label.String
getBackdropColorAsString()
Returns the background color of the point label.ColorCallback<ScaleContext>
getBackdropColorCallback()
Returns the backdrop color callback, if set, otherwisenull
.Padding
getBackdropPadding()
Returns the padding of label backdrop.PointLabelCallback
getCallback()
Returns the user callback to change point labels.IsColor
getColor()
Returns the font color.String
getColorAsString()
Returns the font color as string.ColorCallback<ScaleContext>
getColorCallback()
Returns the color callback, if set, otherwisenull
.Font
getFont()
Returns the font element.FontCallback<ScaleContext>
getFontCallback()
Returns the font callback, if set, otherwisenull
.int
getPadding()
Returns the padding between chart and point labels, in pixels.SimplePaddingCallback
getPaddingCallback()
Returns the padding callback, if set, otherwisenull
.boolean
isCentered()
Returns if point labels are centered.boolean
isDisplay()
If true, labels are shownvoid
setBackdropColor(String backdropColor)
Sets the background color of the point label.void
setBackdropColor(ColorCallback<ScaleContext> backdropColorCallback)
Sets the backdrop color callback.void
setBackdropColor(NativeCallback backdropColorCallback)
Sets the backdrop color callback.void
setBackdropColor(IsColor backdropColor)
Sets the background color of the point label.void
setCallback(PointLabelCallback callback)
Sets the user callback to change point labels.void
setCentered(boolean centered)
Setstrue
if point labels are centered.void
setColor(String color)
Sets the font color.void
setColor(ColorCallback<ScaleContext> colorCallback)
Sets the color callback.void
setColor(NativeCallback colorCallback)
Sets the color callback.void
setColor(IsColor color)
Sets the font color.void
setDisplay(boolean display)
If true, labels are shownvoid
setFont(FontCallback<ScaleContext> fontCallback)
Sets the font callback.void
setFont(NativeCallback fontCallback)
Sets the font callback.void
setPadding(int padding)
Sets the padding between chart and point labels, in pixels.void
setPadding(NativeCallback paddingCallback)
Sets the padding callback.void
setPadding(SimplePaddingCallback paddingCallback)
Sets the padding callback.
-
-
-
Method Detail
-
getBackdropPadding
public Padding getBackdropPadding()
Returns the padding of label backdrop.- Returns:
- padding of label backdrop.
-
getFont
public Font getFont()
Returns the font element.- Returns:
- the font element
-
setColor
public void setColor(IsColor color)
Sets the font color.- Parameters:
color
- font color.
-
setColor
public void setColor(String color)
Sets the font color.- Parameters:
color
- font color.
-
getColorAsString
public String getColorAsString()
Returns the font color as string.- Returns:
- font color as string
-
getColor
public IsColor getColor()
Returns the font color.- Returns:
- font color
-
setDisplay
public void setDisplay(boolean display)
If true, labels are shown- Parameters:
display
- if true, labels are shown
-
isDisplay
public boolean isDisplay()
If true, labels are shown- Returns:
- if true, labels are shown.
-
setPadding
public void setPadding(int padding)
Sets the padding between chart and point labels, in pixels.- Parameters:
padding
- the padding between chart and point labels, in pixels.
-
getPadding
public int getPadding()
Returns the padding between chart and point labels, in pixels.- Returns:
- the padding between chart and point labels, in pixels.
-
setBackdropColor
public void setBackdropColor(IsColor backdropColor)
Sets the background color of the point label.- Parameters:
backdropColor
- the background color of the point label
-
setBackdropColor
public void setBackdropColor(String backdropColor)
Sets the background color of the point label.- Parameters:
backdropColor
- the background color of the point label
-
getBackdropColorAsString
public String getBackdropColorAsString()
Returns the background color of the point label.- Returns:
- the background color of the point label
-
getBackdropColor
public IsColor getBackdropColor()
Returns the background color of the point label.- Returns:
- the background color of the point label
-
setCentered
public void setCentered(boolean centered)
Setstrue
if point labels are centered.- Parameters:
centered
-true
if point labels are centered.
-
isCentered
public boolean isCentered()
Returns if point labels are centered.- Returns:
- if point labels are centered
-
getCallback
public PointLabelCallback getCallback()
Returns the user callback to change point labels.- Returns:
- the callback
-
setCallback
public void setCallback(PointLabelCallback callback)
Sets the user callback to change point labels.- Parameters:
callback
- the callback to set
-
getFontCallback
public FontCallback<ScaleContext> getFontCallback()
Returns the font callback, if set, otherwisenull
.- Specified by:
getFontCallback
in interfaceIsScriptableFontProvider<ScaleContext>
- Returns:
- the font callback, if set, otherwise
null
.
-
setFont
public void setFont(FontCallback<ScaleContext> fontCallback)
Sets the font callback.- Specified by:
setFont
in interfaceIsScriptableFontProvider<ScaleContext>
- Parameters:
fontCallback
- the font callback to set
-
setFont
public void setFont(NativeCallback fontCallback)
Sets the font callback.- Specified by:
setFont
in interfaceIsScriptableFontProvider<ScaleContext>
- Parameters:
fontCallback
- the font callback to set
-
getPaddingCallback
public SimplePaddingCallback getPaddingCallback()
Returns the padding callback, if set, otherwisenull
.- Returns:
- the padding callback, if set, otherwise
null
.
-
setPadding
public void setPadding(SimplePaddingCallback paddingCallback)
Sets the padding callback.- Parameters:
paddingCallback
- the padding callback to set
-
setPadding
public void setPadding(NativeCallback paddingCallback)
Sets the padding callback.- Parameters:
paddingCallback
- the padding callback to set
-
getColorCallback
public ColorCallback<ScaleContext> getColorCallback()
Returns the color callback, if set, otherwisenull
.- Returns:
- the color callback, if set, otherwise
null
.
-
setColor
public void setColor(ColorCallback<ScaleContext> colorCallback)
Sets the color callback.- Parameters:
colorCallback
- the color callback to set
-
setColor
public void setColor(NativeCallback colorCallback)
Sets the color callback.- Parameters:
colorCallback
- the color callback to set
-
getBackdropColorCallback
public ColorCallback<ScaleContext> getBackdropColorCallback()
Returns the backdrop color callback, if set, otherwisenull
.- Returns:
- the backdrop color callback, if set, otherwise
null
.
-
setBackdropColor
public void setBackdropColor(ColorCallback<ScaleContext> backdropColorCallback)
Sets the backdrop color callback.- Parameters:
backdropColorCallback
- the backdrop color callback to set
-
setBackdropColor
public void setBackdropColor(NativeCallback backdropColorCallback)
Sets the backdrop color callback.- Parameters:
backdropColorCallback
- the backdrop color callback to set
-
getAxis
public final Axis getAxis()
Returns the axis instance.- Returns:
- the axis
-
-