com.foxit.uiextensions.UIExtensionsManager Class Reference
Inheritance diagram for com.foxit.uiextensions.UIExtensionsManager:
com.foxit.sdk.PDFViewCtrl.UIExtensionsManager com.foxit.uiextensions.IPDFReader com.foxit.sdk.PDFViewCtrl.IGestureEventListener com.foxit.sdk.PDFViewCtrl.IDoubleTapEventListener com.foxit.sdk.PDFViewCtrl.IScaleGestureEventListener com.foxit.sdk.PDFViewCtrl.IDrawEventListener

Classes

interface  ConfigurationChangedListener
 
interface  ILinkEventListener
 
class  LinkInfo
 
interface  MenuEventListener
 
interface  OnFinishListener
 
interface  ToolHandlerChangedListener
 

Public Member Functions

 UIExtensionsManager (Context context, PDFViewCtrl pdfViewCtrl)
 
 UIExtensionsManager (Context context, PDFViewCtrl pdfViewCtrl, Config config)
 
boolean backToNormalState ()
 
void backToPrevActivity ()
 
boolean canAddAnnot ()
 
boolean canModifyContents ()
 
void changeState (int state)
 
void enableBottomToolbar (boolean isEnabled)
 
void enableFormHighlight (boolean enable)
 
void enableLinkHighlight (boolean enable)
 
void enableLinks (boolean enable)
 
void enableTopToolbar (boolean isEnabled)
 
void exitPanZoomMode ()
 
AnnotHandler getAnnotHandlerByType (int type)
 
Activity getAttachedActivity ()
 
BackEventListener getBackEventListener ()
 
IBarsHandler getBarManager ()
 
Config getConfig ()
 
RelativeLayout getContentView ()
 
AnnotHandler getCurrentAnnotHandler ()
 
String getCurrentSelectedText ()
 
ToolHandler getCurrentToolHandler ()
 
DocumentManager getDocumentManager ()
 
Annot getFocusAnnot ()
 
long getFormHighlightColor ()
 
ILinkEventListener getLinkEventListener ()
 
long getLinkHighlightColor ()
 
IMainFrame getMainFrame ()
 
IMenuView getMenuView ()
 
Module getModuleByName (String name)
 
IPanelManager getPanelManager ()
 
PDFViewCtrl getPDFViewCtrl ()
 
ViewGroup getRootView ()
 
int getSaveDocFlag ()
 
String getSavePath ()
 
int getSelectionHighlightColor ()
 
IMultiLineBar getSettingBar ()
 
int getState ()
 
ToolHandler getToolHandlerByType (String type)
 
void handleActivityResult (Activity act, int requestCode, int resultCode, Intent data)
 
boolean isContinueAddAnnot ()
 
boolean isFormHighlightEnable ()
 
boolean isHiddenPanel (PanelSpec.PanelType panelType)
 
boolean isLinkHighlightEnabled ()
 
boolean isLinksEnabled ()
 
boolean isLoadAnnotModule (Annot annot)
 
void onConfigurationChanged (Activity act, Configuration newConfig)
 
void onCreate (Activity act, PDFViewCtrl pdfViewCtrl, Bundle bundle)
 
void onDestroy (Activity act)
 
boolean onDoubleTap (MotionEvent motionEvent)
 
boolean onDoubleTapEvent (MotionEvent motionEvent)
 
boolean onDown (MotionEvent motionEvent)
 
void onDraw (int pageIndex, Canvas canvas)
 
boolean onFling (MotionEvent motionEvent, MotionEvent motionEvent1, float v, float v1)
 
void onHiddenChanged (boolean hidden)
 
boolean onKeyDown (Activity act, int keyCode, KeyEvent event)
 
void onLongPress (MotionEvent motionEvent)
 
void onPause (Activity act)
 
void onResume (Activity act)
 
boolean onScale (ScaleGestureDetector scaleGestureDetector)
 
boolean onScaleBegin (ScaleGestureDetector scaleGestureDetector)
 
void onScaleEnd (ScaleGestureDetector scaleGestureDetector)
 
boolean onScroll (MotionEvent motionEvent, MotionEvent motionEvent1, float v, float v1)
 
void onShowPress (MotionEvent motionEvent)
 
boolean onSingleTapConfirmed (MotionEvent motionEvent)
 
boolean onSingleTapUp (MotionEvent motionEvent)
 
void onStart (Activity act)
 
void onStop (Activity act)
 
boolean onTouchEvent (int pageIndex, MotionEvent motionEvent)
 
void onXFAPageRemoved (boolean isSuccess, int pageIndex)
 
void onXFAPagesInserted (boolean isSuccess, int pageIndex)
 
void onXFAWidgetAdded (XFAWidget xfaWidget)
 
void onXFAWidgetWillRemove (XFAWidget xfaWidget)
 
void openDocument (String path, byte[] password)
 
void registerAnnotHandler (AnnotHandler handler)
 
void registerConfigurationChangedListener (ConfigurationChangedListener listener)
 
boolean registerLifecycleListener (ILifecycleEventListener listener)
 
