Class OptionsElement

    • Method Detail

      • getLabel

        public LabelElement getLabel()
        Returns the inner label options of the element.
        Returns:
        the inner label options of the element
      • 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)
        Sets true whether the annotation should be displayed.
        Parameters:
        display - true whether the annotation should be displayed
      • isDisplay

        public boolean isDisplay()
        Returns true whether the annotation should be displayed.
        Returns:
        true whether the annotation should be displayed
      • isAdjustScaleRange

        public boolean isAdjustScaleRange()
        Returns true 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, returns null.
        Returns:
        canvas of the style of the point as canvas.
        If property is missing or not a canvas, returns null.
      • getPointStyleAsImage

        public Img getPointStyleAsImage()
        Returns the style of the point as image.
        If property is missing or not an image, returns null.
        Returns:
        image of the style of the point as image.
        If property is missing or not a image, returns null.
      • 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.
      • 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 String getColorAsString()
        Returns the color of text as string.
        Returns:
        the color of text
      • getColor

        public final 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 as Img.
        Returns:
        the text to display in label as Img
      • getContentAsCanvas

        public final Canvas getContentAsCanvas()
        Returns the text to display in label as Canvas.
        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 as Img, in pixels in order to scale the image when drawn.
        Parameters:
        height - the height of label content, when is set as Img, 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 as Img, in percentage (format is "{n}%") in order to scale the image when drawn.
        Parameters:
        heightPercentage - the height of label content, when is set as Img, 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 as Img, 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 as Img, 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 as Img, in pixels in order to scale the image when drawn.
        Parameters:
        width - the height of label content, when is set as Img, 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 as Img, in percentage (format is "{n}%") in order to scale the image when drawn.
        Parameters:
        widthPercentage - the height of label content, when is set as Img, 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 as Img, 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 as Img, 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
      • 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