Class EllipseLabel
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.annotation.EllipseLabel
-
- All Implemented Interfaces:
IsScriptableFontProvider<AnnotationContext>
,IsScriptablePaddingProvider<AnnotationContext>
public final class EllipseLabel extends AbstractNode
Implements a LABEL to apply on a ELLIPSE annotation.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static IsColor
DEFAULT_COLOR
Default box label text color,HtmlColor.WHITE
.static String
DEFAULT_COLOR_AS_STRING
Default box label font color as string, rgb(255, 255, 255).static boolean
DEFAULT_DISPLAY
Default box label display, false.static Weight
DEFAULT_FONT_WEIGHT
Default box label font weight,Weight.BOLD
.static int
DEFAULT_PADDING
Default box label padding, 6.static double
DEFAULT_ROTATION
Default box label rotation, 0.0.static TextAlign
DEFAULT_TEXT_ALIGN
Default text align for labels,TextAlign.START
.static double
DEFAULT_X_ADJUST
Default box label X adjust, 0.0.static double
DEFAULT_Y_ADJUST
Default box label Y adjust, 0.0.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Default Methods Modifier and Type Method Description default IsColor
getColor()
Returns the color of text.default String
getColorAsString()
Returns the color of text as string.default ColorCallback<AnnotationContext>
getColorCallback()
Returns the callback called to set the color of the text of label.default List<String>
getContent()
Returns the text to display in label as list.default Canvas
getContentAsCanvas()
Returns the text to display in label asCanvas
.default Img
getContentAsImage()
Returns the text to display in label as list.default ContentCallback
getContentCallback()
Returns the callback called to set the text to display in label as list.SimpleDisplayCallback<AnnotationContext>
getDisplayCallback()
Returns the callback called to set whether the label should be displayed.default SimpleDisplayCallback<AnnotationContext>
getDisplayCallback()
Returns the callback called to set whether the label should be displayed.DrawTime
getDrawTime()
Returns the draw time which defines when the annotations are drawn.DrawTime
getDrawTime()
Returns the draw time which defines when the annotations are drawn.default IsFont
getFont()
Returns the font element.default FontCallback<AnnotationContext>
getFontCallback()
Returns the font callback, if set, otherwisenull
.default int
getImageHeight()
Returns the height of label content, when is set asImg
, in pixels in order to scale the image when drawn.default String
getImageHeightAsPercentage()
Returns the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.default ImageSizeCallback
getImageHeightCallback()
Returns the callback called to set the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.default int
getImageWidth()
Returns the width of label content, when is set asImg
, in pixels in order to scale the image when drawn.default String
getImageWidthAsPercentage()
Returns the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.default ImageSizeCallback
getImageWidthCallback()
Returns the callback called to set the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.org.pepstock.charba.client.annotation.LabelHandler
getLabelHandler()
default IsPadding
getPadding()
Returns the padding element.default PaddingCallback<AnnotationContext>
getPaddingCallback()
Returns the callback called to set the padding of label.AlignPosition
getPosition()
Returns the anchor position of label on line.org.pepstock.charba.client.annotation.IsDefaultsAlignPosition
getPosition()
Returns the anchor position of label in the box.LabelAlignPositionCallback
getPositionCallback()
Returns the callback called to set the anchor position of label on box.default LabelAlignPositionCallback
getPositionCallback()
Returns the callback called to set the anchor position of label in the box.default double
getRotation()
Returns the rotation (in pixels).default RotationCallback<AnnotationContext>
getRotationCallback()
Returns the callback called to set the rotation.org.pepstock.charba.client.annotation.RotationHandler
getRotationHandler()
org.pepstock.charba.client.annotation.RotationHandler
getRotationHandler()
Returns a rotation handler instance to use in the default methods of this interface.default TextAlign
getTextAlign()
Returns the horizontal alignment of the label text when multiple lines.default TextAlignCallback<AnnotationContext>
getTextAlignCallback()
Returns the callback called to set the horizontal alignment of the label text when multiple lines.default IsColor
getTextStrokeColor()
Returns the color of the text stroke of annotation.default String
getTextStrokeColorAsString()
Returns the color of the text stroke of annotation.default ColorCallback<AnnotationContext>
getTextStrokeColorCallback()
Returns the callback called to set the color of the text stroke of annotation.org.pepstock.charba.client.annotation.TextStrokeOptionsHandler
getTextStrokeOptionsHandler()
default int
getTextStrokeWidth()
Returns the width of the text stroke in pixels.default WidthCallback<AnnotationContext>
getTextStrokeWidthCallback()
Returns the callback called to set the width of the text stroke in pixels.double
getXAdjust()
Returns the adjustment along x-axis (left-right) of label relative to above number (can be negative).
For horizontal lines positioned left or right, negative values move the label toward the edge, and positive values toward the center.double
getXAdjust()
Returns the adjustment along x-axis (left-right) of label relative to above number (can be negative).
For horizontal lines positioned left or right, negative values move the label toward the edge, and positive values toward the center.AdjustSizeCallback
getXAdjustCallback()
Returns the callback called to set the adjustment along x-axis (left-right) of label relative to above number (can be negative).default AdjustSizeCallback
getXAdjustCallback()
Returns the callback called to set the adjustment along x-axis (left-right) of label relative to above number (can be negative).double
getYAdjust()
Returns the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).
For vertical lines positioned top or bottom, negative values move the label toward the edge, and positive values toward the center.double
getYAdjust()
Returns the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).
For vertical lines positioned top or bottom, negative values move the label toward the edge, and positive values toward the center.AdjustSizeCallback
getYAdjustCallback()
Returns the callback called to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).default AdjustSizeCallback
getYAdjustCallback()
Returns the callback called to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).int
getZ()
Returns the property determines the drawing stack level of the box annotation element.
All visible elements will be drawn in ascending order of `z` option, with the same "drawTime" option.default int
getZ()
Returns the property determines the drawing stack level of the box annotation element.
All visible elements will be drawn in ascending order of `z` option, with the same "drawTime" option.ZCallback
getZCallback()
Returns the callback called to set the property determines the drawing stack level of the box annotation element.default ZCallback
getZCallback()
Returns the callback called to set the property determines the drawing stack level of the box annotation element.boolean
isDisplay()
Returnstrue
whether the label should be displayed.boolean
isDisplay()
Returnstrue
whether the label should be displayed.default void
setColor(String fontColor)
Sets the color of text as string.default void
setColor(ColorCallback<AnnotationContext> colorCallback)
Sets the callback to set the color of the text of label.default void
setColor(NativeCallback colorCallback)
Sets the callback to set the color of the text of label.default void
setColor(IsColor fontColor)
Sets the color of text.default void
setContent(String... content)
Sets the text to display in label.
Provide an array to display values on a new line.default void
setContent(List<String> content)
Sets the text to display in label.
Provide a list to display values on a new line.default void
setContent(ContentCallback contentCallback)
Sets the callback to set the text to display in label as list.default void
setContent(NativeCallback contentCallback)
Sets the callback to set the text to display in label as list.default void
setContent(Canvas content)
Sets the canvas to display in label.default void
setContent(Img content)
Sets the image to display in label.void
setDisplay(boolean display)
Setstrue
whether the label should be displayed.void
setDisplay(NativeCallback displayCallback)
Sets the callback to set whether the label should be displayed.void
setDisplay(SimpleDisplayCallback<AnnotationContext> displayCallback)
Sets the callback to set whether the label should be displayed.void
setDrawTime(DrawTime drawTime)
Sets the draw time which defines when the annotations are drawn.default void
setFont(FontCallback<AnnotationContext> fontCallback)
Sets the font callback.default void
setFont(NativeCallback fontCallback)
Sets the font callback.default void
setImageHeight(int height)
Sets the height of label content, when is set asImg
, in pixels in order to scale the image when drawn.default void
setImageHeight(ImageSizeCallback imageSizeCallback)
Sets the callback to set the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.default void
setImageHeight(NativeCallback imageSizeCallback)
Sets the callback to set the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.default void
setImageHeightAsPercentage(String heightPercentage)
Sets the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.default void
setImageWidth(int width)
Sets the width of label content, when is set asImg
, in pixels in order to scale the image when drawn.default void
setImageWidth(ImageSizeCallback imageSizeCallback)
Sets the callback to set the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.default void
setImageWidth(NativeCallback imageSizeCallback)
Sets the callback to set the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.default void
setImageWidthAsPercentage(String widthPercentage)
Sets the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.default void
setPadding(NativeCallback paddingCallback)
Sets the callback to set the padding of label to add left and right.default void
setPadding(PaddingCallback<AnnotationContext> paddingCallback)
Sets the callback to set the padding of label.void
setPosition(LabelAlignPositionCallback positionCallback)
Sets the callback to set the anchor position of label on box.void
setPosition(NativeCallback positionCallback)
Sets the callback to set the anchor position of label on box.default void
setRotation(double radius)
Sets the rotation.default void
setRotation(NativeCallback rotationCallback)
Sets the callback to set the rotation.default void
setRotation(RotationCallback<AnnotationContext> rotationCallback)
Sets the callback to set the rotation.default void
setTextAlign(NativeCallback alignCallback)
Sets the callback to set the horizontal alignment of the label text when multiple lines.default void
setTextAlign(TextAlignCallback<AnnotationContext> alignCallback)
Sets the callback to set the horizontal alignment of the label text when multiple lines.default void
setTextAlign(TextAlign align)
Sets the horizontal alignment of the label text when multiple lines.default void
setTextStrokeColor(String textStrokeColor)
Sets the color of the text stroke of annotation.default void
setTextStrokeColor(ColorCallback<AnnotationContext> textStrokeColorCallback)
Sets the callback to set the color of the text stroke of annotation.default void
setTextStrokeColor(NativeCallback textStrokeColorCallback)
Sets the callback to set the color of the text stroke of annotation.default void
setTextStrokeColor(IsColor textStrokeColor)
Sets the color of the text stroke of annotation.default void
setTextStrokeWidth(int textStrokeWidth)
Sets the width of the text stroke in pixels.default void
setTextStrokeWidth(NativeCallback textStrokeWidthCallback)
Sets the callback to set the color of the width of the text stroke in pixels.default void
setTextStrokeWidth(WidthCallback<AnnotationContext> textStrokeWidthCallback)
Sets the callback to set the color of the width of the text stroke in pixels.void
setXAdjust(double xAdjust)
Sets the adjustment along x-axis (left-right) of label relative to above number (can be negative).
For horizontal lines positioned left or right, negative values move the label toward the edge, and positive values toward the center.void
setXAdjust(AdjustSizeCallback adjustCallback)
Sets the callback to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).void
setXAdjust(NativeCallback adjustCallback)
Sets the callback to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).void
setYAdjust(double yAdjust)
Sets the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).
For vertical lines positioned top or bottom, negative values move the label toward the edge, and positive values toward the center.void
setYAdjust(AdjustSizeCallback adjustCallback)
Sets the callback to set the adjustment along x-axis (left-right) of label relative to above number (can be negative).void
setYAdjust(NativeCallback adjustCallback)
Sets the callback to set the adjustment along x-axis (left-right) of label relative to above number (can be negative).void
setZ(int z)
Sets the property determines the drawing stack level of the box annotation element.
All visible elements will be drawn in ascending order of `z` option, with the same "drawTime" option.void
setZ(ZCallback zCallback)
Sets the callback called to set the property determines the drawing stack level of the box annotation element.void
setZ(NativeCallback zCallback)
Sets the callback called to set the property determines the drawing stack level of the box annotation element.-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, 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
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
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, 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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Field Detail
-
DEFAULT_DISPLAY
public static final boolean DEFAULT_DISPLAY
Default box label display, false.- See Also:
- Constant Field Values
-
DEFAULT_FONT_WEIGHT
public static final Weight DEFAULT_FONT_WEIGHT
Default box label font weight,Weight.BOLD
.
-
DEFAULT_COLOR
public static final IsColor DEFAULT_COLOR
Default box label text color,HtmlColor.WHITE
.
-
DEFAULT_COLOR_AS_STRING
public static final String DEFAULT_COLOR_AS_STRING
Default box label font color as string, rgb(255, 255, 255).
-
DEFAULT_PADDING
public static final int DEFAULT_PADDING
Default box label padding, 6.- See Also:
- Constant Field Values
-
DEFAULT_X_ADJUST
public static final double DEFAULT_X_ADJUST
Default box label X adjust, 0.0.- See Also:
- Constant Field Values
-
DEFAULT_Y_ADJUST
public static final double DEFAULT_Y_ADJUST
Default box label Y adjust, 0.0.- See Also:
- Constant Field Values
-
DEFAULT_ROTATION
public static final double DEFAULT_ROTATION
Default box label rotation, 0.0.- See Also:
- Constant Field Values
-
DEFAULT_TEXT_ALIGN
public static final TextAlign DEFAULT_TEXT_ALIGN
Default text align for labels,TextAlign.START
.
-
-
Method Detail
-
getPosition
public abstract org.pepstock.charba.client.annotation.IsDefaultsAlignPosition getPosition()
Returns the anchor position of label in the box.- Returns:
- the anchor position of label in the box
-
getPositionCallback
public default LabelAlignPositionCallback getPositionCallback()
Returns the callback called to set the anchor position of label in the box.- Returns:
- the callback called to set the anchor position of label in the box
-
isDisplay
public abstract boolean isDisplay()
Returnstrue
whether the label should be displayed.- Returns:
true
whether the label should be displayed
-
getDrawTime
public abstract DrawTime getDrawTime()
Returns the draw time which defines when the annotations are drawn.- Returns:
- the draw time which defines when the annotations are drawn
-
getXAdjust
public abstract double getXAdjust()
Returns the adjustment along x-axis (left-right) of label relative to above number (can be negative).
For horizontal lines positioned left or right, negative values move the label toward the edge, and positive values toward the center.- Returns:
- the adjustment along x-axis (left-right) of label
-
getYAdjust
public abstract double getYAdjust()
Returns the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).
For vertical lines positioned top or bottom, negative values move the label toward the edge, and positive values toward the center.- Returns:
- the adjustment along y-axis (top-bottom) of label
-
getZ
public default int getZ()
Returns the property determines the drawing stack level of the box annotation element.
All visible elements will be drawn in ascending order of `z` option, with the same "drawTime" option.- Returns:
- the property determines the drawing stack level of the box annotation element.
All visible elements will be drawn in ascending order of `z` option, with the same "drawTime" option.
-
getDisplayCallback
public default SimpleDisplayCallback<AnnotationContext> getDisplayCallback()
Returns the callback called to set whether the label should be displayed.- Returns:
- the callback called to set whether the label should be displayed
-
getXAdjustCallback
public default AdjustSizeCallback getXAdjustCallback()
Returns the callback called to set the adjustment along x-axis (left-right) of label relative to above number (can be negative).- Returns:
- the callback called to set the adjustment along x-axis (left-right) of label relative to above number (can be negative)
-
getYAdjustCallback
public default AdjustSizeCallback getYAdjustCallback()
Returns the callback called to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).- Returns:
- the callback called to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative)
-
getZCallback
public default ZCallback getZCallback()
Returns the callback called to set the property determines the drawing stack level of the box annotation element.- Returns:
- the callback called to set the property determines the drawing stack level of the box annotation element
-
getRotationHandler
public abstract org.pepstock.charba.client.annotation.RotationHandler getRotationHandler()
Returns a rotation handler instance to use in the default methods of this interface.- Returns:
- a rotation handler instance
-
setRotation
public default void setRotation(double radius)
Sets the rotation.- Parameters:
radius
- the rotation.
-
getRotation
public default double getRotation()
Returns the rotation (in pixels).- Returns:
- the rotation (in pixels).
-
getRotationCallback
public default RotationCallback<AnnotationContext> getRotationCallback()
Returns the callback called to set the rotation.- Returns:
- the callback called to set the rotation
-
setRotation
public default void setRotation(RotationCallback<AnnotationContext> rotationCallback)
Sets the callback to set the rotation.- Parameters:
rotationCallback
- to set the rotation
-
setRotation
public default void setRotation(NativeCallback rotationCallback)
Sets the callback to set the rotation.- Parameters:
rotationCallback
- to set the rotation
-
getRotationHandler
public final org.pepstock.charba.client.annotation.RotationHandler getRotationHandler()
-
getPosition
public final AlignPosition getPosition()
Returns the anchor position of label on line.- Returns:
- the anchor position of label on line
-
getPositionCallback
public final LabelAlignPositionCallback getPositionCallback()
Returns the callback called to set the anchor position of label on box.- Returns:
- the callback called to set the anchor position of label on box
-
setPosition
public final void setPosition(LabelAlignPositionCallback positionCallback)
Sets the callback to set the anchor position of label on box.- Parameters:
positionCallback
- to set the anchor position of label on box
-
setPosition
public final void setPosition(NativeCallback positionCallback)
Sets the callback to set the anchor position of label on box.- Parameters:
positionCallback
- to set the anchor position of label on box
-
getLabelHandler
public final org.pepstock.charba.client.annotation.LabelHandler getLabelHandler()
-
getTextStrokeOptionsHandler
public final org.pepstock.charba.client.annotation.TextStrokeOptionsHandler getTextStrokeOptionsHandler()
-
setDisplay
public final void setDisplay(boolean display)
Setstrue
whether the label should be displayed.- Parameters:
display
-true
whether the label should be displayed
-
isDisplay
public final boolean isDisplay()
Returnstrue
whether the label should be displayed.- Returns:
true
whether the label should be displayed
-
setXAdjust
public final void setXAdjust(double xAdjust)
Sets the adjustment along x-axis (left-right) of label relative to above number (can be negative).
For horizontal lines positioned left or right, negative values move the label toward the edge, and positive values toward the center.- Parameters:
xAdjust
- the adjustment along x-axis (left-right) of label
-
getXAdjust
public final double getXAdjust()
Returns the adjustment along x-axis (left-right) of label relative to above number (can be negative).
For horizontal lines positioned left or right, negative values move the label toward the edge, and positive values toward the center.- Returns:
- the adjustment along x-axis (left-right) of label
-
setYAdjust
public final void setYAdjust(double yAdjust)
Sets the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).
For vertical lines positioned top or bottom, negative values move the label toward the edge, and positive values toward the center.- Parameters:
yAdjust
- the adjustment along y-axis (top-bottom) of label
-
getYAdjust
public final double getYAdjust()
Returns the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).
For vertical lines positioned top or bottom, negative values move the label toward the edge, and positive values toward the center.- Returns:
- the adjustment along y-axis (top-bottom) of label
-
setDrawTime
public final void setDrawTime(DrawTime drawTime)
Sets the draw time which defines when the annotations are drawn.- Parameters:
drawTime
- the draw time which defines when the annotations are drawn
-
getDrawTime
public final DrawTime getDrawTime()
Returns the draw time which defines when the annotations are drawn.- Returns:
- the draw time which defines when the annotations are drawn
-
setZ
public final void setZ(int z)
Sets the property determines the drawing stack level of the box annotation element.
All visible elements will be drawn in ascending order of `z` option, with the same "drawTime" option.- Parameters:
z
- the property determines the drawing stack level of the box annotation element.
All visible elements will be drawn in ascending order of `z` option, with the same "drawTime" option.
-
getZ
public final int getZ()
Returns the property determines the drawing stack level of the box annotation element.
All visible elements will be drawn in ascending order of `z` option, with the same "drawTime" option.- Returns:
- the property determines the drawing stack level of the box annotation element.
All visible elements will be drawn in ascending order of `z` option, with the same "drawTime" option.
-
getDisplayCallback
public final SimpleDisplayCallback<AnnotationContext> getDisplayCallback()
Returns the callback called to set whether the label should be displayed.- Returns:
- the callback called to set whether the label should be displayed
-
setDisplay
public final void setDisplay(SimpleDisplayCallback<AnnotationContext> displayCallback)
Sets the callback to set whether the label should be displayed.- Parameters:
displayCallback
- to set whether the label should be displayed
-
setDisplay
public final void setDisplay(NativeCallback displayCallback)
Sets the callback to set whether the label should be displayed.- Parameters:
displayCallback
- to set whether the label should be displayed
-
getXAdjustCallback
public final AdjustSizeCallback getXAdjustCallback()
Returns the callback called to set the adjustment along x-axis (left-right) of label relative to above number (can be negative).- Returns:
- the callback called to set the adjustment along x-axis (left-right) of label relative to above number (can be negative)
-
setXAdjust
public final void setXAdjust(AdjustSizeCallback adjustCallback)
Sets the callback to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).- Parameters:
adjustCallback
- to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative)
-
setXAdjust
public final void setXAdjust(NativeCallback adjustCallback)
Sets the callback to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).- Parameters:
adjustCallback
- to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative)
-
getYAdjustCallback
public final AdjustSizeCallback getYAdjustCallback()
Returns the callback called to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).- Returns:
- the callback called to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative)
-
setYAdjust
public final void setYAdjust(AdjustSizeCallback adjustCallback)
Sets the callback to set the adjustment along x-axis (left-right) of label relative to above number (can be negative).- Parameters:
adjustCallback
- to set the adjustment along x-axis (left-right) of label relative to above number (can be negative)
-
setYAdjust
public final void setYAdjust(NativeCallback adjustCallback)
Sets the callback to set the adjustment along x-axis (left-right) of label relative to above number (can be negative).- Parameters:
adjustCallback
- to set the adjustment along x-axis (left-right) of label relative to above number (can be negative)
-
getZCallback
public final ZCallback getZCallback()
Returns the callback called to set the property determines the drawing stack level of the box annotation element.- Returns:
- the callback called to set the property determines the drawing stack level of the box annotation element
-
setZ
public final void setZ(ZCallback zCallback)
Sets the callback called to set the property determines the drawing stack level of the box annotation element.- Parameters:
zCallback
- to set the property determines the drawing stack level of the box annotation element
-
setZ
public final void setZ(NativeCallback zCallback)
Sets the callback called to set the property determines the drawing stack level of the box annotation element.- Parameters:
zCallback
- to set the property determines the drawing stack level of the box annotation element
-
getFont
public default IsFont getFont()
Returns the font element.- Returns:
- the font element.
-
getPadding
public default IsPadding getPadding()
Returns the padding element.- Returns:
- the padding element.
-
setColor
public default void setColor(IsColor fontColor)
Sets the color of text.- Parameters:
fontColor
- the color of text
-
setColor
public default void setColor(String fontColor)
Sets the color of text as string.- Parameters:
fontColor
- the color of text
-
getColorAsString
public default String getColorAsString()
Returns the color of text as string.- Returns:
- the color of text
-
getColor
public default IsColor getColor()
Returns the color of text.- Returns:
- the color of text
-
setContent
public default void setContent(List<String> content)
Sets the text to display in label.
Provide a list to display values on a new line.- Parameters:
content
- the text to display in label as multi-line values
-
setContent
public default void setContent(String... content)
Sets the text to display in label.
Provide an array to display values on a new line.- Parameters:
content
- the text to display in label
-
setContent
public default void setContent(Img content)
Sets the image to display in label.- Parameters:
content
- the image to display in label
-
setContent
public default void setContent(Canvas content)
Sets the canvas to display in label.- Parameters:
content
- the canvas to display in label
-
getContent
public default List<String> getContent()
Returns the text to display in label as list.- Returns:
- the text to display in label as list
-
getContentAsImage
public default Img getContentAsImage()
Returns the text to display in label as list.- Returns:
- the text to display in label as list
-
getContentAsCanvas
public default Canvas getContentAsCanvas()
Returns the text to display in label asCanvas
.- Returns:
- the text to display in label as
Canvas
-
setImageHeight
public default void setImageHeight(int height)
Sets the height of label content, when is set asImg
, in pixels in order to scale the image when drawn.- Parameters:
height
- the height of label content, when is set asImg
, in pixels in order to scale the image when drawn
-
setImageHeightAsPercentage
public default void setImageHeightAsPercentage(String heightPercentage)
Sets the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.- Parameters:
heightPercentage
- the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn
-
getImageHeight
public default int getImageHeight()
Returns the height of label content, when is set asImg
, in pixels in order to scale the image when drawn.- Returns:
- the height of label content, when is set as
Img
, in pixels in order to scale the image when drawn
-
getImageHeightAsPercentage
public default String getImageHeightAsPercentage()
Returns the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.- Returns:
- the height of label content, when is set as
Img
, in percentage (format is "{n}%") in order to scale the image when drawn
-
setImageWidth
public default void setImageWidth(int width)
Sets the width of label content, when is set asImg
, in pixels in order to scale the image when drawn.- Parameters:
width
- the height of label content, when is set asImg
, in pixels in order to scale the image when drawn
-
setImageWidthAsPercentage
public default void setImageWidthAsPercentage(String widthPercentage)
Sets the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.- Parameters:
widthPercentage
- the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn
-
getImageWidth
public default int getImageWidth()
Returns the width of label content, when is set asImg
, in pixels in order to scale the image when drawn.- Returns:
- the width of label content, when is set as
Img
, in pixels in order to scale the image when drawn
-
getImageWidthAsPercentage
public default String getImageWidthAsPercentage()
Returns the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.- Returns:
- the width of label content, when is set as
Img
, in percentage (format is "{n}%") in order to scale the image when drawn
-
setTextAlign
public default void setTextAlign(TextAlign align)
Sets the horizontal alignment of the label text when multiple lines.- Parameters:
align
- the horizontal alignment of the label text when multiple lines
-
getTextAlign
public default TextAlign getTextAlign()
Returns the horizontal alignment of the label text when multiple lines.- Returns:
- the horizontal alignment of the label text when multiple lines
-
getColorCallback
public default ColorCallback<AnnotationContext> getColorCallback()
Returns the callback called to set the color of the text of label.- Returns:
- the callback called to set the color of the text of label
-
setColor
public default void setColor(ColorCallback<AnnotationContext> colorCallback)
Sets the callback to set the color of the text of label.- Parameters:
colorCallback
- to set the color of the text of label
-
setColor
public default void setColor(NativeCallback colorCallback)
Sets the callback to set the color of the text of label.- Parameters:
colorCallback
- to set the color of the text of label
-
getContentCallback
public default ContentCallback getContentCallback()
Returns the callback called to set the text to display in label as list.- Returns:
- the callback called to set the text to display in label as list
-
setContent
public default void setContent(ContentCallback contentCallback)
Sets the callback to set the text to display in label as list.- Parameters:
contentCallback
- to set the text to display in label as list
-
setContent
public default void setContent(NativeCallback contentCallback)
Sets the callback to set the text to display in label as list.- Parameters:
contentCallback
- to set the text to display in label as list
-
getImageHeightCallback
public default ImageSizeCallback getImageHeightCallback()
Returns the callback called to set the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.- Returns:
- the callback called to set the height of label content, when is set as
Img
, in percentage (format is "{n}%") in order to scale the image when drawn
-
setImageHeight
public default void setImageHeight(ImageSizeCallback imageSizeCallback)
Sets the callback to set the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.- Parameters:
imageSizeCallback
- to set the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn
-
setImageHeight
public default void setImageHeight(NativeCallback imageSizeCallback)
Sets the callback to set the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.- Parameters:
imageSizeCallback
- to set the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn
-
getImageWidthCallback
public default ImageSizeCallback getImageWidthCallback()
Returns the callback called to set the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.- Returns:
- the callback called to set the width of label content, when is set as
Img
, in percentage (format is "{n}%") in order to scale the image when drawn
-
setImageWidth
public default void setImageWidth(ImageSizeCallback imageSizeCallback)
Sets the callback to set the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.- Parameters:
imageSizeCallback
- to set the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn
-
setImageWidth
public default void setImageWidth(NativeCallback imageSizeCallback)
Sets the callback to set the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.- Parameters:
imageSizeCallback
- to set the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn
-
getTextAlignCallback
public default TextAlignCallback<AnnotationContext> getTextAlignCallback()
Returns the callback called to set the horizontal alignment of the label text when multiple lines.- Returns:
- the callback called to set the horizontal alignment of the label text when multiple lines
-
setTextAlign
public default void setTextAlign(TextAlignCallback<AnnotationContext> alignCallback)
Sets the callback to set the horizontal alignment of the label text when multiple lines.- Parameters:
alignCallback
- to the horizontal alignment of the label text when multiple lines
-
setTextAlign
public default void setTextAlign(NativeCallback alignCallback)
Sets the callback to set the horizontal alignment of the label text when multiple lines.- Parameters:
alignCallback
- to the horizontal alignment of the label text when multiple lines
-
getPaddingCallback
public default PaddingCallback<AnnotationContext> getPaddingCallback()
Returns the callback called to set the padding of label.- Specified by:
getPaddingCallback
in interfaceIsScriptablePaddingProvider<AnnotationContext>
- Returns:
- the callback called to set the padding of label
-
setPadding
public default void setPadding(PaddingCallback<AnnotationContext> paddingCallback)
Sets the callback to set the padding of label.- Specified by:
setPadding
in interfaceIsScriptablePaddingProvider<AnnotationContext>
- Parameters:
paddingCallback
- to set the padding of label
-
setPadding
public default void setPadding(NativeCallback paddingCallback)
Sets the callback to set the padding of label to add left and right.- Specified by:
setPadding
in interfaceIsScriptablePaddingProvider<AnnotationContext>
- Parameters:
paddingCallback
- to set the padding of label to add left and right
-
getFontCallback
public default FontCallback<AnnotationContext> getFontCallback()
Returns the font callback, if set, otherwisenull
.- Specified by:
getFontCallback
in interfaceIsScriptableFontProvider<AnnotationContext>
- Returns:
- the font callback, if set, otherwise
null
.
-
setFont
public default void setFont(FontCallback<AnnotationContext> fontCallback)
Sets the font callback.- Specified by:
setFont
in interfaceIsScriptableFontProvider<AnnotationContext>
- Parameters:
fontCallback
- the font callback to set
-
setFont
public default void setFont(NativeCallback fontCallback)
Sets the font callback.- Specified by:
setFont
in interfaceIsScriptableFontProvider<AnnotationContext>
- Parameters:
fontCallback
- the font callback to set
-
setTextStrokeColor
public default void setTextStrokeColor(IsColor textStrokeColor)
Sets the color of the text stroke of annotation.- Parameters:
textStrokeColor
- the color of the text stroke of annotation
-
setTextStrokeColor
public default void setTextStrokeColor(String textStrokeColor)
Sets the color of the text stroke of annotation.- Parameters:
textStrokeColor
- the color of the text stroke of annotation
-
getTextStrokeColorAsString
public default String getTextStrokeColorAsString()
Returns the color of the text stroke of annotation.- Returns:
- the color of the text stroke of annotation
-
getTextStrokeColor
public default IsColor getTextStrokeColor()
Returns the color of the text stroke of annotation.- Returns:
- the color of the text stroke of annotation
-
setTextStrokeWidth
public default void setTextStrokeWidth(int textStrokeWidth)
Sets the width of the text stroke in pixels.- Parameters:
textStrokeWidth
- the width of the text stroke in pixels.
-
getTextStrokeWidth
public default int getTextStrokeWidth()
Returns the width of the text stroke in pixels.- Returns:
- the width of the text stroke in pixels.
-
getTextStrokeColorCallback
public default ColorCallback<AnnotationContext> getTextStrokeColorCallback()
Returns the callback called to set the color of the text stroke of annotation.- Returns:
- the callback called to set the color of the text stroke of annotation
-
setTextStrokeColor
public default void setTextStrokeColor(ColorCallback<AnnotationContext> textStrokeColorCallback)
Sets the callback to set the color of the text stroke of annotation.- Parameters:
textStrokeColorCallback
- to set the color of the text stroke of annotation
-
setTextStrokeColor
public default void setTextStrokeColor(NativeCallback textStrokeColorCallback)
Sets the callback to set the color of the text stroke of annotation.- Parameters:
textStrokeColorCallback
- to set the color of the text stroke of annotation
-
getTextStrokeWidthCallback
public default WidthCallback<AnnotationContext> getTextStrokeWidthCallback()
Returns the callback called to set the width of the text stroke in pixels.- Returns:
- the callback called to set the width of the text stroke in pixels
-
setTextStrokeWidth
public default void setTextStrokeWidth(WidthCallback<AnnotationContext> textStrokeWidthCallback)
Sets the callback to set the color of the width of the text stroke in pixels.- Parameters:
textStrokeWidthCallback
- to set the width of the text stroke in pixels
-
setTextStrokeWidth
public default void setTextStrokeWidth(NativeCallback textStrokeWidthCallback)
Sets the callback to set the color of the width of the text stroke in pixels.- Parameters:
textStrokeWidthCallback
- to set the width of the text stroke in pixels
-
-