void registerMenuEventListener (MenuEventListener listener)
 
void registerModule (Module module)
 
boolean registerStateChangeListener (IStateChangeListener listener)
 
void registerToolHandler (ToolHandler handler)
 
void registerToolHandlerChangedListener (ToolHandlerChangedListener listener)
 
void registerXFAPageEventListener (IXFAPageEventListener listener)
 
void registerXFAWidgetEventListener (IXFAWidgetEventListener listener)
 
void setAttachedActivity (Activity activity)
 
void setBackEventListener (BackEventListener listener)
 
void setContinueAddAnnot (boolean continueAddAnnot)
 
void setCurrentToolHandler (ToolHandler toolHandler)
 
void setFilePath (String path)
 
void setFormHighlightColor (long color)
 
void setLinkEventListener (ILinkEventListener listener)
 
void setLinkHighlightColor (long color)
 
void setOnFinishListener (OnFinishListener listener)
 
void setPanelHidden (boolean isHidden, PanelSpec.PanelType panelType)
 
void setSaveDocFlag (int flag)
 
void setSavePath (String savePath)
 
void setSelectionHighlightColor (int color)
 
boolean shouldViewCtrlDraw (Annot annot)
 
void startPrintJob (Context context, PDFDoc pdfDoc, String printJobName, String fileName, IPrintResultCallback callback)
 
void startPrintJob (Context context, XFADoc xfaDoc, String printJobName, String fileName, IPrintResultCallback callback)
 
void triggerDismissMenuEvent ()
 
void unregisterAnnotHandler (AnnotHandler handler)
 
void unregisterConfigurationChangedListener (ConfigurationChangedListener listener)
 
boolean unregisterLifecycleListener (ILifecycleEventListener listener)
 
void unregisterMenuEventListener (MenuEventListener listener)
 
void unregisterModule (Module module)
 
boolean unregisterStateChangeListener (IStateChangeListener listener)
 
void unregisterToolHandler (ToolHandler handler)
 
void unregisterToolHandlerChangedListener (ToolHandlerChangedListener listener)
 
void unregisterXFAPageEventListener (IXFAPageEventListener listener)
 
void unregisterXFAWidgetEventListener (IXFAWidgetEventListener listener)
 

Static Public Attributes

static final int LINKTYPE_ANNOT = 0
 
static final int LINKTYPE_TEXT = 1
 

Detailed Description

Class UIExtensionsManager represents a UI extensions manager.

The UIExtensionsManager class is mainly used for managing the UI extensions which implement IPDFReader interface, it implements the PDFViewCtrl.UIExtensionsManager interface that is a listener to listen common interaction events and view event, and will dispatch some events to UI extensions, it also defines functions to manage the UI extensions.

Constructor & Destructor Documentation

◆ UIExtensionsManager() [1/2]

com.foxit.uiextensions.UIExtensionsManager.UIExtensionsManager ( Context  context,
PDFViewCtrl  pdfViewCtrl 
)

Instantiates a new UI extensions manager.

Parameters
contextA Context object which species the context.
pdfViewCtrlA PDFViewCtrl object which species the PDF view control.

◆ UIExtensionsManager() [2/2]

com.foxit.uiextensions.UIExtensionsManager.UIExtensionsManager ( Context  context,
PDFViewCtrl  pdfViewCtrl,
Config  config 
)

Instantiates a new UI extensions manager with modules config.

Parameters
contextA Context object which species the context.
pdfViewCtrlA PDFViewCtrl object which species the PDF view control.
configA Config object which species a modules loading config, if null, UIExtension manager will load all modules by default, and equal to UIExtensionsManager(Context, PDFViewCtrl).

Member Function Documentation

◆ backToNormalState()

boolean com.foxit.uiextensions.UIExtensionsManager.backToNormalState ( )

Show normal view reading state

Returns
True means back the normal state

◆ backToPrevActivity()

void com.foxit.uiextensions.UIExtensionsManager.backToPrevActivity ( )

Go back to the previous activity.

Implements com.foxit.uiextensions.IPDFReader.

◆ canAddAnnot()

boolean com.foxit.uiextensions.UIExtensionsManager.canAddAnnot ( )

Check whether the document can add annotation

Returns
true means The document can add annotation

◆ canModifyContents()

boolean com.foxit.uiextensions.UIExtensionsManager.canModifyContents ( )

Check whether the document can be modified.

Returns
true means The document can be modified

◆ changeState()

void com.foxit.uiextensions.UIExtensionsManager.changeState ( int  state)

Change the read state

Parameters
stateshould be one of ReadStateConfig.STATE_XXX

Implements com.foxit.uiextensions.IPDFReader.

◆ enableBottomToolbar()

void com.foxit.uiextensions.UIExtensionsManager.enableBottomToolbar ( boolean  isEnabled)

Whether show the bottom tool bar

Parameters
isEnabledTrue show the bottom tool bar, or otherwise.

◆ enableFormHighlight()

void com.foxit.uiextensions.UIExtensionsManager.enableFormHighlight ( boolean  enable)

