Class CalloutElement

    • Method Detail

      • setDisplay

        public void setDisplay​(boolean display)
        Sets true whether the label should be displayed.
        Parameters:
        display - true whether the label should be displayed
      • isDisplay

        public boolean isDisplay()
        Returns true whether the label should be displayed.
        Returns:
        true whether the label should be displayed
      • setMargin

        public void setMargin​(int margin)
        Sets the amount of pixels between the label and the callout separator.
        Parameters:
        margin - the amount of pixels between the label and the callout separator
      • getMargin

        public int getMargin()
        Returns the amount of pixels between the label and the callout separator.
        Returns:
        the amount of pixels between the label and the callout separator.
      • setSide

        public void setSide​(int side)
        Sets the width of the starter line of callout pointer.
        Parameters:
        side - the width of the starter line of callout pointer
      • getSide

        public int getSide()
        Returns the width of the starter line of callout pointer.
        Returns:
        the width of the starter line of callout pointer
      • setStart

        public void setStart​(int start)
        Sets the separator dimension in pixels to use as starting point for callout pointer.
        Parameters:
        start - the separator dimension in pixels to use as starting point for callout pointer
      • getStart

        public int getStart()
        Returns the separator dimension in pixels to use as starting point for callout pointer.
        Returns:
        the separator dimension in pixels to use as starting point for callout pointer
      • setStartAsPercentage

        public void setStartAsPercentage​(double start)
        Sets the percentage of the separator dimension to use as starting point for callout pointer.
        Parameters:
        start - the percentage of the separator dimension to use as starting point for callout pointer
      • getStartAsPercentage

        public double getStartAsPercentage()
        Returns the percentage of the separator dimension to use as starting point for callout pointer.
        Returns:
        the percentage of the separator dimension to use as starting point for callout pointer
      • setPosition

        public void setPosition​(CalloutPosition position)
        Sets the position of callout, with respect to the label.
        Parameters:
        position - the position of callout, with respect to the label
      • getPosition

        public CalloutPosition getPosition()
        Returns the position of callout, with respect to the label.
        Returns:
        the position of callout, with respect to the label.
      • 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
      • 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.