com.foxit.uiextensions.annots.AnnotHandler Interface Reference
Inheritance diagram for com.foxit.uiextensions.annots.AnnotHandler:
com.foxit.sdk.PDFViewCtrl.IDrawEventListener

Public Member Functions

void addAnnot (int pageIndex, AnnotContent content, boolean addUndo, Event.Callback result)
 
boolean annotCanAnswer (Annot annot)
 
RectF getAnnotBBox (Annot annot)
 
int getType ()
 
boolean isHitAnnot (Annot annot, PointF point)
 
void modifyAnnot (Annot annot, AnnotContent content, boolean addUndo, Event.Callback result)
 
void onAnnotDeselected (Annot annot, boolean reRender)
 
void onAnnotSelected (Annot annot, boolean reRender)
 
boolean onLongPress (int pageIndex, MotionEvent motionEvent, Annot annot)
 
boolean onSingleTapConfirmed (int pageIndex, MotionEvent motionEvent, Annot annot)
 
boolean onTouchEvent (int pageIndex, MotionEvent motionEvent, Annot annot)
 
void removeAnnot (Annot annot, boolean addUndo, Event.Callback result)
 
boolean shouldViewCtrlDraw (Annot annot)
 
- Public Member Functions inherited from com.foxit.sdk.PDFViewCtrl.IDrawEventListener
void onDraw (int pageIndex, Canvas canvas)
 

Public Attributes

int TYPE_FORMFIELD_SIGNATURE = 102
 
int TYPE_FREETEXT_CALLOUT = 101
 
int TYPE_FREETEXT_TEXTBOX = 100
 
int TYPE_SCREEN_IMAGE = 201
 
int TYPE_SCREEN_MULTIMEDIA = 202
 

Detailed Description

Interface that defines a annotation handler that edit annotation.

Member Function Documentation

◆ addAnnot()

void com.foxit.uiextensions.annots.AnnotHandler.addAnnot ( int  pageIndex,
AnnotContent  content,
boolean  addUndo,
Event.Callback  result 
)

Add annotation to the specified page.

Parameters
pageIndexThe page where add the annotation
contenta AnnotContent to use
addUndowhether can be do redo or undo operation.
resultThe callback used to allow the user to run some code when add annotation

◆ annotCanAnswer()

boolean com.foxit.uiextensions.annots.AnnotHandler.annotCanAnswer ( Annot  annot)

Whether the specified annotation can be answered.

◆ getAnnotBBox()

RectF com.foxit.uiextensions.annots.AnnotHandler.getAnnotBBox ( Annot  annot)

Return the bbox of the specified annotation.

◆ getType()

int com.foxit.uiextensions.annots.AnnotHandler.getType ( )

Get the type of a AnnotHandler.

usually, we use annotation`s type(such as Annot#e_Note) as its type.

Specifically, using TYPE_FREETEXT_CALLOUT as the type of Callout annotation handler, TYPE_FREETEXT_TEXTBOX as the type of Textbox annotation handler and Annot#e_FreeText as the type of Typewriter annotation handler.

using TYPE_FORMFIELD_SIGNATURE as the type of signature annotation handler and Annot#e_Widget as the type of Form annotation handler.

using TYPE_SCREEN_IMAGE as the type of Image annotation handler, TYPE_SCREEN_MULTIMEDIA as the type of Multimedia annotation handler

Returns
Return the type of a AnnotHandler.

◆ isHitAnnot()

boolean com.foxit.uiextensions.annots.AnnotHandler.isHitAnnot ( Annot  annot,
PointF  point 
)

Whether hit the specified on the position.

◆ modifyAnnot()

void com.foxit.uiextensions.annots.AnnotHandler.modifyAnnot ( Annot  annot,
AnnotContent  content,
boolean  addUndo,
Event.Callback  result 
)

Modify the specified annotation by using a AnnotContent

Parameters
annotThe specified annotation which will be modified.
contenta AnnotContent to use
addUndowhether can be do redo or undo operation.
resultThe callback used to allow the user to run some code when add annotation

◆ onAnnotDeselected()

void com.foxit.uiextensions.annots.AnnotHandler.onAnnotDeselected ( Annot  annot,
boolean  reRender 
)

Called when the current selected annotation lost focus.

Parameters
annotThe current selected annotation
reRenderwhether re-render the selected annotation.

◆ onAnnotSelected()

void com.foxit.uiextensions.annots.AnnotHandler.onAnnotSelected ( Annot  annot,
boolean  reRender 
)

Called when the specified annotation is selected.

Parameters
annotThe selected annotation
reRenderwhether re-render the selected annotation.

◆ onLongPress()

boolean com.foxit.uiextensions.annots.AnnotHandler.onLongPress ( int  pageIndex,
MotionEvent  motionEvent,
Annot  annot 
)

Called when PDFViewCtrl.UIExtensionsManager#onLongPress(MotionEvent) is called.

See also
PDFViewCtrl.UIExtensionsManager::onLongPress(MotionEvent)

◆ onSingleTapConfirmed()

boolean com.foxit.uiextensions.annots.AnnotHandler.onSingleTapConfirmed ( int  pageIndex,
MotionEvent  motionEvent,
Annot  annot 
)

Called when PDFViewCtrl.UIExtensionsManager#onSingleTapConfirmed(MotionEvent) is called.

See also
PDFViewCtrl.UIExtensionsManager::onSingleTapConfirmed(MotionEvent)

◆ onTouchEvent()

boolean com.foxit.uiextensions.annots.AnnotHandler.onTouchEvent ( int  pageIndex,
MotionEvent  motionEvent,
Annot  annot 
)

Called when PDFViewCtrl.UIExtensionsManager#onTouchEvent(int, MotionEvent) is called

See also
PDFViewCtrl.UIExtensionsManager::onTouchEvent(int, MotionEvent)

◆ removeAnnot()

void com.foxit.uiextensions.annots.AnnotHandler.removeAnnot ( Annot  annot,
boolean  addUndo,
Event.Callback  result 
)

Remove the specified annotation from a page.

Parameters
annotThe specified annotation which will be removed.
addUndowhether can be do redo or undo operation.
resultThe callback used to allow the user to run some code when add annotation

◆ shouldViewCtrlDraw()

boolean com.foxit.uiextensions.annots.AnnotHandler.shouldViewCtrlDraw ( Annot  annot)

Called when PDFViewCtrl.UIExtensionsManager#shouldViewCtrlDraw(Annot) is called

See also
PDFViewCtrl.UIExtensionsManager::shouldViewCtrlDraw(Annot)

Member Data Documentation

◆ TYPE_FORMFIELD_SIGNATURE

int com.foxit.uiextensions.annots.AnnotHandler.TYPE_FORMFIELD_SIGNATURE = 102

The type of signature annotation handler

◆ TYPE_FREETEXT_CALLOUT

int com.foxit.uiextensions.annots.AnnotHandler.TYPE_FREETEXT_CALLOUT = 101

The type of callout annotation handler

◆ TYPE_FREETEXT_TEXTBOX

int com.foxit.uiextensions.annots.AnnotHandler.TYPE_FREETEXT_TEXTBOX = 100

The type of textbox annotation handler

◆ TYPE_SCREEN_IMAGE

int com.foxit.uiextensions.annots.AnnotHandler.TYPE_SCREEN_IMAGE = 201

The type of image annotation handler

◆ TYPE_SCREEN_MULTIMEDIA

int com.foxit.uiextensions.annots.AnnotHandler.TYPE_SCREEN_MULTIMEDIA = 202

The type of multimedia annotation handler