Enable the highlight color of form field.

Parameters
enableTrue means highlight color of form field. can be displayed, false for else.

◆ enableLinkHighlight()

void com.foxit.uiextensions.UIExtensionsManager.enableLinkHighlight ( boolean  enable)

Enable highlight color of link annotation

Parameters
enableTrue means highlight color of link annotation can be displayed, false for else.

◆ enableLinks()

void com.foxit.uiextensions.UIExtensionsManager.enableLinks ( boolean  enable)

Enable link annotation action event.

Parameters
enableTrue means link annotation action event can be triggered, false for else.

◆ enableTopToolbar()

void com.foxit.uiextensions.UIExtensionsManager.enableTopToolbar ( boolean  isEnabled)

Whether show the top tool bar

Parameters
isEnabledTrue show the top tool bar, or otherwise.

◆ exitPanZoomMode()

void com.foxit.uiextensions.UIExtensionsManager.exitPanZoomMode ( )

Exit the pan zoom mode.

◆ getAnnotHandlerByType()

AnnotHandler com.foxit.uiextensions.UIExtensionsManager.getAnnotHandlerByType ( int  type)

Get the specified AnnotHandler from current UI extensions manager.

Parameters
typeThe type of AnnotHandler, refer to AnnotHandler#getType();
Returns
A AnnotHandler object with specified type.

◆ getAttachedActivity()

Activity com.foxit.uiextensions.UIExtensionsManager.getAttachedActivity ( )

Get the attached activity.

Returns
The attached activity.

◆ getBackEventListener()

BackEventListener com.foxit.uiextensions.UIExtensionsManager.getBackEventListener ( )

◆ getBarManager()

IBarsHandler com.foxit.uiextensions.UIExtensionsManager.getBarManager ( )

Get bar manager

Returns
Return the IBarsHandler to use.

Implements com.foxit.uiextensions.IPDFReader.

◆ getConfig()

Config com.foxit.uiextensions.UIExtensionsManager.getConfig ( )

Get a property config

Returns
Config

◆ getContentView()

RelativeLayout com.foxit.uiextensions.UIExtensionsManager.getContentView ( )
Returns
the content view of the UI extension

Implements com.foxit.uiextensions.IPDFReader.

◆ getCurrentAnnotHandler()

AnnotHandler com.foxit.uiextensions.UIExtensionsManager.getCurrentAnnotHandler ( )
Returns
Get the current AnnotHandler

◆ getCurrentSelectedText()

String com.foxit.uiextensions.UIExtensionsManager.getCurrentSelectedText ( )

Get current selected text content from text select tool handler.

Returns
The current selected text content.

◆ getCurrentToolHandler()

ToolHandler com.foxit.uiextensions.UIExtensionsManager.getCurrentToolHandler ( )

Get the current tool handler.

Returns
A ToolHandler object which specifies the current tool handler.

◆ getDocumentManager()

DocumentManager com.foxit.uiextensions.UIExtensionsManager.getDocumentManager ( )
Returns
the DocumentManager which used to get document property and other operations

Implements com.foxit.uiextensions.IPDFReader.

◆ getFocusAnnot()

Annot com.foxit.uiextensions.UIExtensionsManager.getFocusAnnot ( )

Get the focus annotation.

Returns
The focus annotation.

Implements com.foxit.sdk.PDFViewCtrl.UIExtensionsManager.

◆ getFormHighlightColor()

long com.foxit.uiextensions.UIExtensionsManager.getFormHighlightColor ( )

Get the highlight color of form field.

Returns
the highlight color of form field.

◆ getLinkEventListener()

ILinkEventListener com.foxit.uiextensions.UIExtensionsManager.getLinkEventListener ( )

Get link event listener object.

Returns
The link event listener object.

◆ getLinkHighlightColor()

long com.foxit.uiextensions.UIExtensionsManager.getLinkHighlightColor ( )

get the highlight color of link annotation.

Returns
the highlight color

◆ getMainFrame()

IMainFrame com.foxit.uiextensions.UIExtensionsManager.getMainFrame ( )

Get the IMainFrame of the UI extension.

Returns
The IMainFrame to use.

Implements com.foxit.uiextensions.IPDFReader.

◆ getMenuView()

IMenuView com.foxit.uiextensions.UIExtensionsManager.getMenuView ( )
Returns
the IMenuView for interacting with menus

◆ getModuleByName()

Module com.foxit.uiextensions.UIExtensionsManager.getModuleByName ( String  name)

Get the specified module from current UI extensions manager.

Parameters
nameThe specified module name, refer to Module#getName().
Returns
A Module object with specified module name.

◆ getPanelManager()

IPanelManager com.foxit.uiextensions.UIExtensionsManager.getPanelManager ( )
Returns
a IPanelManager

◆ getPDFViewCtrl()

PDFViewCtrl com.foxit.uiextensions.UIExtensionsManager.getPDFViewCtrl ( )

Get the pdf view control

Returns
The PDFViewCtrl to use.

