Package 

Class Annotation.TextDisplayInfo

  • All Implemented Interfaces:

    
    public final class Annotation.TextDisplayInfo
    
                        

    This class is used to set textual display information. It also includes offsets to control where the text will be displayed in relation to the annotation

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final String text
      private final Integer offsetX
      private final Integer offsetY
      private Float textSize
      private Integer textColor
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String getText()
      final Integer getOffsetX() Get the horizontal offset of text
      final Integer getOffsetY() Get the vertical offset of text
      final Float getTextSize() to set the size of the text in relation to annotation
      final Unit setTextSize(Float textSize) to set the size of the text in relation to annotation
      final Integer getTextColor() to set the color of the text in relation to annotation
      final Unit setTextColor(Integer textColor) to set the color of the text in relation to annotation
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Annotation.TextDisplayInfo

        Annotation.TextDisplayInfo(String text, Integer offsetX, Integer offsetY)
        Parameters:
        text - the text to be displayed with the annotation
        offsetX - the horizontal offset of the text in relation to the annotation, the unit is px.
        offsetY - the vertical offset of the text in relation to the annotation, the unit is px.
      • Annotation.TextDisplayInfo

        Annotation.TextDisplayInfo(String text)
    • Method Detail

      • getOffsetX

         final Integer getOffsetX()

        Get the horizontal offset of text

      • getOffsetY

         final Integer getOffsetY()

        Get the vertical offset of text

      • getTextSize

         final Float getTextSize()

        to set the size of the text in relation to annotation

      • setTextSize

         final Unit setTextSize(Float textSize)

        to set the size of the text in relation to annotation

        Parameters:
        textSize - the size of the text in relation to annotation, value range 0.0pt, 32.
      • getTextColor

        @ColorInt() final Integer getTextColor()

        to set the color of the text in relation to annotation

      • setTextColor

         final Unit setTextColor(Integer textColor)

        to set the color of the text in relation to annotation

        Parameters:
        textColor - the color of the text.