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 AxisgetAxis()Returns the axis instance.IsColorgetBackdropColor()Returns the background color of the point label.StringgetBackdropColorAsString()Returns the background color of the point label.ColorCallback<ScaleContext>getBackdropColorCallback()Returns the backdrop color callback, if set, otherwisenull.PaddinggetBackdropPadding()Returns the padding of label backdrop.intgetBorderRadius()Returns the border radius (in pixels).BarBorderRadiusgetBorderRadiusAsObject()Returns the border radius (in pixels).BorderRadiusCallback<ScaleContext>getBorderRadiusCallback()Returns the callback called to set the border radius.PointLabelCallbackgetCallback()Returns the user callback to change point labels.IsColorgetColor()Returns the font color.StringgetColorAsString()Returns the font color as string.ColorCallback<ScaleContext>getColorCallback()Returns the color callback, if set, otherwisenull.FontgetFont()Returns the font element.FontCallback<ScaleContext>getFontCallback()Returns the font callback, if set, otherwisenull.intgetPadding()Returns the padding between chart and point labels, in pixels.SimplePaddingCallbackgetPaddingCallback()Returns the padding callback, if set, otherwisenull.booleanisCentered()Returns if point labels are centered.booleanisDisplay()If true, labels are shownvoidsetBackdropColor(String backdropColor)Sets the background color of the point label.voidsetBackdropColor(ColorCallback<ScaleContext> backdropColorCallback)Sets the backdrop color callback.voidsetBackdropColor(NativeCallback backdropColorCallback)Sets the backdrop color callback.voidsetBackdropColor(IsColor backdropColor)Sets the background color of the point label.voidsetBorderRadius(int radius)Sets the border radius.voidsetBorderRadius(BorderRadiusCallback<ScaleContext> borderRadiusCallback)Sets the callback to set the border radius.voidsetBorderRadius(NativeCallback borderRadiusCallback)Sets the callback to set the border radius.voidsetBorderRadius(BarBorderRadius borderRadius)Sets the border radius (in pixels).voidsetCallback(PointLabelCallback callback)Sets the user callback to change point labels.voidsetCentered(boolean centered)Setstrueif point labels are centered.voidsetColor(String color)Sets the font color.voidsetColor(ColorCallback<ScaleContext> colorCallback)Sets the color callback.voidsetColor(NativeCallback colorCallback)Sets the color callback.voidsetColor(IsColor color)Sets the font color.voidsetDisplay(boolean display)If true, labels are shownvoidsetFont(FontCallback<ScaleContext> fontCallback)Sets the font callback.voidsetFont(NativeCallback fontCallback)Sets the font callback.voidsetPadding(int padding)Sets the padding between chart and point labels, in pixels.voidsetPadding(NativeCallback paddingCallback)Sets the padding callback.voidsetPadding(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)
Setstrueif point labels are centered.- Parameters:
centered-trueif 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
-
setBorderRadius
public void setBorderRadius(int radius)
Sets the border radius.- Parameters:
radius- the border radius.
-
setBorderRadius
public void setBorderRadius(BarBorderRadius borderRadius)
Sets the border radius (in pixels).- Parameters:
borderRadius- the border radius (in pixels).
-
getBorderRadius
public int getBorderRadius()
Returns the border radius (in pixels).- Returns:
- the border radius (in pixels).
-
getBorderRadiusAsObject
public BarBorderRadius getBorderRadiusAsObject()
Returns the border radius (in pixels).- Returns:
- the border radius (in pixels).
-
getFontCallback
public FontCallback<ScaleContext> getFontCallback()
Returns the font callback, if set, otherwisenull.- Specified by:
getFontCallbackin interfaceIsScriptableFontProvider<ScaleContext>- Returns:
- the font callback, if set, otherwise
null.
-
setFont
public void setFont(FontCallback<ScaleContext> fontCallback)
Sets the font callback.- Specified by:
setFontin interfaceIsScriptableFontProvider<ScaleContext>- Parameters:
fontCallback- the font callback to set
-
setFont
public void setFont(NativeCallback fontCallback)
Sets the font callback.- Specified by:
setFontin 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
-
getBorderRadiusCallback
public BorderRadiusCallback<ScaleContext> getBorderRadiusCallback()
Returns the callback called to set the border radius.- Returns:
- the callback called to set the border radius
-
setBorderRadius
public void setBorderRadius(BorderRadiusCallback<ScaleContext> borderRadiusCallback)
Sets the callback to set the border radius.- Parameters:
borderRadiusCallback- to set the border radius
-
setBorderRadius
public void setBorderRadius(NativeCallback borderRadiusCallback)
Sets the callback to set the border radius.- Parameters:
borderRadiusCallback- to set the border radius
-
getAxis
public final Axis getAxis()
Returns the axis instance.- Returns:
- the axis
-
-