Implements com.foxit.uiextensions.IPDFReader.

◆ getRootView()

ViewGroup com.foxit.uiextensions.UIExtensionsManager.getRootView ( )
Returns
the root view

◆ getSaveDocFlag()

int com.foxit.uiextensions.UIExtensionsManager.getSaveDocFlag ( )

Get the flag while saving a document has used

◆ getSavePath()

String com.foxit.uiextensions.UIExtensionsManager.getSavePath ( )
Returns
the path where the document has saved

◆ getSelectionHighlightColor()

int com.foxit.uiextensions.UIExtensionsManager.getSelectionHighlightColor ( )

Get highlight color (including alpha) when text has selected.

Returns
The highlight color.

◆ getSettingBar()

IMultiLineBar com.foxit.uiextensions.UIExtensionsManager.getSettingBar ( )
Returns
the IMultiLineBar which used to control the page mode, zoom mode and other settings.

Implements com.foxit.uiextensions.IPDFReader.

◆ getState()

int com.foxit.uiextensions.UIExtensionsManager.getState ( )

Get the read state.

Returns
Return the read state, should be one of ReadStateConfig.STATE_XXX

Implements com.foxit.uiextensions.IPDFReader.

◆ getToolHandlerByType()

ToolHandler com.foxit.uiextensions.UIExtensionsManager.getToolHandlerByType ( String  type)

get the specified ToolHandler from current UI extensions manager.

Parameters
typeThe tool handler type, refer to function ToolHandler#getType().
Returns
A ToolHandler object with specified type.

◆ handleActivityResult()

void com.foxit.uiextensions.UIExtensionsManager.handleActivityResult ( Activity  act,
int  requestCode,
int  resultCode,
Intent  data 
)

Receive and handle result from activity

Parameters
actThe current activity
requestCodeThe integer request code originally supplied to startActivityForResult(), allowing you to identify who this result came from.
resultCodeThe integer result code returned by the child activity through its setResult().
dataAn Intent, which can return result data to the caller (various data can be attached to Intent "extras").
See also
Activity::onActivityResult(int, int, Intent)
Fragment::onActivityResult(int, int, Intent)

◆ isContinueAddAnnot()

boolean com.foxit.uiextensions.UIExtensionsManager.isContinueAddAnnot ( )

Whether or not the annotation can be created continuously.

Returns
True the annotation can be created continuously or otherwise.

◆ isFormHighlightEnable()

boolean com.foxit.uiextensions.UIExtensionsManager.isFormHighlightEnable ( )

Check whether form highlight can be displayed.

Returns
True means form highlight can be displayed, false for else.

◆ isHiddenPanel()

boolean com.foxit.uiextensions.UIExtensionsManager.isHiddenPanel ( PanelSpec.PanelType  panelType)

Return the current value in setPanelHidden.

Parameters
panelTypePanelType#ReadingBookmarks
PanelType#Outline
PanelType#Annotations
PanelType#Attachments
Returns
true means the panel is hidden.
See also
setPanelHidden(boolean, PanelType)

◆ isLinkHighlightEnabled()

boolean com.foxit.uiextensions.UIExtensionsManager.isLinkHighlightEnabled ( )

Check whether link highlight can be display.

Returns
True means link highlight can be displayed, false for else.

◆ isLinksEnabled()

boolean com.foxit.uiextensions.UIExtensionsManager.isLinksEnabled ( )

Check whether link annotation action event can be triggered.

Returns
True means link annotation action event can be triggered, false for else.

◆ isLoadAnnotModule()

boolean com.foxit.uiextensions.UIExtensionsManager.isLoadAnnotModule ( Annot  annot)

Check whether the specified annotation module that is loaded.

◆ onConfigurationChanged()

void com.foxit.uiextensions.UIExtensionsManager.onConfigurationChanged ( Activity  act,
Configuration  newConfig 
)

Should be called in Activity#onConfigurationChanged(Configuration) or Fragment#onConfigurationChanged(Configuration)

Parameters
actThe current activity
newConfigThe new device configuration.
See also
Activity::onConfigurationChanged(Configuration)
Fragment::onConfigurationChanged(Configuration)

◆ onCreate()

void com.foxit.uiextensions.UIExtensionsManager.onCreate ( Activity  act,
PDFViewCtrl  pdfViewCtrl,
Bundle  bundle 
)

Should be called in Activity#onCreate(Bundle) or Fragment#onCreate(Bundle)

See also
Activity::onCreate(Bundle)
Fragment::onCreate(Bundle)

◆ onDestroy()

void com.foxit.uiextensions.UIExtensionsManager.onDestroy ( Activity  act)

Should be called in Activity#onDestroy() or Fragment#onDestroy()

See also
Activity::onDestroy()
Fragment::onDestroy()

◆ onDoubleTap()

boolean com.foxit.uiextensions.UIExtensionsManager.onDoubleTap ( MotionEvent  e)

Triggered when PDFViewCtrl#onDoubleTap(MotionEvent) is called.

Parameters
eThe down motion event of the first tap of the double-tap.
Returns
true means the event is consumed.
false means not.

