java.lang.Object | |
↳ | com.pdftron.pdf.tools.ToolManager |
This class implements the PDFViewCtrl.ToolManager
interface. The ToolManager interface is basically a listener for the several
different events triggered by PDFViewCtrl, including gesture, layout and
custom events.
The Tool interface defined in this class is used to propagate these events
to the different tools, so making it possible to control which actions to
execute upon such events. Each concrete Tool implementation decides which
is the next tool, and the ToolManager uses the getNextToolMode()
to check if it must stop the event loop or create a new tool
and continue to propagate the event.
For example, the code for onDown(MotionEvent)
is as below:
if (mTool != null) { ToolMode prev_tm = mTool.getAnnotType(), next_tm; do { mTool.onDown(e); next_tm = mTool.getNextToolMode(); if (prev_tm != next_tm) { setTool(createTool(next_tm, mTool)); prev_tm = next_tm; } else { break; } } while (true); }
With this being said, a Tool implementation should prevent forming tools in a cyclic way.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | ToolManager.ActionGoBackListener | ||||||||||
interface | ToolManager.AdvancedAnnotationListener | This interface can be used to monitor advanced annotation events from various tools. | |||||||||
enum | ToolManager.AnnotAction | ||||||||||
interface | ToolManager.AnnotationModificationListener | This interface can be used to monitor annotation modification events such as added/edited/removed. | |||||||||
interface | ToolManager.AnnotationPermissionListener | Callback for annotation permissions | |||||||||
interface | ToolManager.AnnotationToolbarListener | This interface can be used to monitor tools interaction with annotation toolbar | |||||||||
interface | ToolManager.AnnotationsSelectionListener | This interface can be used to monitor annotation selection changed event. | |||||||||
interface | ToolManager.BasicAnnotationListener | This interface can be used to monitor basic annotation events such as selected/unselected. | |||||||||
interface | ToolManager.DialogListener | This interface can be used to intercept dialog events. | |||||||||
interface | ToolManager.EdgeEffectListener | This interface can be used to listen to viewer edge effect events | |||||||||
interface | ToolManager.ExternalAnnotationManagerListener | This interface can be used to provide custom key for annotation creation | |||||||||
interface | ToolManager.FileAttachmentAnnotationListener | ||||||||||
interface | ToolManager.FullSaveListener | Callback to notify subscribers that a full PDF save is required | |||||||||
interface | ToolManager.OnGenericMotionEventListener | This interface can be used to monitor generic motion event | |||||||||
interface | ToolManager.OnLayoutListener | This interface can be used to listen for when the PDFViewCtrl's onLayout() is triggered. | |||||||||
interface | ToolManager.PdfDocModificationListener | This interface can be used to monitor any modification events that change the structure of the PDF document such as page manipulation, bookmark modification, etc. | |||||||||
interface | ToolManager.PdfOutlineModificationListener | ||||||||||
interface | ToolManager.PdfTextModificationListener | This interface can be used to monitor PDF text modification events | |||||||||
interface | ToolManager.PreFlingListener | ||||||||||
interface | ToolManager.PreToolManagerListener | This interface can be used to avoid executing Tool's code in the ToolManager
implementation (the events will be called before Tool's ones). |
|||||||||
interface | ToolManager.PresetsListener | ||||||||||
interface | ToolManager.QuickMenuListener | This interface can be used to detect if the built-in Tools quick menu item has been clicked. | |||||||||
interface | ToolManager.SnackbarListener | ||||||||||
interface | ToolManager.SpecialAnnotationListener | ||||||||||
interface | ToolManager.StampDialogListener | ||||||||||
interface | ToolManager.Tool | This interface is used to forward events from PDFViewCtrl.ToolManager
to the actual implementation of the Tool. |
|||||||||
interface | ToolManager.ToolChangedListener | This interface can be used to listen for when the current tool changes. | |||||||||
interface | ToolManager.ToolManagerChangedListener | Listener called when the ToolManager has changed. | |||||||||
enum | ToolManager.ToolMode | Tool modes | |||||||||
interface | ToolManager.ToolModeBase | Base tool mode | |||||||||
interface | ToolManager.ToolSetListener | This interface can be used to listen for when a new tool is set as current tool of ToolManager. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ToolManager(PDFViewCtrl pdfViewCtrl)
Class constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addActionGoBackListener(ToolManager.ActionGoBackListener listener)
Adds the
ToolManager.ActionGoBackListener . | ||||||||||
void |
addAnnotStyleProperty(AnnotStyleProperty annotStyleProperty)
Add an AnnotStyleProperty used to hide annotation style properties in the annotation style dialog.
| ||||||||||
void | addAnnotationModificationListener(ToolManager.AnnotationModificationListener listener) | ||||||||||
void |
addAnnotationsSelectionListener(ToolManager.AnnotationsSelectionListener listener)
Adds the
ToolManager.AnnotationsSelectionListener . | ||||||||||
void |
addCustomizedTool(HashMap<ToolManager.ToolModeBase, Class<? extends Tool>> toolClassMap)
Add a custom tool to tool class map
| ||||||||||
void |
addCustomizedTool(Tool tool, Object... params)
Add a custom tool to tool class map
| ||||||||||
void |
addCustomizedTool(Tool tool)
Add a custom tool to tool class map
| ||||||||||
void |
addCustomizedToolParams(HashMap<ToolManager.ToolModeBase, Object[]> toolParamMap)
Add a custom tool to tool class map
| ||||||||||
void |
addDialogListener(ToolManager.DialogListener listener)
Adds the
ToolManager.DialogListener | ||||||||||
void |
addFullSaveListener(ToolManager.FullSaveListener listener)
Adds the
ToolManager.FullSaveListener . | ||||||||||
void |
addOnLayoutListener(ToolManager.OnLayoutListener listener)
Adds the
ToolManager.OnLayoutListener . | ||||||||||
void |
addPdfDocModificationListener(ToolManager.PdfDocModificationListener listener)
Adds the
ToolManager.PdfDocModificationListener . | ||||||||||
void | addPdfOutlineModificationListener(ToolManager.PdfOutlineModificationListener listener) | ||||||||||
void |
addPdfTextModificationListener(ToolManager.PdfTextModificationListener listener)
Adds the
ToolManager.PdfTextModificationListener . | ||||||||||
void |
addToolChangedListener(ToolManager.ToolChangedListener listener)
Adds the
ToolManager.ToolChangedListener . | ||||||||||
void |
addToolCreatedListener(ToolManager.ToolChangedListener listener)
Adds the
ToolManager.ToolChangedListener called when tool created. | ||||||||||
void | addToolManagerChangedListener(ToolManager.ToolManagerChangedListener listener) | ||||||||||
void |
addToolSetListener(ToolManager.ToolSetListener listener)
Adds the
ToolManager.ToolSetListener . | ||||||||||
void |
annotationCouldNotBeAdded(String errorMessage)
Lets various tools raise the annotation could not be
add event from a unified location.
| ||||||||||
void |
backToDefaultTool()
Used to force the next tool to be the default tool if previously set
| ||||||||||
boolean | canResumePdfDocWithoutReloading() | ||||||||||
Pan |
createDefaultTool()
Creates the default tool (Pan tool).
| ||||||||||
ToolManager.Tool | createTool(ToolManager.ToolModeBase newTool, ToolManager.Tool currentTool, Bundle bundle, boolean force) | ||||||||||
ToolManager.Tool |
createTool(ToolManager.ToolModeBase newTool, ToolManager.Tool currentTool, boolean showPreset)
Creates the specified tool and copies the necessary info from the
previous tool if provided.
| ||||||||||
ToolManager.Tool |
createTool(ToolManager.ToolModeBase newTool, ToolManager.Tool currentTool)
Creates the specified tool and copies the necessary info from the
previous tool if provided.
| ||||||||||
ToolManager.Tool |
createTool(ToolManager.ToolModeBase newTool, ToolManager.Tool currentTool, Bundle bundle)
Creates the specified tool and copies the necessary info from the
previous tool if provided.
| ||||||||||
void |
deselectAll()
Deselects all annotations
| ||||||||||
void |
destroy()
Cleans up resources.
| ||||||||||
void |
disableAnnotEditing(Integer[] annotTypes)
Disables annotation editing by type.
| ||||||||||
void |
disableToolMode(ToolMode[] toolModes)
Disables tool modes.
| ||||||||||
void | disableUpdateModifyDateAnnotTypes(int[] disabledAnnotTypes) | ||||||||||
void | disableUpdateModifyDateFieldTypes(int[] disabledFieldTypes) | ||||||||||
boolean |
editInkAnnots()
Gets whether editing ink annotation should open the annotation toolbar
| ||||||||||
void |
enableAnnotEditing(Integer[] annotTypes)
Enables annotation editing by type.
| ||||||||||
void |
enableAnnotManager(String userId)
Enables annotation manager for annotation syncing
| ||||||||||
void |
enableAnnotManager(String userId, String userName, PDFViewCtrl.AnnotationManagerMode undoMode, AnnotManager.EditPermissionMode editMode, AnnotManager.AnnotationSyncingListener listener)
Enables annotation manager for annotation syncing
| ||||||||||
void |
enableAnnotManager(String userId, String userName, AnnotManager.AnnotationSyncingListener listener)
Enables annotation manager for annotation syncing
| ||||||||||
void |
enableAnnotManager(String userId, AnnotManager.AnnotationSyncingListener listener)
Enables annotation manager for annotation syncing
| ||||||||||
void |
enableAnnotationLayer()
Enable separate rendering layer for annotations.
| ||||||||||
void |
enableToolMode(ToolMode[] toolModes)
Enables tool modes.
| ||||||||||
void |
freeTextInlineToggleEnabled(boolean freeTextInlineToggleEnabled)
Sets whether to show the FreeText inline toggle button
| ||||||||||
String | generateKey() | ||||||||||
AnnotManager | getAnnotManager() | ||||||||||
AnnotSnappingManager |
getAnnotSnappingManager()
Returns the class associated with calculating and storing annotation snapping.
| ||||||||||
HashMap<Integer, AnnotStyleProperty> |
getAnnotStyleProperties()
Returns list of AnnotStyleProperty used to hide elements of the AnnotStyleDialgFragment
| ||||||||||
ArrayList<ToolManager.ToolMode> |
getAnnotToolbarPrecedence()
Gets the precedence of tool mode in Annotation Toolbar
| ||||||||||
Annot |
getAnnotationAt(int x, int y)
Gets the annotation at the (x, y) position expressed in screen coordinates.
| ||||||||||
ToolManager.AnnotationPermissionListener | getAnnotationPermissionListener() | ||||||||||
int |
getAnnotationToolbarHeight()
Gets the annotation toolbar height
| ||||||||||
String |
getAuthorId()
Gets the user ID used for checking whether an annotation is created by current user.
| ||||||||||
String |
getAuthorName()
Gets the user ID used for checking whether an annotation is created by current user.
| ||||||||||
String | getCacheFileName() | ||||||||||
FragmentActivity |
getCurrentActivity()
Get the activity to which the ToolManager is currently attached, or
null if not attached. | ||||||||||
boolean |
getDefaultStoreNewSignature()
Gets whether "Store signature" setting in the CreateSignatureFragment dialog should
be enabled or disabled by default.
| ||||||||||
static ToolManager.ToolMode | getDefaultToolMode(ToolManager.ToolModeBase toolModeBase) | ||||||||||
static ToolManager.ToolModeBase | getDefaultToolModeBase(ToolManager.ToolModeBase toolModeBase) | ||||||||||
String |
getDigitalSignatureKeystore()
Gets digital signature keystore file path
| ||||||||||
String |
getDigitalSignatureKeystorePassword()
Gets digital signature keystore password
| ||||||||||
Set<ToolManager.ToolMode> | getDisabledToolModes() | ||||||||||
ToolManager.EdgeEffectListener | getEdgeEffectListener() | ||||||||||
Eraser.EraserType |
getEraserType()
Gets the type of eraser.
| ||||||||||
float |
getFreeHighlighterAutoSmoothingRange()
Gets how wide the range would be for auto smoothing vertical and horizontal strokes, in pixel.
| ||||||||||
String | getFreeTextCacheFileName() | ||||||||||
Set<String> |
getFreeTextFonts()
Gets the list of free text fonts to have as
options in the properties popup
(Gets whiteList fonts among the PDFNet system fonts)
| ||||||||||
Set<String> |
getFreeTextFontsFromAssets()
Gets custom font list from Assets for free text tool
| ||||||||||
Set<String> |
getFreeTextFontsFromStorage()
Gets custom font list from Storage for free text tool
| ||||||||||
int | getFreeTextToggleButtonColorInt() | ||||||||||
ToolManager.AnnotAction | getLastAnnotAction() | ||||||||||
AnnotEditRectGroup.SelectionMode |
getMultiSelectMode()
Gets the mode of multi-select tool.
| ||||||||||
ArrayList<ToolManager.Tool> | getOldTools() | ||||||||||
OnAnnotStyleChangedListener | getOnStyleChangedListener() | ||||||||||
PDFViewCtrl | getPDFViewCtrl() | ||||||||||
ToolManager.PresetsListener | getPresetsListener() | ||||||||||
RedactionManager | getRedactionManager() | ||||||||||
String |
getSelectedAnnotId()
Gets the identification of the selected annotation
| ||||||||||
int |
getSelectedAnnotPageNum()
Gets the page number of selected annotation
| ||||||||||
int |
getSelectionBoxMargin()
Gets the margin between selection box and annotation bounding box
| ||||||||||
int[] |
getSignatureColors()
Returns the colors used for signing.
| ||||||||||
ToolManager.SnackbarListener | getSnackbarListener() | ||||||||||
SnapUtils |
getSnapUtils()
Returns the class associated with handling drawing and calculating snapping modes.
| ||||||||||
int |
getSnappingModes()
Gets snapping modes for measurement tools
| ||||||||||
SoundManager | getSoundManager() | ||||||||||
ToolManager.StampDialogListener | getStampDialogListener() | ||||||||||
boolean |
getStickyNoteShowPopup()
Gets whether shows stick note pop up dialog
| ||||||||||
TextToSpeech |
getTTS()
Gets the Text To Speech object
| ||||||||||
int |
getTapToCreateShapeHalfWidth()
Gets the half width for tap to create shapes
| ||||||||||
int | getTheme() | ||||||||||
ToolManager.Tool |
getTool()
Gets the current
ToolManager.Tool instance. | ||||||||||
int |
getToolbarHeight()
Gets the toolbar height
| ||||||||||
UndoRedoManager |
getUndoRedoManger()
Gets the undo redo manager
| ||||||||||
Set<Integer> | getUpdateModifyDateDisabledAnnotTypes() | ||||||||||
Set<Integer> | getUpdateModifyDateDisabledFieldTypes() | ||||||||||
boolean |
hasAnnotToolbarPrecedence()
Gets whether precedence is set in Annotation Toolbar
| ||||||||||
boolean |
hasCurrentActivity()
Whether ToolManager is currently attached with an activity
| ||||||||||
void |
hideBuiltInPageNumber()
Hide built in page number indicator
| ||||||||||
void |
initTTS()
Initialize system Text To Speech
| ||||||||||
boolean |
isAlwaysDrawWithFingerAndStylus()
Gets whether finger and stylus should always be able to draw annotations.
| ||||||||||
boolean |
isAnnotEditingDisabled(int annotType)
Checks whether the editing of an annot type is disabled.
| ||||||||||
boolean |
isAnnotPermissionCheckEnabled()
Gets whether annotation author permission is enabled
| ||||||||||
boolean |
isAutoResizeFreeText()
Gets whether can auto resize free text when editing
| ||||||||||
boolean |
isAutoSelectAnnotation()
Gets auto select annotation after annotation is created
| ||||||||||
boolean |
isBuiltInPageNumberIndicatorVisible()
Indicates whether to use/show the built-in page number indicator.
| ||||||||||
boolean |
isCopyAnnotatedTextToNoteEnabled()
Gets whether to copy annotated text to note
| ||||||||||
boolean |
isCreatingAnnotation()
The overload implementation of
isCreatingAnnotation() . | ||||||||||
boolean |
isDeleteEmptyFreeText()
Gets whether can delete FreeText if empty content was entered
| ||||||||||
boolean |
isDoubleTapToZoom()
Gets whether can double tap to zoom
| ||||||||||
boolean |
isEditFreeTextOnTap()
Gets whether can edit FreeText on tap
| ||||||||||
boolean |
isFreehandTimerEnabled()
Gets whether free hand annotations are saved on a timer basis.
| ||||||||||
boolean |
isInkMultiStrokeEnabled()
Gets whether multi-stroke is enabled for ink tool
| ||||||||||
boolean |
isInkSmoothingEnabled()
Gets whether to smooth ink annotation
| ||||||||||
boolean |
isInsertMultipleImagesEnabled()
Gets whether image stamp tool can insert multiple images.
| ||||||||||
boolean |
isLoupeEnabled()
Gets whether loupe is enabled or not on text markup annotation
| ||||||||||
boolean |
isMoveAnnotationBetweenPages()
Gets whether moving annotations between pages is enabled
| ||||||||||
boolean |
isNightMode()
Gets whether night mode is enabled for tools
| ||||||||||
boolean |
isOpenEditToolbarFromPan()
Gets whether edit tool will open when tools selected in pan quick menu
| ||||||||||
boolean |
isPaused()
Indicates lifecycle onPause
| ||||||||||
boolean |
isPdfContentEditingEnabled()
Gets whether to show option to edit original PDF content.
| ||||||||||
boolean |
isPersistStoreSignatureSetting()
Gets whether to use the user's last set "Store signature" setting in the
CreateSignatureFragment dialog.
| ||||||||||
boolean |
isQuickMenuDisabled()
Gets whether the long press quick menu is disabled
| ||||||||||
boolean | isQuickMenuJustClosed() | ||||||||||
boolean |
isReadOnly()
Gets whether the file associated with PDFViewCtrl is read-only.
| ||||||||||
boolean |
isRealTimeAnnotEdit()
Gets whether annotation editing is real time
| ||||||||||
boolean | isReflowTextSelectionMenuEnabled() | ||||||||||
boolean |
isRestrictedTapAnnotCreation()
Gets whether to allow tap to create annotations on another type of annotation, for example for free text and sticky note.
| ||||||||||
boolean |
isRichContentEnabledForFreeText()
Gets whether rich content is enabled for FreeText tool
| ||||||||||
boolean |
isShowAnnotIndicators()
Gets whether annotation indicator is showing for
annotations with comments
| ||||||||||
boolean |
isShowAuthorDialog()
Gets whether to show author dialog the first time when user annotates.
| ||||||||||
boolean |
isShowRichContentOption()
Gets whether to show rich content switch for FreeText tool
Note: this will only take effect on Lollipop and up.
| ||||||||||
boolean |
isShowRotateHandle()
Gets whether to show rotate handle when annotation selected
| ||||||||||
boolean |
isShowSavedSignature()
Gets whether can show saved signature in signature dialog
| ||||||||||
boolean |
isShowSignatureFromImage()
Gets whether can show pick signature from image in signature dialog
| ||||||||||
boolean |
isShowSignaturePresets()
Gets whether signature presets are shown in the signature dialog
| ||||||||||
boolean |
isShowTypedSignature()
Gets whether can show typed signature button in signature dialog
| ||||||||||
boolean |
isShowUndoRedo()
Gets whether the viewer show undo/redo buttons in the toolbar.
| ||||||||||
boolean | isSkipNextTapEvent() | ||||||||||
boolean |
isSnappingEnabledForMeasurementTools()
Gets whether snapping is enabled for measurement tools
| ||||||||||
boolean |
isStylusAsPen()
Gets whether to use stylus to draw without entering ink tool
| ||||||||||
boolean | isTextFieldCustomAppearanceEnabled() | ||||||||||
boolean |
isTextMarkupAdobeHack()
Gets whether the TextMarkup annotations are compatible with Adobe
(Adobe's quads don't follow the specification, but they don't handle quads that do).
| ||||||||||
boolean |
isToolModeDisabled(ToolManager.ToolMode toolMode)
Checks whether the specified tool mode is disabled.
| ||||||||||
boolean |
isUsingDigitalSignature()
Gets whether can use digital signature for signature widget
| ||||||||||
boolean |
isUsingPressureSensitiveSignatures()
Gets whether the viewer will use pressure sensitivity for signatures
| ||||||||||
boolean |
isfreeTextInlineToggleEnabled()
Gets whether show the FreeText inline toggle button
| ||||||||||
void |
onActionCompleted(Action action)
The overload implementation of
onActionCompleted(Action) . | ||||||||||
void |
onAnnotPainterUpdated(int page, long which, CurvePainter painter)
Called when annotation
CurvePainter has been updated. | ||||||||||
void | onAnnotStyleColorChange(ArrayList<AnnotStyle> styles) | ||||||||||
void | onAnnotStyleDismiss(AnnotStyleDialogFragment annotStyleDialog) | ||||||||||
void |
onAttachFileSelected(PointF targetPoint)
Pass the file attachment selected event.
| ||||||||||
void |
onChangePointerIcon(PointerIcon pointerIcon)
The overload implementation of
onChangePointerIcon(PointerIcon) . | ||||||||||
void |
onClose()
The overload implementation of
onClose() . | ||||||||||
void |
onConfigurationChanged(Configuration newConfig)
The overload implementation of
onConfigurationChanged(Configuration) . | ||||||||||
void |
onControlReady()
The overload implementation of
onControlReady() . | ||||||||||
void |
onCustomEvent(Object obj)
The overload implementation of
onCustomEvent(Object) . | ||||||||||
void |
onDestroy()
Called when
destroy() is called. | ||||||||||
void |
onDocumentDownloadEvent(PDFViewCtrl.DownloadState mode, int page_num, int page_downloaded, int page_count, String message)
The overload implementation of
onDocumentDownloadEvent(PDFViewCtrl.DownloadState, int, int, int, String) . | ||||||||||
boolean |
onDoubleTap(MotionEvent e)
The overload implementation of
onDoubleTap(MotionEvent) . | ||||||||||
void |
onDoubleTapEnd(MotionEvent e)
The overload implementation of
onDoubleTapEnd(MotionEvent) . | ||||||||||
boolean |
onDoubleTapEvent(MotionEvent e)
The overload implementation of
onDoubleTapEvent(MotionEvent) . | ||||||||||
void |
onDoubleTapZoomAnimationBegin()
The overload implementation of
onDoubleTapZoomAnimationBegin() . | ||||||||||
void |
onDoubleTapZoomAnimationEnd()
The overload implementation of
onDoubleTapZoomAnimationEnd() . | ||||||||||
boolean |
onDown(MotionEvent e)
The overload implementation of
onDown(MotionEvent) . | ||||||||||
void |
onDraw(Canvas canvas, Matrix tfm)
The overload implementation of
onDraw(Canvas, Matrix) . | ||||||||||
boolean |
onDrawEdgeEffects(Canvas canvas, int width, int verticalOffset)
The overload implementation of
onDrawEdgeEffects(Canvas, int, int) . | ||||||||||
void |
onFileAttachmentSelected(FileAttachment fileAttachment)
Lets various tools raise the file attachment selected event.
| ||||||||||
void |
onFileCreated(String fileLocation, ToolManager.AdvancedAnnotationListener.AnnotAction action)
Lets various tools raise the onFileCreated event.
| ||||||||||
boolean |
onFlingStop()
The overload implementation of
onFlingStop() . | ||||||||||
void |
onFreehandStylusUsedFirstTime()
Lets various tools raise the freehand stylus used for the first time event.
| ||||||||||
boolean |
onGenericMotionEvent(MotionEvent event)
The overload implementation of
onGenericMotionEvent(MotionEvent) . | ||||||||||
void |
onGoBackSelected()
Goes back to previous page when action is GoBack
| ||||||||||
void |
onImageSignatureSelected(PointF targetPoint, int targetPage, Long widget)
Pass the image signature selected event.
| ||||||||||
void |
onImageStamperSelected(PointF targetPoint)
Pass the image stamper selected event.
| ||||||||||
void |
onInkEditSelected(Annot inkAnnot, int pageNum)
Pass the ink edit selected event.
| ||||||||||
void |
onInlineFreeTextEditingStarted()
Pass inline free text editing started event.
| ||||||||||
boolean |
onKeyUp(int keyCode, KeyEvent event)
The overload implementation of
onKeyUp(int, KeyEvent) . | ||||||||||
void |
onLayout(boolean changed, int l, int t, int r, int b)
The overload implementation of
onLayout(boolean, int, int, int, int) . | ||||||||||
boolean |
onLongPress(MotionEvent e)
The overload implementation of
onLongPress(MotionEvent) . | ||||||||||
boolean |
onMove(MotionEvent e1, MotionEvent e2, float x_dist, float y_dist)
The overload implementation of
onMove(MotionEvent, MotionEvent, float, float) . | ||||||||||
boolean |
onNewFileCreated(String filePath, int pageNumber)
Opens a newly created file.
| ||||||||||
boolean |
onNewFileCreated(String filePath)
Opens a newly created file.
| ||||||||||
void |
onOpenAnnotationToolbar(ToolManager.ToolMode mode)
Called when the annotation toolbar should open for a tool
| ||||||||||
void |
onOpenEditToolbar(ToolManager.ToolMode mode)
Called when the edit toolbar should open for a tool
| ||||||||||
void |
onPageTurning(int old_page, int cur_page)
The overload implementation of
onPageTurning(int, int) . | ||||||||||
void |
onPause()
Called when
pause() is called. | ||||||||||
boolean |
onPointerDown(MotionEvent e)
The overload implementation of
onPointerDown(MotionEvent) . | ||||||||||
void |
onPostSingleTapConfirmed()
The overload implementation of
onPostSingleTapConfirmed() . | ||||||||||
void |
onPullEdgeEffects(int which_edge, float delta_distance)
The overload implementation of
onPullEdgeEffects(int, float) . | ||||||||||
boolean |
onQuickMenuClicked(QuickMenuItem menuItem)
Sets the
ToolManager.QuickMenuListener . | ||||||||||
void |
onQuickMenuDismissed()
a callback to be invoked when quick menu is dismissed
| ||||||||||
void | onQuickMenuLocationRequested() | ||||||||||
void |
onQuickMenuShown()
a callback to be invoked when quick menu is shown
| ||||||||||
void |
onReleaseEdgeEffects()
The overload implementation of
onReleaseEdgeEffects() . | ||||||||||
void |
onRenderingFinished()
The overload implementation of
onRenderingFinished() . | ||||||||||
void |
onResume()
Called when
resume() is called. | ||||||||||
void |
onSaveFileAttachmentSelected(FileAttachment fileAttachment, Intent intent)
Raise event for file attachment annotation
| ||||||||||
boolean |
onScale(float x, float y)
The overload implementation of
onScale(float, float) . | ||||||||||
boolean |
onScaleBegin(float x, float y)
The overload implementation of
onScaleBegin(float, float) . | ||||||||||
boolean |
onScaleEnd(float x, float y)
The overload implementation of
onScaleEnd(float, float) . | ||||||||||
void |
onScrollChanged(int l, int t, int oldl, int oldt)
The overload implementation of
onScrollChanged(int, int, int, int) . | ||||||||||
void |
onSetDoc()
The overload implementation of
onSetDoc() . | ||||||||||
boolean |
onShowPress(MotionEvent e)
The overload implementation of
onShowPress(MotionEvent) . | ||||||||||
boolean |
onShowQuickMenu(QuickMenu quickMenu, Annot annot)
a callback to be invoked when quick menu is about to show
| ||||||||||
boolean |
onSingleTapConfirmed(MotionEvent e)
The overload implementation of
onSingleTapConfirmed(MotionEvent) . | ||||||||||
boolean |
onSingleTapUp(MotionEvent e)
The overload implementation of
onSingleTapUp(MotionEvent) . | ||||||||||
boolean |
onUp(MotionEvent e, PDFViewCtrl.PriorEventMode priorEventMode)
The overload implementation of
onUp(MotionEvent, PDFViewCtrl.PriorEventMode) . | ||||||||||
void |
raiseAllAnnotationsRemovedEvent()
Call this function when all annotations in the document have been removed.
| ||||||||||
void |
raiseAnnotationActionEvent()
Call this function when an action has taken place that changes the document.
| ||||||||||
void |
raiseAnnotationsAddedEvent(Map<Annot, Integer> annots)
Call this function when annotations have been added to the document.
| ||||||||||
void |
raiseAnnotationsModifiedEvent(Map<Annot, Integer> annots, Bundle bundle)
Call this function when annotations in the document have been modified.
| ||||||||||
void |
raiseAnnotationsPreModifyEvent(Map<Annot, Integer> annots)
Call this function before annotations in the document are modified.
| ||||||||||
void |
raiseAnnotationsPreRemoveEvent(Map<Annot, Integer> annots)
Call this function before annotations are removed from the document.
| ||||||||||
void |
raiseAnnotationsRemovedEvent(Map<Annot, Integer> annots)
Call this function when annotations have been removed from the document.
| ||||||||||
void |
raiseAnnotationsRemovedEvent(int pageNum)
Call this function when all annotations in the specified page have been removed from the document.
| ||||||||||
void |
raiseAnnotationsRemovedEvent(Map<Annot, Integer> annots, Bundle bundle)
Call this function when annotations have been removed from the document.
| ||||||||||
void |
raiseAnnotationsSelectionChangedEvent(HashMap<Annot, Integer> annots)
Lets various tools raise the annotations selection changed event.
| ||||||||||
void |
raiseBookmarkModified(List<UserBookmarkItem> bookmarkItems)
Call this function when document bookmark has been modified.
| ||||||||||
void | raiseFullSaveRequired() | ||||||||||
boolean |
raiseInterceptAnnotationHandlingEvent(Annot annot, Bundle extra, ToolManager.ToolMode toolMode)
Handle annotation
| ||||||||||
boolean |
raiseInterceptDialogEvent(AlertDialog dialog)
This method is deprecated.
see
raiseInterceptDialogFragmentEvent(DialogFragment)
| ||||||||||
boolean |
raiseInterceptDialogFragmentEvent(DialogFragment dialogFragment)
Call this function when a dialog fragment is about to show up.
| ||||||||||
void |
raisePageLabelChangedEvent()
Call this function when the page labels have changed in this document.
| ||||||||||
void |
raisePageMoved(int from, int to)
Call this function when a page in the document have been moved to a new position.
| ||||||||||
void |
raisePagesAdded(List<Integer> pageList)
Call this function when new pages have been added to the document.
| ||||||||||
void |
raisePagesCropped()
Call this function when pages of the document have been cropped.
| ||||||||||
void |
raisePagesDeleted(List<Integer> pageList)
Call this function when pages have been deleted from the document.
| ||||||||||
void |
raisePagesMoved(List<Integer> pagesMoved, int toPage, int currentPage)
Call this function when pages in the document have been moved to a new position.
| ||||||||||
void |
raisePagesRotated(List<Integer> pageList)
Call this function when pages in the document have been rotated.
| ||||||||||
void |
raisePdfOutlineModified()
Call this function when document outline has been modified..
| ||||||||||
void |
raisePdfTextModified()
Call this function when document text content has been modified..
| ||||||||||
void |
removeActionGoBackListener(ToolManager.ActionGoBackListener listener)
Removes the
ToolManager.ActionGoBackListener . | ||||||||||
void |
removeAnnotationModificationListener(ToolManager.AnnotationModificationListener listener)
Removes the
ToolManager.AnnotationModificationListener . | ||||||||||
void |
removeAnnotationsSelectionListener(ToolManager.AnnotationsSelectionListener listener)
Removes the
ToolManager.AnnotationsSelectionListener . | ||||||||||
void |
removeFullSaveListener(ToolManager.FullSaveListener listener)
Removes the
ToolManager.FullSaveListener . | ||||||||||
void |
removeOnLayoutListener(ToolManager.OnLayoutListener listener)
Removes the
ToolManager.OnLayoutListener . | ||||||||||
void |
removePdfDocModificationListener(ToolManager.PdfDocModificationListener listener)
Removes the
ToolManager.PdfDocModificationListener . | ||||||||||
void |
removePdfOutlineModificationListener(ToolManager.PdfOutlineModificationListener listener)
Removes the
ToolManager.PdfOutlineModificationListener . | ||||||||||
void |
removePdfTextModificationListener(ToolManager.PdfTextModificationListener listener)
Removes the
ToolManager.PdfTextModificationListener . | ||||||||||
void |
removeToolChangedListener(ToolManager.ToolChangedListener listener)
Removes the
ToolManager.ToolChangedListener . | ||||||||||
void |
removeToolCreatedListener(ToolManager.ToolChangedListener listener)
Removes the
ToolManager.ToolChangedListener called when tool created. | ||||||||||
void | removeToolManagerChangedListener(ToolManager.ToolManagerChangedListener listener) | ||||||||||
void |
removeToolSetListener(ToolManager.ToolSetListener listener)
Removes the
ToolManager.ToolSetListener . | ||||||||||
void |
reselectAnnot()
Re-selects the last selected annotation
| ||||||||||
void |
resetIndicator()
Resets annotation indicators
| ||||||||||
void |
resetSkipNextTapEvent()
Resets skipping the next tap event.
| ||||||||||
Tool |
safeCreateTool(ToolManager.ToolModeBase mode)
Creates tool safely, if there is any exception, creates default tool
| ||||||||||
void |
selectAnnot(Annot annot, int pageNum)
Selects an annotation
| ||||||||||
void |
selectAnnot(String annotId, int pageNum)
Selects the annotation.
| ||||||||||
void |
setAddImageStamperTool(boolean addImageStamperTool)
Sets whether to enable image stamper tool
| ||||||||||
void |
setAdvancedAnnotationListener(ToolManager.AdvancedAnnotationListener listener)
Sets the
ToolManager.AdvancedAnnotationListener . | ||||||||||
void |
setAlwaysDrawWithFingerAndStylus(boolean alwaysDrawWithFingerAndStylus)
Sets whether finger and stylus should always be able to draw annotations.
| ||||||||||
void |
setAnnotPermissionCheckEnabled(boolean enable)
Sets whether to check annotation author permission
| ||||||||||
void |
setAnnotToolbarPrecedence(ToolMode[] toolModes)
Sets an array that determines which tool icon should show when space is limited
(portrait mode on small devices when collapsed)
| ||||||||||
void | setAnnotationPermissionListener(ToolManager.AnnotationPermissionListener annotationPermissionListener) | ||||||||||
void |
setAnnotationToolbarListener(ToolManager.AnnotationToolbarListener annotationToolbarListener)
Sets the
ToolManager.AnnotationToolbarListener . | ||||||||||
void |
setAuthorId(String authorId)
Sets the user ID used for checking whether an annotation is created by current user.
| ||||||||||
void |
setAuthorName(String authorName)
Sets the user ID used for checking whether an annotation is created by current user.
| ||||||||||
void |
setAutoResizeFreeText(boolean autoResizeFreeText)
Sets whether can auto resize free text when editing
| ||||||||||
void |
setAutoSelectAnnotation(boolean autoSelect)
Sets whether auto select annotation after annotation is created
| ||||||||||
void |
setBasicAnnotationListener(ToolManager.BasicAnnotationListener listener)
Sets the
ToolManager.BasicAnnotationListener . | ||||||||||
void |
setBuiltInPageNumberIndicatorVisible(boolean visible)
Indicates whether to use/show the built-in page number indicator.
| ||||||||||
void |
setCacheFileName(String tag)
Sets the cache file name
| ||||||||||
void |
setCanOpenEditToolbarFromPan(boolean canOpenEditToolbarFromPan)
Sets whether edit tool will open when tools selected in pan quick menu
| ||||||||||
void |
setCanResumePdfDocWithoutReloading(boolean canResumePdfDocWithoutReloading)
Sets if can resume PDF Doc without reloading.
| ||||||||||
void |
setCopyAnnotatedTextToNoteEnabled(boolean enable)
Sets whether to copy annotated text to note
| ||||||||||
void |
setCurrentActivity(FragmentActivity activity)
Set the activity to which the ToolManager is currently attached, or
null if not attached. | ||||||||||
void |
setDefaultStoreNewSignature(boolean defaultStoreNewSignature)
Sets whether "Store signature" setting in the CreateSignatureFragment dialog should
be enabled or disabled by default.
| ||||||||||
void |
setDefaultToolCLass(Class<? extends Pan> cLass)
set default tool class
| ||||||||||
void |
setDeleteEmptyFreeText(boolean deleteEmptyFreeText)
Sets whether can delete FreeText if empty content was entered
| ||||||||||
void |
setDigitalSignatureKeystorePassword(String digitalSignatureKeystore)
Sets digital signature keystore password
| ||||||||||
void |
setDigitalSignatureKeystorePath(String digitalSignatureKeystore)
Sets digital signature keystore file path
| ||||||||||
void |
setDisableQuickMenu(boolean disabled)
Sets whether disable showing the long press quick menu
| ||||||||||
void |
setDoubleTapToZoom(boolean doubleTapToZoom)
Sets whether can double tap to zoom the viewer
| ||||||||||
void | setEdgeEffectListener(ToolManager.EdgeEffectListener edgeEffectListner) | ||||||||||
void |
setEditFreeTextOnTap(boolean editFreeTextOnTap)
Sets whether can edit FreeText on tap
| ||||||||||
void |
setEditInkAnnots(boolean editInkAnnots)
Sets whether editing ink annotation should open the annotation toolbar
| ||||||||||
void |
setEraserType(Eraser.EraserType type)
Sets the type of eraser.
| ||||||||||
void | setExternalAnnotationManagerListener(ToolManager.ExternalAnnotationManagerListener externalAnnotationManagerListener) | ||||||||||
void | setFileAttachmentAnnotationListener(ToolManager.FileAttachmentAnnotationListener listener) | ||||||||||
void |
setFreeHandTimerEnabled(boolean freehandTimerEnabled)
Sets whether free hand annotations are saved on a timer basis.
| ||||||||||
void |
setFreeHighlighterAutoSmoothingRange(float autoSmoothingRange)
Sets how wide the range would be for auto smoothing vertical and horizontal strokes, in dp independent of zoom.
| ||||||||||
void |
setFreeTextFonts(Set<String> freeTextFonts)
Sets list of free text fonts to have as
options in the properties popup.
| ||||||||||
void |
setFreeTextFontsFromAssets(Set<String> fontNameList)
Sets custom font list from Assets for free text tool
if sets font list from Assets, then it is not possible to set font list from storage
The system fonts list won't load anymore
| ||||||||||
void |
setFreeTextFontsFromStorage(Set<String> fontPathList)
Sets custom font list from device storage for free text tool
if font list from Assets is not set, then it's possible to set font list from storage
The system fonts list won't load anymore
| ||||||||||
void | setFreeTextToggleButtonColorInt(int color) | ||||||||||
void |
setInkMultiStrokeEnabled(boolean multiStrokeEnabled)
Sets whether multi-stroke is enabled for ink tool
| ||||||||||
void |
setInkSmoothingEnabled(boolean enable)
Sets whether to smooth ink annotation
| ||||||||||
void |
setInsertMultipleImagesEnabled(boolean insertMultipleImagesEnabled)
Sets whether image stamp tool can insert multiple images.
| ||||||||||
void |
setLoupeEnabled(boolean loupeEnabled)
Sets whether loupe is disabled for tools
setLoupeEnabled(false) will disable the loupe on text markup annotation
| ||||||||||
void |
setMoveAnnotationBetweenPages(boolean moveAnnotBetweenPages)
Sets whether moving annotations between pages is enabled
| ||||||||||
void |
setMultiSelectMode(AnnotEditRectGroup.SelectionMode mode)
Sets the mode of multi-select tool.
| ||||||||||
void |
setNightMode(boolean isNightMode)
Sets whether night mode is enabled
| ||||||||||
void |
setOnGenericMotionEventListener(ToolManager.OnGenericMotionEventListener onGenericMotionEventListener)
Sets the
ToolManager.OnGenericMotionEventListener . | ||||||||||
void | setOnStyleChangedListener(OnAnnotStyleChangedListener onAnnotStyleChangedListener) | ||||||||||
void |
setPdfContentEditingEnabled(boolean pdfContentEditingEnabled)
Sets whether to show option to edit original PDF content.
| ||||||||||
void |
setPersistStoreSignatureSetting(boolean persistStoreSignatureSetting)
Sets whether to use the user's last set "Store signature" setting in the
CreateSignatureFragment dialog.
| ||||||||||
void |
setPreFlingListener(ToolManager.PreFlingListener listener)
Sets the
ToolManager.PreFlingListener . | ||||||||||
void |
setPreToolManagerListener(ToolManager.PreToolManagerListener listener)
Sets the
ToolManager.PreToolManagerListener . | ||||||||||
void | setPresetsListener(ToolManager.PresetsListener listener) | ||||||||||
void |
setQuickMenuJustClosed(boolean closed)
Sets whether the quick menu is just closed.
| ||||||||||
void |
setQuickMenuListener(ToolManager.QuickMenuListener listener)
Sets the
ToolManager.QuickMenuListener . | ||||||||||
void |
setReadOnly(boolean readOnly)
Indicates whether the file associated with PDFViewCtrl is read-only.
| ||||||||||
void |
setRealTimeAnnotEdit(boolean realTimeAnnotEdit)
Sets whether annotation editing is real time
| ||||||||||
void | setReflowTextSelectionMenuEnabled(boolean reflowTextSelectionMenuEnabled) | ||||||||||
void |
setRestrictedTapAnnotCreation(boolean restrictedTapAnnotCreation)
Sets whether to allow tap to create annotations on another type of annotation, for example for free text and sticky note.
| ||||||||||
void |
setRichContentEnabledForFreeText(boolean enabled)
Sets whether rich content is enabled for FreeText tool
| ||||||||||
void |
setSelectedAnnot(Annot annot, int pageNum)
Sets the selected annotation
| ||||||||||
void |
setSelectionBoxMargin(int marginInDp)
Sets the margin between selection box and annotation bounding box
| ||||||||||
void |
setShowAnnotIndicators(boolean showAnnotIndicators)
Sets whether annotation indicator is showing for
annotations with comments
| ||||||||||
void |
setShowAuthorDialog(boolean show)
Sets whether to show author dialog the first time when user annotates.
| ||||||||||
void |
setShowRichContentOption(boolean showRichContentOption)
Sets whether to show rich content switch for FreeText tool
Note: this will only take effect on Lollipop and up.
| ||||||||||
void |
setShowRotateHandle(boolean showRotateHandle)
Sets whether to show rotate handle when annotation selected
| ||||||||||
void |
setShowSavedSignatures(boolean showSavedSignature)
Sets whether can show saved signature in signature dialog
| ||||||||||
void |
setShowSignatureFromImage(boolean showSignatureFromImage)
Sets whether can show pick signature from image in signature dialog
| ||||||||||
void |
setShowSignaturePresets(boolean showSignaturePresets)
Sets whether to show color presets in the signature dialog
| ||||||||||
void |
setShowTypedSignature(boolean showTypedSignature)
Sets whether can show typed siganture button in signature dialog
| ||||||||||
void |
setShowUndoRedo(boolean showUndoRedo)
Sets whether to show undo/redo buttons in the toolbar
| ||||||||||
void |
setSignSignatureFieldsWithStamps(boolean useStamp)
For collaboration apps that requires syncing signature widget, set to true.
| ||||||||||
void |
setSignatureColors(int... signatureColors)
Sets the colors used for signing.
| ||||||||||
void |
setSkipReadOnlyCheck(boolean skipReadOnlyCheck)
Sets whether the viewer should skip read only checks on a document.
| ||||||||||
void |
setSkipSameToolCreation(boolean skipSameToolCreation)
Sets whether to skip tool creation if same tool creation is requested
| ||||||||||
void | setSnackbarListener(ToolManager.SnackbarListener listener) | ||||||||||
void |
setSnappingEnabledForMeasurementTools(boolean enabled)
Sets whether snapping is enabled for measurement tools
| ||||||||||
void |
setSnappingMode(int modeFlags)
Set the point snapping mode for the SnapToNearestInDoc method.
| ||||||||||
void | setStampDialogListener(ToolManager.StampDialogListener listener) | ||||||||||
void |
setStickyNoteShowPopup(boolean show)
Sets whether show pop up dialog when sticky note is added/ selected/ etc.
| ||||||||||
void |
setStylusAsPen(boolean stylusAsPen)
Sets whether to use stylus to draw without entering ink tool
| ||||||||||
void |
setTapToCreateShapeHalfWidth(int halfWidthInDp)
Sets the half width for tap to create shapes
| ||||||||||
void | setTextFieldCustomAppearanceEnabled(boolean enabled) | ||||||||||
void |
setTextMarkupAdobeHack(boolean enable)
Sets whether the TextMarkup annotations are compatible with Adobe
(Adobe's quads don't follow the specification, but they don't handle quads that do).
| ||||||||||
void | setThemeProvider(ThemeProvider themeProvider) | ||||||||||
void |
setTool(ToolManager.Tool t)
Sets the current
ToolManager.Tool instance. | ||||||||||
void |
setUsePressureSensitiveSignatures(boolean usePressureSensitiveSignatures)
Sets whether to use pressure sensitivity on styluses for signatures.
| ||||||||||
void |
setUsingDigitalSignature(boolean usingDigitalSignature)
Sets whether can use digital signature for signature widget
| ||||||||||
void |
showBuiltInPageNumber()
Show built in page number indicator
| ||||||||||
void |
skipNextTapEvent()
Skips the next tap event.
| ||||||||||
boolean |
skipReadOnlyCheck()
Returns whether the viewer should skip read only checks on a document.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.pdftron.pdf.PDFViewCtrl.ActionCompletedListener
| |||||||||||
From interface
com.pdftron.pdf.PDFViewCtrl.ToolManager
|
Class constructor.
pdfViewCtrl | the PDFViewCtrl . It must not be null.
|
---|
Adds the ToolManager.ActionGoBackListener
.
listener | the listener |
---|
Add an AnnotStyleProperty used to hide annotation style properties in the annotation style dialog.
annotStyleProperty | the AnnotStyleProperty used to hide annotation style properties |
---|
listener | the listener |
---|
Adds the ToolManager.AnnotationsSelectionListener
.
listener | the listener |
---|
Add a custom tool to tool class map
toolClassMap | customized tool mode and class map |
---|
Add a custom tool to tool class map
tool | customized tool. |
---|---|
params | parameter for instantiate tool |
Add a custom tool to tool class map
tool | customized tool |
---|
Add a custom tool to tool class map
toolParamMap | tool mode and tool initialize parameter map |
---|
Adds the ToolManager.DialogListener
listener | the lsitener |
---|
Adds the ToolManager.FullSaveListener
.
listener | the listener |
---|
Adds the ToolManager.OnLayoutListener
.
listener | the listener |
---|
Adds the ToolManager.PdfDocModificationListener
.
listener | the listener |
---|
listener | the listener |
---|
Adds the ToolManager.PdfTextModificationListener
.
listener | the listener |
---|
Adds the ToolManager.ToolChangedListener
.
listener | the listener |
---|
Adds the ToolManager.ToolChangedListener
called when tool created.
listener | the listener |
---|
Adds the ToolManager.ToolSetListener
.
listener | the listener |
---|
Lets various tools raise the annotation could not be add event from a unified location.
Used to force the next tool to be the default tool if previously set
Creates the default tool (Pan tool).
If instantiate default tool failed, it will create Pan
tool
Creates the specified tool and copies the necessary info from the
previous tool if provided. Calls the toolChanged(Tool, Tool)
if possible.
It showPreset is true, then the default presets are shown when using the tool.
newTool | the identifier for the tool to be created |
---|---|
currentTool | the current tool before this call |
showPreset | whether this tool should be associated with preset bundle data |
Creates the specified tool and copies the necessary info from the
previous tool if provided. Calls the toolChanged(Tool, Tool)
if possible.
newTool | the identifier for the tool to be created |
---|---|
currentTool | the current tool before this call |
Creates the specified tool and copies the necessary info from the
previous tool if provided. Calls the toolChanged(Tool, Tool)
if possible.
newTool | the identifier for the tool to be created |
---|---|
currentTool | the current tool before this call |
bundle | bundle containing metadata |
Deselects all annotations
Cleans up resources.
Disables annotation editing by type.
annotTypes | annot types to be disabled |
---|
Disables tool modes. Pan tool cannot be disabled.
toolModes | tool modes to be disabled |
---|
Gets whether editing ink annotation should open the annotation toolbar
Enables annotation editing by type.
annotTypes | annot types to be enabled |
---|
Enables annotation manager for annotation syncing
userId | the unique identifier of the current user |
---|
Enables annotation manager for annotation syncing
userId | the unique identifier of the current user |
---|---|
userName | the name of the current user |
undoMode | one of ADMIN_UNDO_OTHERS
ADMIN_UNDO_OWN |
editMode | one of EDIT_OTHERS
EDIT_OWN |
listener | the AnnotManager.AnnotationSyncingListener
|
Enables annotation manager for annotation syncing
userId | the unique identifier of the current user |
---|---|
userName | the name of current user |
listener | the AnnotManager.AnnotationSyncingListener
|
Enables annotation manager for annotation syncing
userId | the unique identifier of the current user |
---|---|
listener | the AnnotManager.AnnotationSyncingListener
|
Enable separate rendering layer for annotations. Once enabled, can no longer disable in the same session.
Enables tool modes.
toolModes | tool modes to be enabled |
---|
Sets whether to show the FreeText inline toggle button
freeTextInlineToggleEnabled | true if showing the FreeText inline toggle button, false otherwise |
---|
Returns the class associated with calculating and storing annotation snapping.
Returns list of AnnotStyleProperty used to hide elements of the AnnotStyleDialgFragment
Gets the precedence of tool mode in Annotation Toolbar
Gets the annotation at the (x, y) position expressed in screen coordinates.
Note: This method is permission aware.
x | x coordinate of the screen point |
---|---|
y | y coordinate of the screen point |
Gets the annotation toolbar height
Gets the user ID used for checking whether an annotation is created by current user.
Gets the user ID used for checking whether an annotation is created by current user.
Get the activity to which the ToolManager is currently attached, or null
if not attached.
DO NOT HOLD LONG-LIVED REFERENCES TO THE OBJECT RETURNED BY THIS METHOD, AS THIS WILL CAUSE
MEMORY LEAKS.
Gets whether "Store signature" setting in the CreateSignatureFragment dialog should be enabled or disabled by default.
See setDefaultStoreNewSignature(boolean)
for details.
Gets digital signature keystore file path
Gets digital signature keystore password
Gets how wide the range would be for auto smoothing vertical and horizontal strokes, in pixel.
Gets the list of free text fonts to have as options in the properties popup (Gets whiteList fonts among the PDFNet system fonts)
Gets custom font list from Assets for free text tool
Gets custom font list from Storage for free text tool
Gets the mode of multi-select tool.
Gets the identification of the selected annotation
Gets the page number of selected annotation
Gets the margin between selection box and annotation bounding box
Returns the colors used for signing.
Returns the class associated with handling drawing and calculating snapping modes.
Gets snapping modes for measurement tools
Gets whether shows stick note pop up dialog
Gets the Text To Speech object
Gets the half width for tap to create shapes
Gets the toolbar height
Gets whether precedence is set in Annotation Toolbar
Whether ToolManager is currently attached with an activity
Hide built in page number indicator
Initialize system Text To Speech
Gets whether finger and stylus should always be able to draw annotations.
Checks whether the editing of an annot type is disabled.
annotType | The annot type |
---|
Gets whether annotation author permission is enabled
Gets whether can auto resize free text when editing
Gets auto select annotation after annotation is created
Indicates whether to use/show the built-in page number indicator.
Gets whether to copy annotated text to note
Gets whether can delete FreeText if empty content was entered
Gets whether can double tap to zoom
Gets whether can edit FreeText on tap
Gets whether free hand annotations are saved on a timer basis. This flag is ignored if isInkMultiStrokeEnabled() returns false.
Gets whether multi-stroke is enabled for ink tool
Gets whether to smooth ink annotation
Gets whether image stamp tool can insert multiple images.
Gets whether loupe is enabled or not on text markup annotation
Gets whether moving annotations between pages is enabled
Gets whether night mode is enabled for tools
Gets whether edit tool will open when tools selected in pan quick menu
Indicates lifecycle onPause
Gets whether to show option to edit original PDF content.
Gets whether to use the user's last set "Store signature" setting in the CreateSignatureFragment dialog.
Gets whether the long press quick menu is disabled
Gets whether the file associated with PDFViewCtrl is read-only.
Gets whether annotation editing is real time
Gets whether to allow tap to create annotations on another type of annotation, for example for free text and sticky note.
Gets whether rich content is enabled for FreeText tool
Gets whether annotation indicator is showing for annotations with comments
Gets whether to show author dialog the first time when user annotates.
Gets whether to show rich content switch for FreeText tool Note: this will only take effect on Lollipop and up.
Gets whether to show rotate handle when annotation selected
Gets whether can show saved signature in signature dialog
Gets whether can show pick signature from image in signature dialog
Gets whether signature presets are shown in the signature dialog
Gets whether can show typed signature button in signature dialog
Gets whether the viewer show undo/redo buttons in the toolbar.
Gets whether snapping is enabled for measurement tools
Gets whether to use stylus to draw without entering ink tool
Gets whether the TextMarkup annotations are compatible with Adobe (Adobe's quads don't follow the specification, but they don't handle quads that do).
Checks whether the specified tool mode is disabled.
toolMode | The tool mode |
---|
Gets whether can use digital signature for signature widget
Gets whether the viewer will use pressure sensitivity for signatures
Gets whether show the FreeText inline toggle button
The overload implementation of onActionCompleted(Action)
.
action | the action which was completed |
---|
Called when annotation CurvePainter
has been updated.
Called from background thread.
page | the page number |
---|---|
which | the annotation key |
Pass the file attachment selected event.
targetPoint | target location to add the image stamp |
---|
The overload implementation of onChangePointerIcon(PointerIcon)
.
pointerIcon | The pointer icon |
---|
The overload implementation of onConfigurationChanged(Configuration)
.
newConfig | the new device configuration |
---|
The overload implementation of onCustomEvent(Object)
.
obj | the Object passed in when calling #postCustomEvent(Object). |
---|
The overload implementation of onDocumentDownloadEvent(PDFViewCtrl.DownloadState, int, int, int, String)
.
mode | the state of the update. |
---|---|
page_num | the number of the page that was just downloaded. Meaningful if type is DownloadState#PAGE. |
page_downloaded | the total number of pages that have been downloaded |
page_count | the page count of the associated document |
message | error message in case the download has failed |
The overload implementation of onDoubleTap(MotionEvent)
.
The overload implementation of onDoubleTapEnd(MotionEvent)
.
The overload implementation of onDoubleTapEvent(MotionEvent)
.
The overload implementation of onDoubleTapZoomAnimationBegin()
.
The overload implementation of onDoubleTapZoomAnimationEnd()
.
The overload implementation of onDown(MotionEvent)
.
The overload implementation of onDraw(Canvas, Matrix)
.
canvas | The android.graphics.Canvas object to draw on PDFViewCtrl. |
---|---|
tfm | The extra transformation matrix applied to 'canvas'. This matrix is normally an identity matrix unless when the built-in page sliding is in process. The inverse of this matrix can be temporarily applied to 'canvas' in order to make the content drawn in this function appear stationary during sliding. |
The overload implementation of onDrawEdgeEffects(Canvas, int, int)
.
canvas | canvas used to draw edge effect |
---|---|
width | width of the edge effect |
verticalOffset | vertical offset to draw edge effect |
Lets various tools raise the file attachment selected event.
fileAttachment | the selected file attachment |
---|
Lets various tools raise the onFileCreated event.
fileLocation | file location |
---|---|
action | Annotation action associated with the raised event |
The overload implementation of onFlingStop()
.
Lets various tools raise the freehand stylus used for the first time event.
The overload implementation of onGenericMotionEvent(MotionEvent)
.
event | the up motion event |
---|
Goes back to previous page when action is GoBack
Pass the image signature selected event.
targetPoint | target page location to add the image signature |
---|---|
targetPage | target page number to add the image signature |
widget | target form widget to add the image signature (only one of target point or widget will be valid) |
Pass the image stamper selected event.
targetPoint | target location to add the image stamp |
---|
Pass the ink edit selected event.
inkAnnot | the ink annotation to be modified |
---|
Pass inline free text editing started event.
The overload implementation of onKeyUp(int, KeyEvent)
.
keyCode | A key code that represents the button pressed, from android.view.KeyEvent. |
---|---|
event | The KeyEvent object that defines the button action. |
The overload implementation of onLayout(boolean, int, int, int, int)
.
changed | This is a new size or position for this view. |
---|---|
l | Left position, relative to parent. |
t | Top position, relative to parent. |
r | Right position, relative to parent. |
b | Bottom position, relative to parent. |
The overload implementation of onLongPress(MotionEvent)
.
The overload implementation of onMove(MotionEvent, MotionEvent, float, float)
.
Opens a newly created file.
filePath | local file path of the document |
---|---|
pageNumber | the initial page number to scroll to when the document is opened |
Opens a newly created file.
filePath | local file path of the document |
---|
Called when the annotation toolbar should open for a tool
mode | the tool mode |
---|
Called when the edit toolbar should open for a tool
mode | the tool mode |
---|
The overload implementation of onPageTurning(int, int)
.
The overload implementation of onPointerDown(MotionEvent)
.
The overload implementation of onPullEdgeEffects(int, float)
.
which_edge | -1 for left edge, 1 for right edge |
---|---|
delta_distance | distance of edge effect |
Sets the ToolManager.QuickMenuListener
.
menuItem | the menu item. See: QuickMenuItem
|
---|
a callback to be invoked when quick menu is dismissed
a callback to be invoked when quick menu is shown
Raise event for file attachment annotation
The overload implementation of onScale(float, float)
.
The overload implementation of onScaleBegin(float, float)
.
The overload implementation of onScaleEnd(float, float)
.
The overload implementation of onScrollChanged(int, int, int, int)
.
l | current horizontal scroll origin |
---|---|
t | current vertical scroll origin |
oldl | previous horizontal scroll origin |
oldt | previous vertical scroll origin |
The overload implementation of onShowPress(MotionEvent)
.
a callback to be invoked when quick menu is about to show
The overload implementation of onSingleTapConfirmed(MotionEvent)
.
The overload implementation of onSingleTapUp(MotionEvent)
.
The overload implementation of onUp(MotionEvent, PDFViewCtrl.PriorEventMode)
.
e | the up motion event |
---|---|
priorEventMode | indicates the prior event type. |
Call this function when all annotations in the document have been removed.
Call this function when an action has taken place that changes the document.
Call this function when annotations have been added to the document.
annots | map of annotations added |
---|
Call this function when annotations in the document have been modified.
annots | map of annotations modified |
---|
Call this function before annotations in the document are modified.
annots | map of annotations about to be modified |
---|
Call this function before annotations are removed from the document.
annots | map of annotations about to be removed |
---|
Call this function when annotations have been removed from the document.
annots | map of annotations removed |
---|
Call this function when all annotations in the specified page have been removed from the document.
pageNum | The page number where the annotations are on |
---|
Call this function when annotations have been removed from the document.
annots | map of annotations removed |
---|---|
bundle | The Bundle containing additional metadata for the event |
Lets various tools raise the annotations selection changed event.
annots | the selected annotations |
---|
Call this function when document bookmark has been modified.
bookmarkItems | the new bookmarks after modification |
---|
Handle annotation
annot | annotation |
---|---|
extra | |
toolMode | tool mode |
This method is deprecated.
see raiseInterceptDialogFragmentEvent(DialogFragment)
Call this function when a dialog is about to show up.
Call this function when a dialog fragment is about to show up.
Call this function when the page labels have changed in this document.
Call this function when a page in the document have been moved to a new position.
Call this function when new pages have been added to the document.
Call this function when pages of the document have been cropped.
Call this function when pages have been deleted from the document.
Call this function when pages in the document have been moved to a new position.
Call this function when pages in the document have been rotated.
Call this function when document outline has been modified..
Call this function when document text content has been modified..
Removes the ToolManager.ActionGoBackListener
.
listener | the listener |
---|
Removes the ToolManager.AnnotationModificationListener
.
listener | the listener |
---|
Removes the ToolManager.AnnotationsSelectionListener
.
listener | the listener |
---|
Removes the ToolManager.FullSaveListener
.
listener | the listener |
---|
Removes the ToolManager.OnLayoutListener
.
listener | the listener |
---|
Removes the ToolManager.PdfDocModificationListener
.
listener | the listener |
---|
Removes the ToolManager.PdfOutlineModificationListener
.
listener | the listener |
---|
Removes the ToolManager.PdfTextModificationListener
.
listener | the listener |
---|
Removes the ToolManager.ToolChangedListener
.
listener | the listener |
---|
Removes the ToolManager.ToolChangedListener
called when tool created.
listener | the listener |
---|
Removes the ToolManager.ToolSetListener
.
listener | the listener |
---|
Re-selects the last selected annotation
Resets annotation indicators
Resets skipping the next tap event.
Creates tool safely, if there is any exception, creates default tool
mode | tool mode |
---|
Selects an annotation
annot | the annotation |
---|---|
pageNum | the page number where the annotation is on |
Selects the annotation.
annotId | The annotation ID |
---|---|
pageNum | The page number where the annotation is on |
Sets whether to enable image stamper tool
addImageStamperTool | if true, image stamper tool will be available |
---|
Sets the ToolManager.AdvancedAnnotationListener
.
listener | the listener |
---|
Sets whether finger and stylus should always be able to draw annotations.
alwaysDrawWithFingerAndStylus | true if enabled. Default to false. |
---|
Sets whether to check annotation author permission
enable | if true, annotation created by user A cannot be modified by user B, else anyone can modify any annotation |
---|
Sets an array that determines which tool icon should show when space is limited (portrait mode on small devices when collapsed)
toolModes | the tool modes in the order of importance |
---|
Sets the ToolManager.AnnotationToolbarListener
.
annotationToolbarListener | the listener |
---|
Sets the user ID used for checking whether an annotation is created by current user.
authorId | author identification |
---|
Sets the user ID used for checking whether an annotation is created by current user.
authorName | author name |
---|
Sets whether can auto resize free text when editing
autoResizeFreeText | if true can auto resize, false otherwise |
---|
Sets whether auto select annotation after annotation is created
autoSelect | if true, after creating annotation, it will auto select it and show quick menu |
---|
Sets the ToolManager.BasicAnnotationListener
.
listener | the listener |
---|
Indicates whether to use/show the built-in page number indicator.
visible | true to show the built-in page number indicator, false otherwise. |
---|
Sets the cache file name
tag | The tag which will be used to generate cache file name |
---|
Sets whether edit tool will open when tools selected in pan quick menu
canOpenEditToolbarFromPan | if true, click tools from quick menu will open the edit toolbar in pan mode, false otherwise |
---|
Sets if can resume PDF Doc without reloading.
canResumePdfDocWithoutReloading | True if can resume PDF Doc without reloading |
---|
Sets whether to copy annotated text to note
enable | enable copy annotated text to note |
---|
Set the activity to which the ToolManager is currently attached, or null
if not attached.
Sets whether "Store signature" setting in the CreateSignatureFragment dialog should be enabled or disabled by default.
If isPersistStoreSignatureSetting()
is true, then this default value is used the
very first time the user creates a new signature. When the user creates the next
signatures, this value is ignored and instead will read their last used "Store signature" setting.
If isPersistStoreSignatureSetting()
is false, then this default
value is used every time the user creates a new signature
Default true.
defaultStoreNewSignature | true if show saved signatures, false otherwise |
---|
set default tool class
cLass | default tool class |
---|
Sets whether can delete FreeText if empty content was entered
deleteEmptyFreeText | true if delete FreeText if empty content was entered, false otherwise |
---|
Sets digital signature keystore password
Sets digital signature keystore file path
Sets whether disable showing the long press quick menu
disabled | if true, disable showing the long press quick menu |
---|
Sets whether can double tap to zoom the viewer
doubleTapToZoom | if true, can double tap to zoom, false otherwise |
---|
Sets whether can edit FreeText on tap
editFreeTextOnTap | true if start edit on tap, false otherwise |
---|
Sets whether editing ink annotation should open the annotation toolbar
editInkAnnots | if true, can edit ink annotation via annotation toolbar, false otherwise |
---|
Sets the type of eraser.
type | the type of eraser |
---|
listener | the listener |
---|
Sets whether free hand annotations are saved on a timer basis. This flag is ignored if isInkMultiStrokeEnabled() returns false.
freehandTimerEnabled | true if enabled. Default to true. |
---|
Sets how wide the range would be for auto smoothing vertical and horizontal strokes, in dp independent of zoom.
autoSmoothingRange | indicating how wide is the range to auto smooth vertical and horizontal strokes, in dp. |
---|
Sets list of free text fonts to have as options in the properties popup. (Sets whiteList fonts among the PDFNet system fonts)
Sets custom font list from Assets for free text tool if sets font list from Assets, then it is not possible to set font list from storage The system fonts list won't load anymore
fontNameList | array of custom font's absolute path from Assets |
---|
Sets custom font list from device storage for free text tool if font list from Assets is not set, then it's possible to set font list from storage The system fonts list won't load anymore
fontPathList | array of custom font's absolute path from device storage |
---|
Sets whether multi-stroke is enabled for ink tool
multiStrokeEnabled | true if enabled. Default to true. |
---|
Sets whether to smooth ink annotation
enable | enable ink smoothing |
---|
Sets whether image stamp tool can insert multiple images.
insertMultipleImagesEnabled | true if enabled. Default to false. |
---|
Sets whether loupe is disabled for tools setLoupeEnabled(false) will disable the loupe on text markup annotation
loupeEnabled | true if enabled. Default to true. |
---|
Sets whether moving annotations between pages is enabled
moveAnnotBetweenPages | true if enabled. Default to false. |
---|
Sets the mode of multi-select tool.
mode | the mode of multi-select tool |
---|
Sets whether night mode is enabled
isNightMode | enable night mode for tools |
---|
Sets the ToolManager.OnGenericMotionEventListener
.
onGenericMotionEventListener | the listener |
---|
Sets whether to show option to edit original PDF content.
pdfContentEditingEnabled | true if show option to edit original PDF content. Default to false. |
---|
Sets whether to use the user's last set "Store signature" setting in the CreateSignatureFragment dialog.
Default true.
persistStoreSignatureSetting | true if "Store signature" setting should persist the next time a user creates signature, false otherwise |
---|
Sets the ToolManager.PreFlingListener
.
listener | the listener |
---|
Sets the ToolManager.PreToolManagerListener
.
listener | the listener |
---|
Sets whether the quick menu is just closed.
closed | True if the quick menu is just closed |
---|
Sets the ToolManager.QuickMenuListener
.
listener | the listener |
---|
Indicates whether the file associated with PDFViewCtrl is read-only.
Sets whether annotation editing is real time
realTimeAnnotEdit | true if real time, false otherwise |
---|
Sets whether to allow tap to create annotations on another type of annotation, for example for free text and sticky note.
restrictedTapAnnotCreation | true if creating tap type annotations is not allowed on other type of annotations. Default to false. |
---|
Sets whether rich content is enabled for FreeText tool
enabled | true if enabled, false otherwise Note: this will only take effect on Lollipop and up. |
---|
Sets the selected annotation
annot | the annotation |
---|---|
pageNum | the page number where the annotation is on |
Sets the margin between selection box and annotation bounding box
marginInDp | the margin in DP, default to 16dp. |
---|
Sets whether annotation indicator is showing for annotations with comments
showAnnotIndicators | true if enabled, false otherwise |
---|
Sets whether to show author dialog the first time when user annotates.
Sets whether to show rich content switch for FreeText tool Note: this will only take effect on Lollipop and up.
showRichContentOption | true if show switch, false otherwise |
---|
Sets whether to show rotate handle when annotation selected
showRotateHandle | true if rotation handle should be shown. Default to true. |
---|
Sets whether can show saved signature in signature dialog
showSavedSignature | true if show saved signatures, false otherwise |
---|
Sets whether can show pick signature from image in signature dialog
showSignatureFromImage | true if show pick from image button, false otherwise |
---|
Sets whether to show color presets in the signature dialog
showSignaturePresets | true if color presets should be shown in the signature dialog, false otherwise |
---|
Sets whether can show typed siganture button in signature dialog
showTypedSignature | true if show typed signature button button, false otherwise |
---|
Sets whether to show undo/redo buttons in the toolbar
showUndoRedo | true if showing undo/redo buttons in the toolbar. |
---|
For collaboration apps that requires syncing signature widget, set to true.
Sets the colors used for signing. Minimum one color and maximum three colors, any additional colors are ignored.
When set, users will not be able to change these colors through the annotation style dialog.
signatureColors | color resources used for creating signatures. |
---|
Sets whether the viewer should skip read only checks on a document. Default false.
skipReadOnlyCheck | True if viewer should skip read only check, false otherwise |
---|
Sets whether to skip tool creation if same tool creation is requested
skipSameToolCreation | true if current tool will be returned
by createTool(ToolModeBase, Tool)
when new tool mode is the same as current tool mode.
Default to false.
|
---|
Sets whether snapping is enabled for measurement tools
enabled | true if enabled, false otherwise |
---|
Set the point snapping mode for the SnapToNearestInDoc method. By default SnapToNearestInDoc will snap to line endpoints, midpoints, and intersections.
modeFlags | a bitwise combination of the members of `GeometryCollection.SnappingMode` |
---|
Sets whether show pop up dialog when sticky note is added/ selected/ etc.
show | if true, show sticky note pop up when sticky note is created/ prepare to modify |
---|
Sets whether to use stylus to draw without entering ink tool
stylusAsPen | enable inking with stylus in pan mode |
---|
Sets the half width for tap to create shapes
halfWidthInDp | the half width in dp, default to 50dp |
---|
Sets whether the TextMarkup annotations are compatible with Adobe (Adobe's quads don't follow the specification, but they don't handle quads that do).
Sets the current ToolManager.Tool
instance.
There are two ways to set the current tool. One is via createTool(ToolModeBase, com.pdftron.pdf.tools.ToolManager.Tool)
,
which is used during events. The other way is through this method, which
allows for setting the tool without any events.
Sets whether to use pressure sensitivity on styluses for signatures.
usePressureSensitiveSignatures | true if using pressure sensitivity for signatures. |
---|
Sets whether can use digital signature for signature widget
usingDigitalSignature | true if can use digital signature |
---|
Show built in page number indicator
Skips the next tap event.
Returns whether the viewer should skip read only checks on a document.