public class

NoteAnnotation

extends Annotation
java.lang.Object
   ↳ com.pspdfkit.annotations.Annotation
     ↳ com.pspdfkit.annotations.NoteAnnotation

Class Overview

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

Summary

Nested Classes
@interface NoteAnnotation.IconName Denotes that a parameter must belong to on of these strings defined in NoteAnnotation: COMMENT, RIGHT_POINTER, RIGHT_ARROW, CHECK, CIRCLE, CROSS, INSERT, NEW_PARAGRAPH, NOTE, PARAGRAPH, HELP, STAR, KEY
Constants
String CHECK
String CIRCLE
String COMMENT
String CROSS
String HELP
String INSERT
String KEY
String NEW_PARAGRAPH
String NOTE
String PARAGRAPH
String RIGHT_ARROW
String RIGHT_POINTER
String STAR
[Expand]
Inherited Constants
From class com.pspdfkit.annotations.Annotation
[Expand]
Inherited Fields
From class com.pspdfkit.annotations.Annotation
Public Constructors
NoteAnnotation(int pageIndex, RectF annotationRect, String contents, String iconName)
Creates a new note annotation
Public Methods
String getIconName()
Returns the name of the icon that should be displayed for this annotation.
AnnotationType getType()
Gets the annotation type of the annotation.
boolean isOpen()
Checks if the popup of this annotation is opened.
boolean isResizable()
Always returns false, since note annotations are not resizable.
void setIconName(String iconName)
Sets the name of the icon that should be displayed for this annotation.
void updateTransformationProperties(RectF newBoundingBox, RectF oldBoundingBox)
Annotations may override this method to transform their properties (i.e.
[Expand]
Inherited Methods
From class com.pspdfkit.annotations.Annotation
From class java.lang.Object

Constants

public static final String CHECK

Constant Value: "Check"

public static final String CIRCLE

Constant Value: "Circle"

public static final String COMMENT

Constant Value: "Comment"

public static final String CROSS

Constant Value: "Cross"

public static final String HELP

Constant Value: "Help"

public static final String INSERT

Constant Value: "Insert"

public static final String KEY

Constant Value: "Key"

public static final String NEW_PARAGRAPH

Constant Value: "NewParagraph"

public static final String NOTE

Constant Value: "Note"

public static final String PARAGRAPH

Constant Value: "Paragraph"

public static final String RIGHT_ARROW

Constant Value: "RightArrow"

public static final String RIGHT_POINTER

Constant Value: "RightPointer"

public static final String STAR

Constant Value: "Star"

Public Constructors

public 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.

Public Methods

public String getIconName ()

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

Returns
  • Icon name, NOTE by default.

public AnnotationType getType ()

Gets the annotation type of the annotation.

Returns
  • The type of the annotation. Makes down casting easier.

public boolean isOpen ()

Checks if the popup of this annotation is opened.

Returns
  • true if annotation popup is displayed, false otherwise.

public boolean isResizable ()

Always returns false, since note annotations are not resizable.

Returns
  • false

public void setIconName (String iconName)

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

Parameters
iconName Icon name to be set.

public void updateTransformationProperties (RectF newBoundingBox, 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).