Class TextAnnotation

    • Constructor Summary

      Constructors 
      Constructor Description
      TextAnnotation()
      Instantiates a new text annotation.
      TextAnnotation​(String contents)
      Instantiates a new text annotation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getAnnotationIndex()
      Gets index of the annotation on a page.
      String getColorCode()
      Gets the color of the annotation's 'Sticky Note'.
      String getContents()
      Gets the contents of the 'sticky note' annotation.
      int getHeight()
      Gets the height of your annotation's icon and interactive area in pixels
      AnnotationIcon getIcon()
      Gets icon.
      double getOpacity()
      Gets the opacity of the annotation (valid values are from 0.0 to 1.0).
      int getPageIndex()
      Gets index of the page to add the annotation.
      String getSubject()
      Gets subject.
      String getTitle()
      Gets title.
      int getWidth()
      Gets the width of your annotation's icon and interactive area in pixels
      int getX()
      Gets the horizontal X position of the annotation on your page in pixels
      int getY()
      Gets the vertical Y position of the annotation on your page in pixels.
      boolean isHidden()
      Hides the annotation from users.
      boolean isOpenByDefault()
      The annotation to be opened and readable by default, without user interaction.
      boolean isPrintable()
      Is allows the annotation to be printed when users print the PDF.
      boolean isReadOnly()
      Sets the annotation to be read only.
      boolean isRotatable()
      Is rotateable boolean.
      void setAnnotationIndex​(int annotationIndex)
      Sets index of the annotation on a page.
      void setColorCode​(String value)
      Sets the color of the annotation's 'Sticky Note'.
      void setContents​(String value)
      Sets the contents of the 'sticky note' annotation.
      void setHeight​(int height)
      Sets the height of your annotation's icon and interactive area in pixels
      void setHidden​(boolean value)
      Hides the annotation from users.
      void setIcon​(AnnotationIcon value)
      Sets icon.
      void setOpacity​(double value)
      Sets the opacity of the annotation (valid values are from 0.0 to 1.0).
      void setOpenByDefault​(boolean value)
      Sets the annotation to be opened and readable by default, without user interaction.
      void setPageIndex​(int pageIndex)
      Sets index of the page to add the annotation.
      void setPrintable​(boolean value)
      Sets allows the annotation to be printed when users print the PDF.
      void setReadOnly​(boolean value)
      Sets the annotation to be read only.
      void setRotatable​(boolean value)
      Sets rotatable.
      void setSubject​(String value)
      Sets subject.
      void setTitle​(String value)
      Sets title.
      void setWidth​(int width)
      Sets the width of your annotation's icon and interactive area in pixels
      void setX​(int x)
      Sets the horizontal X position of the annotation on your page in pixels
      void setY​(int y)
      Sets the vertical Y position of the annotation on your page in pixels.
      String toString()
      Returns a String that represents this annotation.
    • Constructor Detail

      • TextAnnotation

        public TextAnnotation()
        Instantiates a new text annotation.
      • TextAnnotation

        public TextAnnotation​(String contents)
        Instantiates a new text annotation.
        Parameters:
        contents - the contents of the 'sticky note' annotation
    • Method Detail

      • getColorCode

        public String getColorCode()
        Gets the color of the annotation's 'Sticky Note'. Uses CSS '#ff66BB' hex color style.
        Returns:
        the color code string.
      • setColorCode

        public void setColorCode​(String value)
        Sets the color of the annotation's 'Sticky Note'. Uses CSS '#ff66BB' hex color style.
        Parameters:
        value - the color code string.
      • getContents

        public String getContents()
        Gets the contents of the 'sticky note' annotation.
        Returns:
        the contents of the 'sticky note' annotation.
      • setContents

        public void setContents​(String value)
        Sets the contents of the 'sticky note' annotation.
        Parameters:
        value - the contents text.
      • isHidden

        public boolean isHidden()
        Hides the annotation from users.
        Returns:
        the isHidden value.
      • setHidden

        public void setHidden​(boolean value)
        Hides the annotation from users.
        Parameters:
        value - the isHidden value.
      • getOpacity

        public double getOpacity()
        Gets the opacity of the annotation (valid values are from 0.0 to 1.0).
        Returns:
        the opacity of the annotation.
      • setOpacity

        public void setOpacity​(double value)
        Sets the opacity of the annotation (valid values are from 0.0 to 1.0).
        Parameters:
        value - the opacity of the annotation (valid values are from 0.0 to 1.0).
      • isOpenByDefault

        public boolean isOpenByDefault()
        The annotation to be opened and readable by default, without user interaction.
        Returns:
        the value of isOpenByDefault.
      • setOpenByDefault

        public void setOpenByDefault​(boolean value)
        Sets the annotation to be opened and readable by default, without user interaction.
        Parameters:
        value - the value of isOpenByDefault.
      • isPrintable

        public boolean isPrintable()
        Is allows the annotation to be printed when users print the PDF.
        Returns:
        the isPrintable value.
      • setPrintable

        public void setPrintable​(boolean value)
        Sets allows the annotation to be printed when users print the PDF.
        Parameters:
        value - the isPrintable value.
      • isReadOnly

        public boolean isReadOnly()
        Sets the annotation to be read only.
        Returns:
        the isReadOnly value.
      • setReadOnly

        public void setReadOnly​(boolean value)
        Sets the annotation to be read only.
        Parameters:
        value - the isReadOnly value.
      • isRotatable

        public boolean isRotatable()
        Is rotateable boolean. Allows the annotation to be rotated. E.g. when the containing page os rotated.
        Returns:
        the rotatable boolean.
      • setRotatable

        public void setRotatable​(boolean value)
        Sets rotatable. Allows the annotation to be rotated. E.g. when the containing page os rotated.
        Parameters:
        value - the rotateable value.
      • toString

        public String toString()
        Returns a String that represents this annotation.
        Overrides:
        toString in class Object
        Returns:
        A String that represents this instance.
      • getTitle

        public String getTitle()
        Gets title. The main title of the annotation as displayed in the header of the 'sticky note'.
        Returns:
        the title
      • setTitle

        public void setTitle​(String value)
        Sets title. The main title of the annotation as displayed in the header of the 'sticky note'.
        Parameters:
        value - the value
      • getSubject

        public String getSubject()
        Gets subject. The subject of the annotation as displayed in the header of the 'sticky note'.
        Returns:
        the subject.
      • setSubject

        public void setSubject​(String value)
        Sets subject. The subject of the annotation as displayed in the header of the 'sticky note'.
        Parameters:
        value - the value.
      • getIcon

        public AnnotationIcon getIcon()
        Gets icon. An icon to visually represent the 'sticky note' annotation.
        Returns:
        the icon.
      • setIcon

        public void setIcon​(AnnotationIcon value)
        Sets icon. An icon to visually represent the 'sticky note' annotation.
        Parameters:
        value - the value.
      • getHeight

        public int getHeight()
        Gets the height of your annotation's icon and interactive area in pixels
      • setHeight

        public void setHeight​(int height)
        Sets the height of your annotation's icon and interactive area in pixels
      • getWidth

        public int getWidth()
        Gets the width of your annotation's icon and interactive area in pixels
      • setWidth

        public void setWidth​(int width)
        Sets the width of your annotation's icon and interactive area in pixels
      • getY

        public int getY()
        Gets the vertical Y position of the annotation on your page in pixels. Measured from bottom upwards.
      • setY

        public void setY​(int y)
        Sets the vertical Y position of the annotation on your page in pixels. Measured from bottom upwards.
      • getX

        public int getX()
        Gets the horizontal X position of the annotation on your page in pixels
      • setX

        public void setX​(int x)
        Sets the horizontal X position of the annotation on your page in pixels
      • getPageIndex

        public int getPageIndex()
        Gets index of the page to add the annotation. The first page has a PageIndex of 0
      • setPageIndex

        public void setPageIndex​(int pageIndex)
        Sets index of the page to add the annotation. The first page has a PageIndex of 0
      • getAnnotationIndex

        public int getAnnotationIndex()
        Gets index of the annotation on a page. The first page has a annotation_index of 0
      • setAnnotationIndex

        public void setAnnotationIndex​(int annotationIndex)
        Sets index of the annotation on a page. The first page has a annotation_index of 0