public class

AnnotationClipboardHelper

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.utils.AnnotationClipboardHelper

Class Overview

Helper class for annotation copy/paste

Summary

Nested Classes
interface AnnotationClipboardHelper.OnClipboardTaskListener Callback interface to be invoked when clipboard copy/paste task is finished. 
Public Constructors
AnnotationClipboardHelper()
Public Methods
static void clearClipboard()
Removes any annotation existing on the clipboard.
static void copyAnnot(Context context, ArrayList<Annot> annots, PDFViewCtrl pdfViewCopyFrom, AnnotationClipboardHelper.OnClipboardTaskListener listener)
Copies an annotation to the clipboard.
static void copyAnnot(Context context, Annot annot, PDFViewCtrl pdfViewCopyFrom, AnnotationClipboardHelper.OnClipboardTaskListener listener)
Copies an annotation to the clipboard.
static boolean isAnnotCopied()
static boolean isItemCopied(Context context)
static void pasteAnnot(Context context, PDFViewCtrl pdfViewPasteTo, int pageNo, PointF target, AnnotationClipboardHelper.OnClipboardTaskListener listener)
Paste the annotation from the clipboard.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AnnotationClipboardHelper ()

Public Methods

public static void clearClipboard ()

Removes any annotation existing on the clipboard.

public static void copyAnnot (Context context, ArrayList<Annot> annots, PDFViewCtrl pdfViewCopyFrom, AnnotationClipboardHelper.OnClipboardTaskListener listener)

Copies an annotation to the clipboard.

Parameters
context The context
annots The list of annotations to be copied
pdfViewCopyFrom The PDFViewCtrl containing the annotation
listener The listener to be called when the task is finished

public static void copyAnnot (Context context, Annot annot, PDFViewCtrl pdfViewCopyFrom, AnnotationClipboardHelper.OnClipboardTaskListener listener)

Copies an annotation to the clipboard.

Parameters
context The context
annot The annotation to be copied
pdfViewCopyFrom The PDFViewCtrl containing the annotation
listener The listener to be called when the task is finished

public static boolean isAnnotCopied ()

Returns
  • True if there is annotation in clipboard.

public static boolean isItemCopied (Context context)

public static void pasteAnnot (Context context, PDFViewCtrl pdfViewPasteTo, int pageNo, PointF target, AnnotationClipboardHelper.OnClipboardTaskListener listener)

Paste the annotation from the clipboard.

Parameters
context The context
pdfViewPasteTo The PDFViewCtrl to which the annotation should be pasted
pageNo The destination page number
target The destination location
listener The listener to be called when the task is finished