Implements com.foxit.sdk.PDFViewCtrl.IDoubleTapEventListener.

◆ onDoubleTapEvent()

boolean com.foxit.uiextensions.UIExtensionsManager.onDoubleTapEvent ( MotionEvent  e)

Triggered when PDFViewCtrl#onDoubleTapEvent(MotionEvent) is called.

Parameters
eThe motion event that occurred during the double-tap gesture.
Returns
true means the event is consumed.
false means not.

Implements com.foxit.sdk.PDFViewCtrl.IDoubleTapEventListener.

◆ onDown()

boolean com.foxit.uiextensions.UIExtensionsManager.onDown ( MotionEvent  e)

Triggered when PDFViewCtrl#onDown(MotionEvent) is called.

Parameters
eThe down motion event.
Returns
true means the event is consumed.
false means not.

Implements com.foxit.sdk.PDFViewCtrl.IGestureEventListener.

◆ onDraw()

void com.foxit.uiextensions.UIExtensionsManager.onDraw ( int  pageIndex,
Canvas  canvas 
)

Triggered when

See also
PDFViewCtrl::onDraw(Canvas) is called.
Parameters
pageIndexThe page index.Valid range: from 0 to (count-1). count is the page count.
canvasThe canvas of pdf view control.

Implements com.foxit.sdk.PDFViewCtrl.IDrawEventListener.

◆ onFling()

boolean com.foxit.uiextensions.UIExtensionsManager.onFling ( MotionEvent  e1,
MotionEvent  e2,
float  velocityX,
float  velocityY 
)

Triggered when PDFViewCtrl#onFling(MotionEvent, MotionEvent, float, float) is called.

Parameters
e1The first down motion event.
e2The move motion event.
velocityXThe velocity of this fling measured in pixels per second along the x axis.
velocityYThe velocity of this fling measured in pixels per second along the y axis.
Returns
true means the event is consumed.
false means not.

Implements com.foxit.sdk.PDFViewCtrl.IGestureEventListener.

◆ onHiddenChanged()

void com.foxit.uiextensions.UIExtensionsManager.onHiddenChanged ( boolean  hidden)

Should be called in Fragment#onHiddenChanged(boolean)

Parameters
hiddenTrue if the fragment is now hidden, false otherwise.
See also
Fragment::onHiddenChanged(boolean)

◆ onKeyDown()

boolean com.foxit.uiextensions.UIExtensionsManager.onKeyDown ( Activity  act,
int  keyCode,
KeyEvent  event 
)

Should be call in Activity#onKeyDown(int, KeyEvent)

Parameters
actThe current activity
keyCodeThe value in event.getKeyCode().
eventDescription of the key event.
See also
Activity::onKeyDown(int, KeyEvent)
Returns
Return true to prevent this event from being propagated further, or false to indicate that you have not handled this event and it should continue to be propagated.

◆ onLongPress()

void com.foxit.uiextensions.UIExtensionsManager.onLongPress ( MotionEvent  e)

Triggered when PDFViewCtrl#onLongPress(MotionEvent) is called.

Parameters
eThe initial on down motion event that started the longpress.

Implements com.foxit.sdk.PDFViewCtrl.IGestureEventListener.

◆ onPause()

void com.foxit.uiextensions.UIExtensionsManager.onPause ( Activity  act)

Should be called in Activity#onPause() or Fragment#onPause()

See also
Activity::onPause()
Fragment::onPause()

◆ onResume()

void com.foxit.uiextensions.UIExtensionsManager.onResume ( Activity  act)

Should be called in Activity#onResume() or Fragment#onResume()

See also
Activity::onResume()
Fragment::onResume()

◆ onScale()

boolean com.foxit.uiextensions.UIExtensionsManager.onScale ( ScaleGestureDetector  detector)

Triggered when PDFViewCtrl#onScale(ScaleGestureDetector) is called.

Parameters
detectorThe detector reporting the event.
Returns
true means the detector should consider this event as handled.
false means not.

Implements com.foxit.sdk.PDFViewCtrl.IScaleGestureEventListener.

◆ onScaleBegin()

boolean com.foxit.uiextensions.UIExtensionsManager.onScaleBegin ( ScaleGestureDetector  detector)

Triggered when PDFViewCtrl#onScaleBegin(ScaleGestureDetector) is called.

Parameters
detectorThe detector reporting the event.
Returns
true means the detector should continue recognizing this gesture.
false means not.

Implements com.foxit.sdk.PDFViewCtrl.IScaleGestureEventListener.

◆ onScaleEnd()

void com.foxit.uiextensions.UIExtensionsManager.onScaleEnd ( ScaleGestureDetector  detector)

Triggered when PDFViewCtrl#onScaleEnd(ScaleGestureDetector) is called.

Parameters
detectorThe detector reporting the event.

Implements com.foxit.sdk.PDFViewCtrl.IScaleGestureEventListener.

◆ onScroll()

