Class OptionsElement
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.items.ChartElementOptions
-
- org.pepstock.charba.client.annotation.elements.OptionsElement
-
public final class OptionsElement extends ChartElementOptions
Maps the options of aAnnotationElement
at runtime.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AlignPositionElement
getAlignPosition()
Returns the anchor position of label on line.ArrowHeadsElement
getArrowHeads()
Returns the arrow heads options of the element.IsColor
getBackgroundColor()
Returns the color of the background of annotation.String
getBackgroundColorAsString()
Returns the color of the background of annotation.IsColor
getBackgroundShadowColor()
Returns the color of the shadow of annotation.String
getBackgroundShadowColorAsString()
Returns the color of the shadow of annotation.CapStyle
getBorderCapStyle()
Returns how the end points of every line are drawn.IsColor
getBorderColor()
Returns the color of the border of annotation.String
getBorderColorAsString()
Returns the color of the border of annotation.List<Integer>
getBorderDash()
Returns the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.double
getBorderDashOffset()
Returns the line dash pattern offset.JoinStyle
getBorderJoinStyle()
Returns how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).int
getBorderRadius()
Returns the border radius (in pixels).BarBorderRadius
getBorderRadiusAsObject()
Returns the border radius (in pixels).String
getBorderShadowColorAsString()
Returns the color of the border shadow of annotation.int
getBorderWidth()
Returns the width of the border in pixels.CalloutElement
getCallout()
Returns the callout options of the element.List<IsColor>
getColor()
Returns the color of text.List<String>
getColorAsString()
Returns the color of text as string.List<String>
getContent()
Returns the text to display in label as list.Canvas
getContentAsCanvas()
Returns the text to display in label asCanvas
.Img
getContentAsImage()
Returns the text to display in label asImg
.ControlPointElement
getControlPoint()
Returns the control point to drawn the curve, calculated in pixels.
It can be set by a string in percentage format 'number%' which are representing the percentage of the distance between the start and end point from the center.DrawTime
getDrawTime()
Returns the draw time which defines when the annotations are drawn.Date
getEndValueAsDate()
Returns the data value at which the line draw should end.double
getEndValueAsDouble()
Returns the data value at which the line draw should end.String
getEndValueAsString()
Returns the data value at which the line draw should end.IsFont
getFont()
Returns the font element.int
getImageHeight()
Returns the height of label content, when is set asImg
, in pixels in order to scale the image when drawn.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.double
getImageOpacity()
Overrides the opacity of the image or canvas element.int
getImageWidth()
Returns the width of label content, when is set asImg
, in pixels in order to scale the image when drawn.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.IsPadding
getPadding()
Returns the padding element.PointStyle
getPointStyle()
Returns the style of the point.Canvas
getPointStyleAsCanvas()
Returns the style of the point as canvas.
If property is missing or not an canvas, returnsnull
.Img
getPointStyleAsImage()
Returns the style of the point as image.
If property is missing or not an image, returnsnull
.PointStyleType
getPointStyleType()
Returns the type of point style.LabelPosition
getPosition()
Returns the anchor position of label on line.double
getPositionAsPercentage()
Returns the position of label on line by the percentage (value between 0 and 1) of the line dimension.double
getRadius()
Returns the radius of the annotation.double
getRotation()
Returns the rotation of annotation in degrees.ScaleId
getScaleID()
Returns the ID of the scale to bind onto.double
getShadowBlur()
Returns the amount of blur applied to shadows.int
getShadowOffsetX()
Returns the distance that shadows will be offset horizontally.int
getShadowOffsetY()
Returns the distance that shadows will be offset vertically.int
getSides()
Returns the sides of the polygon shape.TextAlign
getTextAlign()
Returns the horizontal alignment of the label text when multiple lines.Date
getValueAsDate()
Returns the data value to draw the line at.double
getValueAsDouble()
Returns the data value to draw the line at.String
getValueAsString()
Returns the data value to draw the line at.double
getXAdjust()
Returns the adjustment along x-axis (left-right) of annotation relative to above number (can be negative).Date
getXMaxAsDate()
Returns the right edge of the annotation.double
getXMaxAsDouble()
Returns the right edge of the annotation.String
getXMaxAsString()
Returns the right edge of the annotation.Date
getXMinAsDate()
Returns the left edge of the annotation, in units along the x axis.double
getXMinAsDouble()
Returns the left edge of the annotation, in units along the x axis.String
getXMinAsString()
Returns the left edge of the annotation, in units along the x axis.ScaleId
getXScaleID()
Returns the ID of the X scale to bind onto.Date
getXValueAsDate()
Returns the data X value to draw the annotation at.double
getXValueAsDouble()
Returns the data X value to draw the annotation at.String
getXValueAsString()
Returns the data X value to draw the annotation at.double
getYAdjust()
Returns the adjustment along y-axis (top-bottom) of annotation relative to above number (can be negative).Date
getYMaxAsDate()
Returns the top edge of the annotation in units along the y axis.double
getYMaxAsDouble()
Returns the top edge of the annotation in units along the y axis.String
getYMaxAsString()
Returns the top edge of the annotation in units along the y axis.Date
getYMinAsDate()
Returns the bottom edge of the annotation.double
getYMinAsDouble()
Returns the bottom edge of the annotation.String
getYMinAsString()
Returns the bottom edge of the annotation.ScaleId
getYScaleID()
Returns the ID of the Y scale to bind onto.Date
getYValueAsDate()
Returns the data Y value to draw the annotation at.double
getYValueAsDouble()
Returns the data Y value to draw the annotation at.String
getYValueAsString()
Returns the data Y value to draw the annotation at.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.boolean
isAdjustScaleRange()
Returnstrue
whether the scale range should be adjusted if this annotation is out of range.boolean
isAutoRotation()
Returnstrue
whether the rotation of label must calculates automatically.boolean
isCurve()
Returnstrue
if the line is set as a curve.boolean
isDisplay()
Returnstrue
whether the annotation should be displayed.void
setAutoRotation(boolean autoRotation)
Setstrue
whether the rotation of label must calculates automatically.void
setBackgroundColor(String backgroundColor)
Sets the color of the background of annotation.void
setBackgroundColor(IsColor backgroundColor)
Sets the color of the background of annotation.void
setBackgroundShadowColor(String borderShadowColor)
Sets the color of the shadow of annotation.void
setBackgroundShadowColor(IsColor backgroundColor)
Sets the color of the shadow of annotation.void
setBorderCapStyle(CapStyle borderCapStyle)
Sets how the end points of every line are drawn.void
setBorderColor(String borderColor)
Sets the color of the border of annotation.void
setBorderColor(IsColor borderColor)
Sets the color of the border of annotation.void
setBorderDash(int... borderDash)
Sets the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.void
setBorderDashOffset(double borderDashOffset)
Sets the line dash pattern offset.void
setBorderJoinStyle(JoinStyle borderJoinStyle)
Sets how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).void
setBorderRadius(int radius)
Sets the border radius.void
setBorderRadius(BarBorderRadius borderRadius)
Sets the border radius (in pixels).void
setBorderShadowColor(String borderShadowColor)
Sets the color of the border shadow of annotation.void
setBorderShadowColor(IsColor borderColor)
Sets the color of the border shadow of annotation.void
setBorderWidth(int borderWidth)
Sets the width of the border in pixels.void
setColor(String... fontColor)
Sets the color of text as string.void
setColor(IsColor... fontColor)
Sets the color of text.void
setContent(String... content)
Sets the text to display in label.
Provide an array to display values on a new line.void
setContent(List<String> content)
Sets the text to display in label.
Provide a list to display values on a new line.void
setContent(Canvas content)
Sets the canvas to display in label.void
setContent(Img content)
Sets the image to display in label.void
setControlPoint(double cp)
Sets the control point to drawn the curve, calculated in pixels.void
setControlPoint(String cp)
Sets the control point to drawn the curve, calculated in percentage format 'number%' which are representing the percentage of the distance between the start and end point from the center.void
setControlPoint(ControlPoint cp)
Sets the control point to drawn the curve, calculated in pixels.
It can be set by a string in percentage format 'number%' which are representing the percentage of the distance between the start and end point from the center.void
setControlPointAsPercentage(double cp)
Sets the control point to drawn the curve, calculated in percentage.void
setCurve(boolean curve)
Setstrue
if the line is set as a curve.void
setDisplay(boolean display)
Setstrue
whether the annotation should be displayed.void
setDrawTime(DrawTime drawTime)
Sets the draw time which defines when the annotations are drawn.void
setImageHeight(int height)
Sets the height of label content, when is set asImg
, in pixels in order to scale the image when drawn.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.void
setImageOpacity(double opacity)
Overrides the opacity of the image or canvas element.void
setImageWidth(int width)
Sets the width of label content, when is set asImg
, in pixels in order to scale the image when drawn.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.void
setPointStyle(Canvas pointStyle)
Sets the style of the point as canvas.void
setPointStyle(Img pointStyle)
Sets the style of the point as image.void
setPointStyle(PointStyle pointStyle)
Sets the style of the point.void
setPosition(LabelPosition position)
Sets the anchor position of label on line.void
setPositionAsPercentage(double percentage)
Sets the position of label on line by the percentage (value between 0 and 1) of the line dimension.void
setRadius(double radius)
Sets the radius of the annotation shape.
If set to 0, the annotation is not rendered.void
setRotation(double rotation)
Sets the rotation of annotation in degrees.void
setShadowBlur(double shadowBlur)
Sets the amount of blur applied to shadows.void
setShadowOffsetX(int shadowOffset)
Sets the distance that shadows will be offset horizontally.void
setShadowOffsetY(int shadowOffset)
Sets the distance that shadows will be offset vertically.void
setSides(int sides)
Sets the sides of the polygon shape.void
setTextAlign(TextAlign align)
Sets the horizontal alignment of the label text when multiple lines.void
setXAdjust(double xAdjust)
Sets the adjustment along x-axis (left-right) of annotation relative to above number (can be negative).void
setYAdjust(double yAdjust)
Sets the adjustment along y-axis (top-bottom) of annotation 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.-
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, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkAndGetColor, 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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Method Detail
-
getCallout
public CalloutElement getCallout()
Returns the callout options of the element.- Returns:
- the callout options of the element
-
getArrowHeads
public ArrowHeadsElement getArrowHeads()
Returns the arrow heads options of the element.- Returns:
- the arrow heads options of the element
-
setDisplay
public void setDisplay(boolean display)
Setstrue
whether the annotation should be displayed.- Parameters:
display
-true
whether the annotation should be displayed
-
isDisplay
public boolean isDisplay()
Returnstrue
whether the annotation should be displayed.- Returns:
true
whether the annotation should be displayed
-
isAdjustScaleRange
public boolean isAdjustScaleRange()
Returnstrue
whether the scale range should be adjusted if this annotation is out of range.- Returns:
true
whether the scale range should be adjusted if this annotation is out of range
-
getXScaleID
public ScaleId getXScaleID()
Returns the ID of the X scale to bind onto.- Returns:
- the ID of the X scale to bind onto
-
getXMaxAsString
public String getXMaxAsString()
Returns the right edge of the annotation.- Returns:
- the right edge of the annotation
-
getXMaxAsDouble
public double getXMaxAsDouble()
Returns the right edge of the annotation.- Returns:
- the right edge of the annotation
-
getXMaxAsDate
public Date getXMaxAsDate()
Returns the right edge of the annotation.- Returns:
- the right edge of the annotation
-
getXMinAsString
public String getXMinAsString()
Returns the left edge of the annotation, in units along the x axis.- Returns:
- the left edge of the annotation
-
getXMinAsDouble
public double getXMinAsDouble()
Returns the left edge of the annotation, in units along the x axis.- Returns:
- the left edge of the annotation
-
getXMinAsDate
public Date getXMinAsDate()
Returns the left edge of the annotation, in units along the x axis.- Returns:
- the left edge of the annotation
-
getYScaleID
public ScaleId getYScaleID()
Returns the ID of the Y scale to bind onto.- Returns:
- the ID of the Y scale to bind onto
-
getYMaxAsString
public String getYMaxAsString()
Returns the top edge of the annotation in units along the y axis.- Returns:
- the top edge of the annotation in units along the y axis
-
getYMaxAsDouble
public double getYMaxAsDouble()
Returns the top edge of the annotation in units along the y axis.- Returns:
- the top edge of the annotation in units along the y axis
-
getYMaxAsDate
public Date getYMaxAsDate()
Returns the top edge of the annotation in units along the y axis.- Returns:
- the top edge of the annotation in units along the y axis
-
getYMinAsString
public String getYMinAsString()
Returns the bottom edge of the annotation.- Returns:
- the bottom edge of the annotation
-
getYMinAsDouble
public double getYMinAsDouble()
Returns the bottom edge of the annotation.- Returns:
- the bottom edge of the annotation
-
getYMinAsDate
public Date getYMinAsDate()
Returns the bottom edge of the annotation.- Returns:
- the bottom edge of the annotation
-
getXValueAsString
public String getXValueAsString()
Returns the data X value to draw the annotation at.- Returns:
- the data X value to draw the annotation at
-
getXValueAsDouble
public double getXValueAsDouble()
Returns the data X value to draw the annotation at.- Returns:
- the data X value to draw the annotation at
-
getXValueAsDate
public Date getXValueAsDate()
Returns the data X value to draw the annotation at.- Returns:
- the data X value to draw the annotation at
-
getYValueAsString
public String getYValueAsString()
Returns the data Y value to draw the annotation at.- Returns:
- the data Y value to draw the annotation at
-
getYValueAsDouble
public double getYValueAsDouble()
Returns the data Y value to draw the annotation at.- Returns:
- the data Y value to draw the annotation at
-
getYValueAsDate
public Date getYValueAsDate()
Returns the data Y value to draw the annotation at.- Returns:
- the data Y value to draw the annotation at
-
getScaleID
public ScaleId getScaleID()
Returns the ID of the scale to bind onto.- Returns:
- the ID of the scale to bind onto
-
getValueAsString
public String getValueAsString()
Returns the data value to draw the line at.- Returns:
- the data value to draw the line at
-
getValueAsDouble
public double getValueAsDouble()
Returns the data value to draw the line at.- Returns:
- the data value to draw the line at
-
getValueAsDate
public Date getValueAsDate()
Returns the data value to draw the line at.- Returns:
- the data value to draw the line at
-
getEndValueAsString
public String getEndValueAsString()
Returns the data value at which the line draw should end.- Returns:
- the data value at which the line draw should end
-
getEndValueAsDouble
public double getEndValueAsDouble()
Returns the data value at which the line draw should end.- Returns:
- the data value at which the line draw should end
-
getEndValueAsDate
public Date getEndValueAsDate()
Returns the data value at which the line draw should end.- Returns:
- the data value at which the line draw should end
-
setRadius
public void setRadius(double radius)
Sets the radius of the annotation shape.
If set to 0, the annotation is not rendered.- Parameters:
radius
- array of the radius of the point shape.
-
getRadius
public double getRadius()
Returns the radius of the annotation.- Returns:
- the radius of the annotation.
-
setPointStyle
public void setPointStyle(PointStyle pointStyle)
Sets the style of the point.- Parameters:
pointStyle
- array of the style of the point.
-
setPointStyle
public void setPointStyle(Canvas pointStyle)
Sets the style of the point as canvas.- Parameters:
pointStyle
- canvas element of the style of the point as canvas.
-
setPointStyle
public void setPointStyle(Img pointStyle)
Sets the style of the point as image.- Parameters:
pointStyle
- image element of the style of the point as image.
-
getPointStyleType
public PointStyleType getPointStyleType()
Returns the type of point style.- Returns:
- the type of point style
-
getPointStyle
public PointStyle getPointStyle()
Returns the style of the point.- Returns:
- the style of the point or
null
if point style is set as image
-
getPointStyleAsCanvas
public Canvas getPointStyleAsCanvas()
Returns the style of the point as canvas.
If property is missing or not an canvas, returnsnull
.- Returns:
- canvas of the style of the point as canvas.
If property is missing or not a canvas, returnsnull
.
-
getPointStyleAsImage
public Img getPointStyleAsImage()
Returns the style of the point as image.
If property is missing or not an image, returnsnull
.- Returns:
- image of the style of the point as image.
If property is missing or not a image, returnsnull
.
-
setSides
public void setSides(int sides)
Sets the sides of the polygon shape.- Parameters:
sides
- the sides of the polygon shape
-
getSides
public int getSides()
Returns the sides of the polygon shape.- Returns:
- the sides of the polygon shape.
-
setAutoRotation
public void setAutoRotation(boolean autoRotation)
Setstrue
whether the rotation of label must calculates automatically.- Parameters:
autoRotation
-true
whether the rotation of label must calculates automatically
-
isAutoRotation
public boolean isAutoRotation()
Returnstrue
whether the rotation of label must calculates automatically.- Returns:
true
whether the rotation of label must calculates automatically
-
setPosition
public void setPosition(LabelPosition position)
Sets the anchor position of label on line.- Parameters:
position
- the anchor position of label on line
-
getPosition
public LabelPosition getPosition()
Returns the anchor position of label on line.- Returns:
- the anchor position of label on line
-
setPositionAsPercentage
public void setPositionAsPercentage(double percentage)
Sets the position of label on line by the percentage (value between 0 and 1) of the line dimension.- Parameters:
percentage
- the position of label on line by the percentage (value between 0 and 1) of the line dimension
-
getPositionAsPercentage
public double getPositionAsPercentage()
Returns the position of label on line by the percentage (value between 0 and 1) of the line dimension.- Returns:
- the position of label on line by the percentage (value between 0 and 1) of the line dimension
-
setCurve
public void setCurve(boolean curve)
Setstrue
if the line is set as a curve.- Parameters:
curve
-true
if the line is set as a curve.
-
isCurve
public boolean isCurve()
Returnstrue
if the line is set as a curve.- Returns:
true
if the line is set as a curve
-
setControlPoint
public void setControlPoint(double cp)
Sets the control point to drawn the curve, calculated in pixels.- Parameters:
cp
- the control point to drawn the curve.
-
setControlPointAsPercentage
public void setControlPointAsPercentage(double cp)
Sets the control point to drawn the curve, calculated in percentage.- Parameters:
cp
- the control point to drawn the curve.
-
setControlPoint
public void setControlPoint(String cp)
Sets the control point to drawn the curve, calculated in percentage format 'number%' which are representing the percentage of the distance between the start and end point from the center.- Parameters:
cp
- the control point to drawn the curve.
-
setControlPoint
public void setControlPoint(ControlPoint cp)
Sets the control point to drawn the curve, calculated in pixels.
It can be set by a string in percentage format 'number%' which are representing the percentage of the distance between the start and end point from the center.- Parameters:
cp
- the control point to drawn the curve.
-
getControlPoint
public ControlPointElement getControlPoint()
Returns the control point to drawn the curve, calculated in pixels.
It can be set by a string in percentage format 'number%' which are representing the percentage of the distance between the start and end point from the center.- Returns:
- the control point to drawn the curve
-
getFont
public final IsFont getFont()
Returns the font element.- Returns:
- the font element.
-
getPadding
public final IsPadding getPadding()
Returns the padding element.- Returns:
- the padding element.
-
getAlignPosition
public final AlignPositionElement getAlignPosition()
Returns the anchor position of label on line.- Returns:
- the anchor position of label on line
-
setBorderColor
public final void setBorderColor(IsColor borderColor)
Sets the color of the border of annotation.- Parameters:
borderColor
- the color of the border of annotation
-
setBorderColor
public final void setBorderColor(String borderColor)
Sets the color of the border of annotation.- Parameters:
borderColor
- the color of the border of annotation
-
getBorderColorAsString
public final String getBorderColorAsString()
Returns the color of the border of annotation.- Returns:
- the color of the border of annotation
-
getBorderColor
public final IsColor getBorderColor()
Returns the color of the border of annotation.- Returns:
- the color of the border of annotation
-
setBorderWidth
public final void setBorderWidth(int borderWidth)
Sets the width of the border in pixels.- Parameters:
borderWidth
- the width of the border in pixels.
-
getBorderWidth
public final int getBorderWidth()
Returns the width of the border in pixels.- Returns:
- the width of the border in pixels.
-
setBorderDash
public final void setBorderDash(int... borderDash)
Sets the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.- Parameters:
borderDash
- the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
-
getBorderDash
public final List<Integer> getBorderDash()
Returns the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.- Returns:
- the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
-
setBorderDashOffset
public final void setBorderDashOffset(double borderDashOffset)
Sets the line dash pattern offset.- Parameters:
borderDashOffset
- the line dash pattern offset.
-
getBorderDashOffset
public final double getBorderDashOffset()
Returns the line dash pattern offset.- Returns:
- the line dash pattern offset.
-
setBorderShadowColor
public final void setBorderShadowColor(IsColor borderColor)
Sets the color of the border shadow of annotation.- Parameters:
borderColor
- the color of the border shadow of annotation
-
setBorderShadowColor
public final void setBorderShadowColor(String borderShadowColor)
Sets the color of the border shadow of annotation.- Parameters:
borderShadowColor
- the border shadow of the border of annotation
-
getBorderShadowColorAsString
public final String getBorderShadowColorAsString()
Returns the color of the border shadow of annotation.- Returns:
- the color of the border shadow of annotation
-
setShadowBlur
public final void setShadowBlur(double shadowBlur)
Sets the amount of blur applied to shadows.- Parameters:
shadowBlur
- the amount of blur applied to shadows
-
getShadowBlur
public final double getShadowBlur()
Returns the amount of blur applied to shadows.- Returns:
- the amount of blur applied to shadows
-
setShadowOffsetX
public final void setShadowOffsetX(int shadowOffset)
Sets the distance that shadows will be offset horizontally.- Parameters:
shadowOffset
- the distance that shadows will be offset horizontally.
-
getShadowOffsetX
public final int getShadowOffsetX()
Returns the distance that shadows will be offset horizontally.- Returns:
- the distance that shadows will be offset horizontally.
-
setShadowOffsetY
public final void setShadowOffsetY(int shadowOffset)
Sets the distance that shadows will be offset vertically.- Parameters:
shadowOffset
- the distance that shadows will be offset vertically.
-
getShadowOffsetY
public final int getShadowOffsetY()
Returns the distance that shadows will be offset vertically.- Returns:
- the distance that shadows will be offset vertically.
-
setBackgroundColor
public final void setBackgroundColor(IsColor backgroundColor)
Sets the color of the background of annotation.- Parameters:
backgroundColor
- the color of the background of annotation
-
setBackgroundColor
public final void setBackgroundColor(String backgroundColor)
Sets the color of the background of annotation.- Parameters:
backgroundColor
- the color of the background of annotation
-
getBackgroundColorAsString
public final String getBackgroundColorAsString()
Returns the color of the background of annotation.- Returns:
- the color of the background of annotation
-
getBackgroundColor
public final IsColor getBackgroundColor()
Returns the color of the background of annotation.- Returns:
- the color of the background of annotation
-
setBorderRadius
public final void setBorderRadius(int radius)
Sets the border radius.- Parameters:
radius
- the border radius.
-
setBorderRadius
public final void setBorderRadius(BarBorderRadius borderRadius)
Sets the border radius (in pixels).- Parameters:
borderRadius
- the border radius (in pixels).
-
getBorderRadius
public final int getBorderRadius()
Returns the border radius (in pixels).- Returns:
- the border radius (in pixels).
-
getBorderRadiusAsObject
public final BarBorderRadius getBorderRadiusAsObject()
Returns the border radius (in pixels).- Returns:
- the border radius (in pixels).
-
setBorderCapStyle
public final void setBorderCapStyle(CapStyle borderCapStyle)
Sets how the end points of every line are drawn.- Parameters:
borderCapStyle
- how the end points of every line are drawn.
-
getBorderCapStyle
public final CapStyle getBorderCapStyle()
Returns how the end points of every line are drawn.- Returns:
- how the end points of every line are drawn.
-
setBorderJoinStyle
public final void setBorderJoinStyle(JoinStyle borderJoinStyle)
Sets how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).- Parameters:
borderJoinStyle
- how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together
-
getBorderJoinStyle
public final JoinStyle getBorderJoinStyle()
Returns how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).- Returns:
- how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together
-
setBackgroundShadowColor
public final void setBackgroundShadowColor(IsColor backgroundColor)
Sets the color of the shadow of annotation.- Parameters:
backgroundColor
- the color of the shadow of annotation
-
setBackgroundShadowColor
public final void setBackgroundShadowColor(String borderShadowColor)
Sets the color of the shadow of annotation.- Parameters:
borderShadowColor
- the shadow of the border of annotation
-
getBackgroundShadowColorAsString
public final String getBackgroundShadowColorAsString()
Returns the color of the shadow of annotation.- Returns:
- the color of the shadow of annotation
-
getBackgroundShadowColor
public final IsColor getBackgroundShadowColor()
Returns the color of the shadow of annotation.- Returns:
- the color of the shadow of annotation
-
setColor
public final void setColor(String... fontColor)
Sets the color of text as string.- Parameters:
fontColor
- the color of text
-
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
-
setColor
public final void setColor(IsColor... fontColor)
Sets the color of text.- Parameters:
fontColor
- the color of text
-
getColorAsString
public final List<String> getColorAsString()
Returns the color of text as string.- Returns:
- the color of text
-
getColor
public final List<IsColor> getColor()
Returns the color of text.- Returns:
- the color of text
-
setContent
public final 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 final 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 final void setContent(Img content)
Sets the image to display in label.- Parameters:
content
- the image to display in label
-
setContent
public final void setContent(Canvas content)
Sets the canvas to display in label.- Parameters:
content
- the canvas to display in label
-
getContent
public final List<String> getContent()
Returns the text to display in label as list.- Returns:
- the text to display in label as list
-
getContentAsImage
public final Img getContentAsImage()
Returns the text to display in label asImg
.- Returns:
- the text to display in label as
Img
-
getContentAsCanvas
public final Canvas getContentAsCanvas()
Returns the text to display in label asCanvas
.- Returns:
- the text to display in label as
Canvas
-
setImageHeight
public final 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 final 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 final 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 final 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 final 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 final 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 final 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 final 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
-
setImageOpacity
public final void setImageOpacity(double opacity)
Overrides the opacity of the image or canvas element. Could be set a number in the range 0.0 to 1.0, inclusive.
If undefined, uses the opacity of the image or canvas element.
It is used only when the content is an image or canvas element.- Parameters:
opacity
- the opacity of the image or canvas element. Could be set a number in the range 0.0 to 1.0, inclusive
-
getImageOpacity
public final double getImageOpacity()
Overrides the opacity of the image or canvas element. Could be set a number in the range 0.0 to 1.0, inclusive.
If undefined, uses the opacity of the image or canvas element.
It is used only when the content is an image or canvas element.- Returns:
- the opacity of the image or canvas element. Could be set a number in the range 0.0 to 1.0, inclusive
-
setRotation
public final void setRotation(double rotation)
Sets the rotation of annotation in degrees.- Parameters:
rotation
- the rotation of annotation in degrees
-
getRotation
public final double getRotation()
Returns the rotation of annotation in degrees.- Returns:
- the rotation of annotation in degrees
-
setTextAlign
public final 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 final TextAlign getTextAlign()
Returns the horizontal alignment of the label text when multiple lines.- Returns:
- the horizontal alignment of the label text when multiple lines
-
setYAdjust
public final void setYAdjust(double yAdjust)
Sets the adjustment along y-axis (top-bottom) of annotation relative to above number (can be negative).- Parameters:
yAdjust
- the adjustment along y-axis (top-bottom) of annotation
-
getYAdjust
public final double getYAdjust()
Returns the adjustment along y-axis (top-bottom) of annotation relative to above number (can be negative).- Returns:
- the adjustment along y-axis (top-bottom) of annotation
-
setXAdjust
public final void setXAdjust(double xAdjust)
Sets the adjustment along x-axis (left-right) of annotation relative to above number (can be negative).- Parameters:
xAdjust
- the adjustment along x-axis (left-right) of annotation
-
getXAdjust
public final double getXAdjust()
Returns the adjustment along x-axis (left-right) of annotation relative to above number (can be negative).- Returns:
- the adjustment along x-axis (left-right) of annotation
-
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.
-
-