Class AbstractAnnotation

    • Field Detail

      • DEFAULT_DISPLAY

        public static final boolean DEFAULT_DISPLAY
        Default annotation display, true.
        See Also:
        Constant Field Values
      • DEFAULT_ADJUST_SCALE_RANGE

        public static final boolean DEFAULT_ADJUST_SCALE_RANGE
        Default annotation adjust scale range, true.
        See Also:
        Constant Field Values
    • Method Detail

      • getId

        public final AnnotationId getId()
        Returns the id of annotation.
        Returns:
        the id of annotation
      • getType

        public final AnnotationType getType()
        Returns the type of annotation.
        Returns:
        the type of annotation
      • setDisplay

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

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

        public final void setAdjustScaleRange​(boolean display)
        Sets true whether the scale range should be adjusted if this annotation is out of range.
        Parameters:
        display - true whether the scale range should be adjusted if this annotation is out of range
      • isAdjustScaleRange

        public final 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
      • 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
      • 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
      • 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.
      • 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.
      • getDrawTimeCallback

        public final DrawTimeCallback getDrawTimeCallback()
        Returns the callback called to set the draw time which defines when the annotations are drawn.
        Returns:
        the callback called to set the draw time which defines when the annotations are drawn
      • setDrawTime

        public final void setDrawTime​(DrawTimeCallback drawTimeCallback)
        Sets the callback to set the draw time which defines when the annotations are drawn.
        Parameters:
        drawTimeCallback - to set the draw time which defines when the annotations are drawn
      • setDrawTime

        public final void setDrawTime​(NativeCallback drawTimeCallback)
        Sets the callback to set the draw time which defines when the annotations are drawn.
        Parameters:
        drawTimeCallback - to set the draw time which defines when the annotations are drawn
      • getDisplayCallback

        public final DisplayCallback<AnnotationContext> getDisplayCallback()
        Returns the callback called to set whether the annotation should be displayed.
        Returns:
        the callback called to set whether the annotation should be displayed
      • setDisplay

        public final void setDisplay​(DisplayCallback<AnnotationContext> displayCallback)
        Sets the callback to set whether the annotation should be displayed.
        Parameters:
        displayCallback - to set whether the annotation should be displayed
      • setDisplay

        public final void setDisplay​(NativeCallback displayCallback)
        Sets the callback to set whether the annotation should be displayed.
        Parameters:
        displayCallback - to set whether the annotation should be displayed
      • getBorderColorCallback

        public final ColorCallback<AnnotationContext> getBorderColorCallback()
        Returns the callback called to set the color of the border of annotation.
        Returns:
        the callback called to set the color of the border of annotation
      • setBorderColor

        public final void setBorderColor​(ColorCallback<AnnotationContext> borderColorCallback)
        Sets the callback to set the color of the border of annotation.
        Parameters:
        borderColorCallback - to set the color of the border of annotation
      • setBorderColor

        public final void setBorderColor​(NativeCallback borderColorCallback)
        Sets the callback to set the color of the border of annotation.
        Parameters:
        borderColorCallback - to set the color of the border of annotation
      • getBorderWidthCallback

        public final WidthCallback<AnnotationContext> getBorderWidthCallback()
        Returns the callback called to set the width of the border in pixels.
        Returns:
        the callback called to set the width of the border in pixels
      • setBorderWidth

        public final void setBorderWidth​(WidthCallback<AnnotationContext> borderWidthCallback)
        Sets the callback to set the color of the width of the border in pixels.
        Parameters:
        borderWidthCallback - to set the width of the border in pixels
      • setBorderWidth

        public final void setBorderWidth​(NativeCallback borderWidthCallback)
        Sets the callback to set the color of the width of the border in pixels.
        Parameters:
        borderWidthCallback - to set the width of the border in pixels
      • getBorderDashCallback

        public final BorderDashCallback<AnnotationContext> getBorderDashCallback()
        Returns the callback called to set 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 callback called to set 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
      • setBorderDash

        public final void setBorderDash​(BorderDashCallback<AnnotationContext> borderDashCallback)
        Sets the callback to set 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:
        borderDashCallback - to set 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
      • setBorderDash

        public final void setBorderDash​(NativeCallback borderDashCallback)
        Sets the callback to set 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:
        borderDashCallback - to set 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
      • getBorderDashOffsetCallback

        public final BorderDashOffsetCallback<AnnotationContext> getBorderDashOffsetCallback()
        Returns the callback called to set the line dash pattern offset.
        Returns:
        the callback called to set the line dash pattern offset
      • setBorderDashOffset

        public final void setBorderDashOffset​(BorderDashOffsetCallback<AnnotationContext> borderDashOffsetCallback)
        Sets the callback to set the line dash pattern offset.
        Parameters:
        borderDashOffsetCallback - to set the line dash pattern offset
      • setBorderDashOffset

        public final void setBorderDashOffset​(NativeCallback borderDashOffsetCallback)
        Sets the callback to set the line dash pattern offset.
        Parameters:
        borderDashOffsetCallback - to set the line dash pattern offset
      • getAdjustScaleRangeCallback

        public final AdjustScaleRangeCallback getAdjustScaleRangeCallback()
        Returns the callback called to set whether the scale range should be adjusted if this annotation is out of range.
        Returns:
        the callback called to set whether the scale range should be adjusted if this annotation is out of range
      • setAdjustScaleRange

        public final void setAdjustScaleRange​(AdjustScaleRangeCallback adjustScaleRangeCallback)
        Sets the callback to set whether the scale range should be adjusted if this annotation is out of range.
        Parameters:
        adjustScaleRangeCallback - to set whether the scale range should be adjusted if this annotation is out of range
      • setAdjustScaleRange

        public final void setAdjustScaleRange​(NativeCallback adjustScaleRangeCallback)
        Sets the callback to set whether the scale range should be adjusted if this annotation is out of range.
        Parameters:
        adjustScaleRangeCallback - to set whether the scale range should be adjusted if this annotation is out of range
      • getEnterCallback

        public final EnterCallback getEnterCallback()
        Returns the callback called when a "enter" event is occurring.
        Returns:
        the callback called when a "enter" event is occurring
      • setEnterCallback

        public final void setEnterCallback​(EnterCallback enterCallback)
        Sets the callback called when a "enter" event is occurring.
        Parameters:
        enterCallback - the callback called when a "enter" event is occurring
      • getLeaveCallback

        public final LeaveCallback getLeaveCallback()
        Returns the callback called when a "leave" event is occurring.
        Returns:
        the callback called when a "leave" event is occurring
      • setLeaveCallback

        public final void setLeaveCallback​(LeaveCallback leaveCallback)
        Sets the callback called when a "leave" event is occurring.
        Parameters:
        leaveCallback - the callback called when a "leave" event is occurring
      • getClickCallback

        public final ClickCallback getClickCallback()
        Returns the callback called when a "click" event is occurring.
        Returns:
        the callback called when a "click" event is occurring
      • setClickCallback

        public final void setClickCallback​(ClickCallback clickCallback)
        Sets the callback called when a "click" event is occurring.
        Parameters:
        clickCallback - the callback called when a "click" event is occurring
      • getDoubleClickCallback

        public final DoubleClickCallback getDoubleClickCallback()
        Returns the callback called when a "dblclick" event is occurring.
        Returns:
        the callback called when a "dblclick" event is occurring
      • setDoubleClickCallback

        public final void setDoubleClickCallback​(DoubleClickCallback dblclickCallback)
        Sets the callback called when a "dblclick" event is occurring.
        Parameters:
        dblclickCallback - the callback called when a "dblclick" event is occurring
      • getBorderColorAsString

        public default String getBorderColorAsString()
        Returns the color of the border of annotation.
        Returns:
        the color of the border of annotation
      • getBorderWidth

        public abstract int getBorderWidth()
        Returns the width of the border in pixels.
        Returns:
        the width of the border in pixels.