boolean com.foxit.uiextensions.UIExtensionsManager.onScroll ( MotionEvent  e1,
MotionEvent  e2,
float  distanceX,
float  distanceY 
)

Triggered when PDFViewCtrl#onScroll(MotionEvent, MotionEvent, float, float) is called.

Parameters
e1The first down motion event that started the scrolling.
e2The move motion event that triggered the current onScroll.
distanceXThe distance along the X axis that has been scrolled since the last call to onScroll.
distanceYThe distance along the Y axis that has been scrolled since the last call to onScroll.
Returns
true means the event is consumed.
false means not.

Implements com.foxit.sdk.PDFViewCtrl.IGestureEventListener.

◆ onShowPress()

void com.foxit.uiextensions.UIExtensionsManager.onShowPress ( MotionEvent  e)

Triggered when PDFViewCtrl#onShowPress(MotionEvent) is called.

Parameters
eThe down motion event.

Implements com.foxit.sdk.PDFViewCtrl.IGestureEventListener.

◆ onSingleTapConfirmed()

boolean com.foxit.uiextensions.UIExtensionsManager.onSingleTapConfirmed ( MotionEvent  e)

Triggered when PDFViewCtrl#onSingleTapConfirmed(MotionEvent) is called.

Parameters
eThe down motion event of the single-tap.
Returns
true means the event is consumed.
false means not.

Implements com.foxit.sdk.PDFViewCtrl.IDoubleTapEventListener.

◆ onSingleTapUp()

boolean com.foxit.uiextensions.UIExtensionsManager.onSingleTapUp ( MotionEvent  e)

Triggered when PDFViewCtrl#onSingleTapUp(MotionEvent) is called.

Parameters
eThe up motion event that completed the first tap
Returns
true means the event is consumed.
false means not.

Implements com.foxit.sdk.PDFViewCtrl.IGestureEventListener.

◆ onStart()

void com.foxit.uiextensions.UIExtensionsManager.onStart ( Activity  act)

Should be called in Activity#onStart() or Fragment#onStart()

See also
Activity::onStart()
Fragment::onStart()

◆ onStop()

void com.foxit.uiextensions.UIExtensionsManager.onStop ( Activity  act)

Should be called in Activity#onStop() or Fragment#onStop()

See also
Activity::onStop()
Fragment::onStop()

◆ onTouchEvent()

boolean com.foxit.uiextensions.UIExtensionsManager.onTouchEvent ( int  pageIndex,
MotionEvent  event 
)

Triggered when PDFViewCtrl#onTouchEvent(MotionEvent) is called.

Parameters
pageIndexThe page index.Valid range: from 0 to (count-1). count is the page count.
eventA MotionEvent object which species the event.
Returns
true means the event was handled, while false means not.

Implements com.foxit.sdk.PDFViewCtrl.UIExtensionsManager.

◆ onXFAPageRemoved()

void com.foxit.uiextensions.UIExtensionsManager.onXFAPageRemoved ( boolean  isSuccess,
int  pageIndex 
)

Called when the specified xfa page has removed.

◆ onXFAPagesInserted()

void com.foxit.uiextensions.UIExtensionsManager.onXFAPagesInserted ( boolean  isSuccess,
int  pageIndex 
)

Called when a xfa page has added in the specified position.

◆ onXFAWidgetAdded()

void com.foxit.uiextensions.UIExtensionsManager.onXFAWidgetAdded ( XFAWidget  xfaWidget)

Called when a XFAWidget has added.

◆ onXFAWidgetWillRemove()

void com.foxit.uiextensions.UIExtensionsManager.onXFAWidgetWillRemove ( XFAWidget  xfaWidget)

Called when a XFAWidget will be removed.

◆ openDocument()

void com.foxit.uiextensions.UIExtensionsManager.openDocument ( String  path,
byte []  password 
)

Open a PDF document from a specified PDF file path.

Parameters
pathA PDF file path.
passwordA byte array which specifies the password used to load the PDF document content. It can be either user password or owner password. If the PDF document is not encrypted by password, just pass an empty string.

◆ registerAnnotHandler()

void com.foxit.uiextensions.UIExtensionsManager.registerAnnotHandler ( AnnotHandler  handler)

Register the specified AnnotHandler to current UI extensions manager.

Parameters
handlerA AnnotHandler to use.

◆ registerConfigurationChangedListener()

void com.foxit.uiextensions.UIExtensionsManager.registerConfigurationChangedListener ( ConfigurationChangedListener  listener)

Register a callback to be invoked when the configuration changed.

Parameters
listenera ConfigurationChangedListener to use

◆ registerLifecycleListener()

◆ registerMenuEventListener()

void com.foxit.uiextensions.UIExtensionsManager.registerMenuEventListener ( MenuEventListener  listener)

Register a callback to be invoked when the menu event has triggered.

◆ registerModule()

void com.foxit.uiextensions.UIExtensionsManager.registerModule ( Module  module)

Register the specified module to current UI extensions manager.

Note: This method is only used within RDK

Parameters
moduleA Module object to be registered.

◆ registerStateChangeListener()

