Class NoteAnnotation

  • All Implemented Interfaces:

    
    public class NoteAnnotation
    extends Annotation
                        

    Represents a note (shown as an icon) on the page.

    • Constructor Detail

      • NoteAnnotation

        NoteAnnotation(int pageIndex, RectF annotationRect, String contents, String iconName)
        Creates a new note annotation
        Parameters:
        pageIndex - Page to which this annotation will be attached to.
        annotationRect - Rectangle in page coordinates of the note position on the page.
        contents - Text contents of the note.
        iconName - Icon name of the note, may be null.
      • NoteAnnotation

        NoteAnnotation(AnnotationPropertyManager properties, boolean markDirty)
        Intended for internal usage only.
    • Method Detail

      • getType

        @NonNull() AnnotationType getType()

        Gets the annotation type of the annotation.

        Returns:

        The type of the annotation. Makes down casting easier.

      • isResizable

         boolean isResizable()

        Always returns false, since note annotations are not resizable.

        Returns:

        false

      • updateTransformationProperties

         void updateTransformationProperties(@NonNull() RectF newBoundingBox, @NonNull() RectF oldBoundingBox)

        Annotations may override this method to transform their properties (i.e. points, rects, sizes) whenever the bounding box of the annotation changed.

        Parameters:
        newBoundingBox - New bounding box of the annotation (in PDF points).
        oldBoundingBox - Old bounding box of the annotation (in PDF points).
      • getIconName

        @NonNull() String getIconName()

        Returns the name of the icon that should be displayed for this annotation.

        Returns:

        Icon name, NOTE by default.

      • isOpen

         boolean isOpen()

        Checks if the popup of this annotation is opened.

        Returns:

        true if annotation popup is displayed, false otherwise.