public class

LinkAnnotation

extends Annotation
java.lang.Object
   ↳ com.pspdfkit.annotations.Annotation
     ↳ com.pspdfkit.annotations.LinkAnnotation
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Link type of annotation either carrying an URI or a page destination.

Summary

[Expand]
Inherited Constants
From class com.pspdfkit.annotations.Annotation
[Expand]
Inherited Fields
From class com.pspdfkit.annotations.Annotation
Public Constructors
LinkAnnotation(int pageIndex)
Creates new link annotation.
Public Methods
Action getAction()
Returns the action set on this annotation.
AnnotationType getType()
Gets the annotation type of the annotation.
void setAction(Action action)
Sets the action to the 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

Public Constructors

public LinkAnnotation (int pageIndex)

Creates new link annotation.

Parameters
pageIndex Page index to attach the link annotation to.

Public Methods

public Action getAction ()

Returns the action set on this annotation.

Returns
  • Action to be performed once this annotation is tapped.

public AnnotationType getType ()

Gets the annotation type of the annotation.

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

public void setAction (Action action)

Sets the action to the annotation.

Parameters
action Action to be executed when the annotation is tapped, null to remove action.

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