boolean com.foxit.uiextensions.UIExtensionsManager.registerStateChangeListener ( IStateChangeListener  listener)

Register a callback to be invoked when the state changed.

Parameters
listenerthe IStateChangeListener to use.
Returns
true
register success or otherwise.

Implements com.foxit.uiextensions.IPDFReader.

◆ registerToolHandler()

void com.foxit.uiextensions.UIExtensionsManager.registerToolHandler ( ToolHandler  handler)

Register the specified ToolHandler to current UI extensions manager.

Parameters
handlerA ToolHandler object to be registered.

◆ registerToolHandlerChangedListener()

void com.foxit.uiextensions.UIExtensionsManager.registerToolHandlerChangedListener ( ToolHandlerChangedListener  listener)

Register a callback to be invoked when the tool handler changed.

Note: This method is only used within RDK

◆ registerXFAPageEventListener()

void com.foxit.uiextensions.UIExtensionsManager.registerXFAPageEventListener ( IXFAPageEventListener  listener)

Register a xfa page event listener.

Parameters
listenerAn IPageEventListener object to be registered.

◆ registerXFAWidgetEventListener()

void com.foxit.uiextensions.UIExtensionsManager.registerXFAWidgetEventListener ( IXFAWidgetEventListener  listener)

Register a xfa widget event listener.

Parameters
listenerAn IXFAWidgetEventListener object to be registered.

◆ setAttachedActivity()

void com.foxit.uiextensions.UIExtensionsManager.setAttachedActivity ( Activity  activity)

Set the attached activity.

If you want add a Note, FreeText, FileAttachment annotation; you must set the attached activity.

If you want to use the function of adding reply or comment to the annotation or about thumbnail, you must set the attached activity and it must be a FragmentActivity.

Parameters
activityThe attached activity.

◆ setBackEventListener()

void com.foxit.uiextensions.UIExtensionsManager.setBackEventListener ( BackEventListener  listener)

Set a BackEventListener to be invoked when the back button clicked.

Parameters
listenerThe BackEventListener to use

Implements com.foxit.uiextensions.IPDFReader.

◆ setContinueAddAnnot()

void com.foxit.uiextensions.UIExtensionsManager.setContinueAddAnnot ( boolean  continueAddAnnot)

Set whether the annotation can be created continuously. The default is false.

Parameters
continueAddAnnotwhether the annot can be created continuously.

◆ setCurrentToolHandler()

void com.foxit.uiextensions.UIExtensionsManager.setCurrentToolHandler ( ToolHandler  toolHandler)

Set the current tool handler.

Parameters
toolHandlerA ToolHandler object which specifies the current tool handler.

◆ setFilePath()

void com.foxit.uiextensions.UIExtensionsManager.setFilePath ( String  path)

Set the file path

◆ setFormHighlightColor()

void com.foxit.uiextensions.UIExtensionsManager.setFormHighlightColor ( long  color)

set form highlight color

Parameters
colorthe form highlight color to be set

◆ setLinkEventListener()

void com.foxit.uiextensions.UIExtensionsManager.setLinkEventListener ( ILinkEventListener  listener)

Set link event listener.

Parameters
listenerThe specified link event listener.

◆ setLinkHighlightColor()

void com.foxit.uiextensions.UIExtensionsManager.setLinkHighlightColor ( long  color)

Set the highlight color of link annotation.

Parameters
colorthe highlight color to be set

◆ setOnFinishListener()

void com.foxit.uiextensions.UIExtensionsManager.setOnFinishListener ( OnFinishListener  listener)

Set the OnFinishListener to be invoked when the document closed and current activity has exited.

Parameters
listenerthe OnFinishListener to use.

◆ setPanelHidden()

void com.foxit.uiextensions.UIExtensionsManager.setPanelHidden ( boolean  isHidden,
PanelSpec.PanelType  panelType 
)

According to the PanelType control whether to show or hide the panel.

It will be work while the annotation module has been loaded.

Parameters
isHiddentrue means to hidden the panel.
panelTypePanelType#ReadingBookmarks
PanelType#Outline
PanelType#Annotations
PanelType#Attachments

◆ setSaveDocFlag()

void com.foxit.uiextensions.UIExtensionsManager.setSaveDocFlag ( int  flag)

Set the flag to be used when the document has saved

◆ setSavePath()

void com.foxit.uiextensions.UIExtensionsManager.setSavePath ( String  savePath)

Set the path where the document will be saved

◆ setSelectionHighlightColor()

void com.foxit.uiextensions.UIExtensionsManager.setSelectionHighlightColor ( int  color)

Set highlight color (including alpha) when select text.

Parameters
colorThe highlight color to be set.

◆ shouldViewCtrlDraw()

boolean com.foxit.uiextensions.UIExtensionsManager.shouldViewCtrlDraw ( Annot  annot)

Whether PDFViewCtrl draw the specified annotation.

Parameters
annotThe specified annotation.
Returns
true
means the annotation was drawn by PDFViewCtrl. while
false
means not.

Implements com.foxit.sdk.PDFViewCtrl.UIExtensionsManager.

◆ startPrintJob() [1/2]

void com.foxit.uiextensions.UIExtensionsManager.startPrintJob ( Context  context,
PDFDoc  pdfDoc,
String  printJobName,
String  fileName,
IPrintResultCallback  callback 
)

Print PDF documents and Static XFA documents(that is xfaDoc.getType() == XFADoc.e_Static)

Note: Only when OS version is Kitkat and above (Android API >= 19) the print function can be used

Parameters
contextThe context to use. it must be instanceof Activity.
pdfDocThe PDFDoc Object, it can not be empty .
printJobNameprint job name, it is can be null or empty.
fileNameThe document name which may be shown to the user and is the file name if the content it describes is saved as a PDF. Cannot be empty.
callbackprint callback IPrintResultCallback

◆ startPrintJob() [2/2]

void com.foxit.uiextensions.UIExtensionsManager.startPrintJob ( Context  context,
XFADoc  xfaDoc,
String  printJobName,
String  fileName,
IPrintResultCallback  callback 
)

Print Dynamic XFA documents (that is xfaDoc.getType() == XFADoc.e_Dynamic)

Note: Only when OS version is Kitkat and above (Android API >= 19) the print function can be used

Parameters
contextThe context to use. it must be instanceof Activity.
xfaDocThe XFADoc Object, it can not be empty .
printJobNameprint job name, it is can be null or empty.
fileNameThe document name which may be shown to the user and is the file name if the content it describes is saved as a PDF. Cannot be empty.
callbackprint callback IPrintResultCallback

◆ triggerDismissMenuEvent()

void com.foxit.uiextensions.UIExtensionsManager.triggerDismissMenuEvent ( )

Called when menu has dismissed.

◆ unregisterAnnotHandler()

void com.foxit.uiextensions.UIExtensionsManager.unregisterAnnotHandler ( AnnotHandler  handler)

Unregister the specified AnnotHandler from current UI extensions manager.

Parameters
handlerA AnnotHandler to use.

◆ unregisterConfigurationChangedListener()

void com.foxit.uiextensions.UIExtensionsManager.unregisterConfigurationChangedListener ( ConfigurationChangedListener  listener)

unregister the specified ConfigurationChangedListener.

Parameters
listenerthe specified ConfigurationChangedListener

◆ unregisterLifecycleListener()

boolean com.foxit.uiextensions.UIExtensionsManager.unregisterLifecycleListener ( ILifecycleEventListener  listener)

Unregister the specified ILifecycleEventListener

Parameters
listenerthe specified ILifecycleEventListener
Returns
true
unregister success or otherwise.

Implements com.foxit.uiextensions.IPDFReader.

◆ unregisterMenuEventListener()

void com.foxit.uiextensions.UIExtensionsManager.unregisterMenuEventListener ( MenuEventListener  listener)

Unregister the specified MenuEventListener

◆ unregisterModule()

void com.foxit.uiextensions.UIExtensionsManager.unregisterModule ( Module  module)

Unregister the specified module from current UI extensions manager. Note: This method is only used within RDK

Parameters
moduleA Module object to be unregistered.

◆ unregisterStateChangeListener()

boolean com.foxit.uiextensions.UIExtensionsManager.unregisterStateChangeListener ( IStateChangeListener  listener)

Unregister the specified IStateChangeListener

Parameters
listenerthe specified IStateChangeListener
Returns
true
unregister success or otherwise.

Implements com.foxit.uiextensions.IPDFReader.

◆ unregisterToolHandler()

void com.foxit.uiextensions.UIExtensionsManager.unregisterToolHandler ( ToolHandler  handler)

Unregister the specified ToolHandler from current UI extensions manager.

Note: This method is only used within RDK

Parameters
handlerA ToolHandler object to be unregistered.

◆ unregisterToolHandlerChangedListener()

void com.foxit.uiextensions.UIExtensionsManager.unregisterToolHandlerChangedListener ( ToolHandlerChangedListener  listener)

Unregister the ToolHandler changed listener.

Note: This method is only used within RDK

Parameters
listenera ToolHandlerChangedListener to use.

◆ unregisterXFAPageEventListener()

void com.foxit.uiextensions.UIExtensionsManager.unregisterXFAPageEventListener ( IXFAPageEventListener  listener)

Unregister a xfa page event listener.

Parameters
listenerAn IPageEventListener object to be unregistered.

◆ unregisterXFAWidgetEventListener()

void com.foxit.uiextensions.UIExtensionsManager.unregisterXFAWidgetEventListener ( IXFAWidgetEventListener  listener)

Unregister a xfa widget event listener.

Parameters
listenerAn IXFAWidgetEventListener object to be unregistered.

Member Data Documentation

◆ LINKTYPE_ANNOT

final int com.foxit.uiextensions.UIExtensionsManager.LINKTYPE_ANNOT = 0
static

link type: annotation

◆ LINKTYPE_TEXT

final int com.foxit.uiextensions.UIExtensionsManager.LINKTYPE_TEXT = 1
static

link type: text