java.lang.Object | |
↳ | com.pdftron.pdf.config.ToolManagerBuilder |
ToolManagerBuilder is a helper for constructing ToolManager
with xml configuration and
set ToolManager
to PDFViewCtrl
For example, you can initialize ToolManager as following:
ToolManager toolManager = ToolManagerBuilder .from() .build(getActivity(), mPDFViewCtrl);where
mPDFViewCtrl
is an instance of PDFViewCtrl
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public static final Creator<ToolManagerBuilder> | CREATOR |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ToolManagerBuilder |
addAnnotStyleProperty(AnnotStyleProperty annotStyleProperty)
Add an AnnotStyleProperty used to hide annotation style properties in the annotation style dialog.
| ||||||||||
ToolManagerBuilder |
addCustomizedTool(Tool tool, Object... params)
Add customized tool
| ||||||||||
ToolManagerBuilder |
addCustomizedTool(ToolManager.ToolModeBase toolMode, Class<? extends Tool> toolClass, Object... params)
Add customized tool
| ||||||||||
ToolManagerBuilder |
addCustomizedTool(ToolManager.ToolModeBase toolMode, Class<? extends Tool> toolClass)
Add customized tool
| ||||||||||
ToolManagerBuilder |
addCustomizedTool(Tool tool)
Add customized tool
| ||||||||||
ToolManager |
build(PdfViewCtrlTabBaseFragment fragment)
Building tool manager by given
PdfViewCtrlTabFragment2
or PdfViewCtrlTabFragment2 and sets fragment listener | ||||||||||
ToolManager |
build(FragmentActivity activity, PDFViewCtrl pdfViewCtrl)
Building tool manager by given
PDFViewCtrl | ||||||||||
int | describeContents() | ||||||||||
ToolManagerBuilder |
disableAnnotEditing(int[] annotTypes)
Disable editing by annot type in tool manager
| ||||||||||
ToolManagerBuilder |
disableToolModes(ToolMode[] toolModes)
Disable tool modes in tool manager
| ||||||||||
ToolManagerBuilder |
disableUpdateModifyDateAnnotTypes(int[] annotTypes)
Disable updating last modified date by annot type in tool manager
| ||||||||||
ToolManagerBuilder |
disableUpdateModifyDateFieldTypes(int[] fieldTypes)
Disable updating last modified date by widget field type in tool manager
| ||||||||||
ToolManagerBuilder |
freeTextInlineToggleEnabled(boolean freeTextInlineToggleEnabled)
Sets whether to show the FreeText inline toggle button
| ||||||||||
static ToolManagerBuilder |
from()
Creates a new ToolManagerBuilder for constructing
ToolManager . | ||||||||||
static ToolManagerBuilder |
from(Context context, int styleRes)
Creates a new ToolManagerBuilder for constructing
ToolManager . | ||||||||||
Set<ToolManager.ToolMode> | getDisabledToolModes(Context context) | ||||||||||
boolean | getShowUndoRedo() | ||||||||||
ToolManagerBuilder |
setAddImage(boolean addImage)
Sets whether user can add stamper image
| ||||||||||
ToolManagerBuilder |
setAlwaysDrawWithFingerAndStylus(boolean alwaysDrawWithFingerAndStylus)
Sets whether finger and stylus should always be able to draw annotations.
| ||||||||||
ToolManagerBuilder |
setAnnotPermission(boolean annotPermission)
Sets whether to check annotation author permission
| ||||||||||
ToolManagerBuilder |
setAnnotToolbarPrecedence(ToolMode[] toolModes)
This method is deprecated.
this property is no longer in use for the new UI
use
addToolbarBuilder(AnnotationToolbarBuilder) instead
An array that determines which tool icon should show when space is limited
(portrait mode on small devices when collapsed)
| ||||||||||
ToolManagerBuilder |
setAnnotationLayerEnabled(boolean annotationLayerEnabled)
Sets whether to enable annotation layer
| ||||||||||
ToolManagerBuilder |
setAutoResizeFreeText(boolean autoResizeFreeText)
Sets whether can auto resize free text when editing
| ||||||||||
ToolManagerBuilder |
setAutoSelect(boolean autoSelect)
Sets whether auto select annotation after annotation is created
| ||||||||||
ToolManagerBuilder |
setBuildInPageIndicator(boolean buildInPageIndicator)
Indicates whether to use/show the built-in page number indicator.
| ||||||||||
ToolManagerBuilder |
setCopyAnnot(boolean copyAnnot)
Sets whether to copy annotated text to note.
| ||||||||||
ToolManagerBuilder |
setDefaultStoreNewSignature(boolean defaultStoreNewSignature)
Sets whether "Store signature" setting in the CreateSignatureFragment dialog should
be enabled or disabled by default.
| ||||||||||
ToolManagerBuilder |
setDigitalSignatureKeystorePassword(String digitalSignatureKeystorePassword)
Sets the digital signature keystore password
| ||||||||||
ToolManagerBuilder |
setDigitalSignatureKeystorePath(String digitalSignatureKeystorePath)
Sets the digital signature keystore file path
| ||||||||||
ToolManagerBuilder |
setDisableEditingAnnotTypesId(int disableEditingAnnotId)
Sets disabled editing annot type reference int id
| ||||||||||
ToolManagerBuilder |
setDisableQuickMenu(boolean disableQuickMenu)
Sets whether disable showing the long press quick menu
| ||||||||||
ToolManagerBuilder |
setDisableToolModesId(int disableToolModesId)
Sets disabled tool modes reference array id
| ||||||||||
ToolManagerBuilder |
setDoubleTapToZoom(boolean doubleTapToZoom)
Sets whether can double tap to zoom.
| ||||||||||
ToolManagerBuilder |
setEditFreeTextOnTap(boolean editFreeTextOnTap)
Sets whether can edit freetext annotation on tap
| ||||||||||
ToolManagerBuilder |
setEditInk(boolean editInk)
Sets whether user can edit ink annotation
| ||||||||||
ToolManagerBuilder |
setEraserType(Eraser.EraserType type)
Sets the eraser type.
| ||||||||||
ToolManagerBuilder |
setFreeHandTimerEnabled(boolean freehandTimerEnabled)
Sets whether free hand annotations are saved on a timer basis.
| ||||||||||
ToolManagerBuilder |
setFreeHighlighterAutoSmoothingRange(float autoSmoothingRange)
Sets how wide the range would be for auto smoothing vertical and horizontal strokes, in dp independent of zoom.
| ||||||||||
ToolManagerBuilder |
setFreeTextFontsFromAssets(String[] fontsName)
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
| ||||||||||
ToolManagerBuilder |
setFreeTextFontsFromStorage(String[] fontsPath)
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
| ||||||||||
ToolManagerBuilder |
setInkMultiStrokeEnabled(boolean inkMultiStrokeEnabled)
Sets whether multi-stroke is enabled for ink tool
| ||||||||||
ToolManagerBuilder |
setInkSmoothing(boolean inkSmoothing)
Sets whether to smooth ink annotation.
| ||||||||||
ToolManagerBuilder |
setInsertMultipleImagesEnabled(boolean insertMultipleImagesEnabled)
Sets whether image stamp tool can insert multiple images.
| ||||||||||
ToolManagerBuilder |
setLoupeEnabled(boolean loupeEnabled)
Sets the magnifying loupe when using text markup.
| ||||||||||
ToolManagerBuilder |
setMoveAnnotationBetweenPages(boolean moveAnnotBetweenPages)
Sets whether to allow moving annotations between pages
| ||||||||||
ToolManagerBuilder |
setMultiSelectMode(AnnotEditRectGroup.SelectionMode mode)
Sets the multi-select mode.
| ||||||||||
ToolManagerBuilder |
setOpenToolbar(boolean openToolbar)
Sets whether ink tool will open annotation toolbar
| ||||||||||
ToolManagerBuilder |
setPdfContentEditingEnabled(boolean pdfContentEditingEnabled)
Sets whether to show option to edit original PDF content.
| ||||||||||
ToolManagerBuilder |
setPersistStoreSignatureSetting(boolean persistStoreSignatureSetting)
Sets whether to use the user's last set "Store signature" setting in the
CreateSignatureFragment dialog.
| ||||||||||
ToolManagerBuilder |
setRealTimeAnnotEdit(boolean realTimeAnnotEdit)
Sets whether annotation editing is real time
| ||||||||||
ToolManagerBuilder |
setRestrictedTapAnnotCreation(boolean restrictedTapAnnotCreation)
Sets whether to allow tap to create annotations on another type of annotation, for example for free text and sticky note.
| ||||||||||
ToolManagerBuilder |
setSelectionBoxMargin(int selectionBoxMargin)
Sets the margin between annotation bounding box and selection box.
| ||||||||||
ToolManagerBuilder |
setShowAnnotIndicator(boolean showAnnotIndicator)
Sets whether can show indicator for annotations with comments
| ||||||||||
ToolManagerBuilder |
setShowAuthor(boolean showAuthor)
ets whether to show author dialog the first time when user annotates.
| ||||||||||
ToolManagerBuilder |
setShowRichContentOption(boolean showRichContentOption)
Sets whether to show rich content switch for FreeText.
| ||||||||||
ToolManagerBuilder |
setShowRotateHandle(boolean showRotateHandle)
Sets whether to show rotate handle when annotation selected
| ||||||||||
ToolManagerBuilder |
setShowSavedSignatures(boolean showSavedSignatures)
Sets whether can show saved signature in signature dialog
| ||||||||||
ToolManagerBuilder |
setShowSignatureFromImage(boolean showSignatureFromImage)
Sets whether can show pick from image in signature dialog
| ||||||||||
ToolManagerBuilder |
setShowSignaturePresets(boolean showSignaturePresets)
Sets whether to show color presets in the signature dialog
| ||||||||||
ToolManagerBuilder |
setShowTypedSignature(boolean showTypedSignature)
Sets whether can show typed signature button in signature dialog
| ||||||||||
ToolManagerBuilder |
setShowUndoRedo(boolean showUndoRedo)
Sets whether to show undo/redo buttons in the toolbar.
| ||||||||||
ToolManagerBuilder |
setSignatureColors(int... signatureColors)
Sets the colors used for signing.
| ||||||||||
ToolManagerBuilder |
setSnappingModes(SnappingMode[] modeFlags)
Set the point snapping mode for the SnapToNearestInDoc method.
| ||||||||||
ToolManagerBuilder |
setStyle(Context context, int styleRes)
Sets configuration to tool manager
| ||||||||||
ToolManagerBuilder |
setStylusAsPen(boolean stylusAsPen)
Sets whether to use stylus to draw without entering ink tool.
| ||||||||||
ToolManagerBuilder |
setTapToCreateShapeHalfWidth(int tapToCreateHalfWidth)
Sets the half width for tap to create shapes
| ||||||||||
ToolManagerBuilder |
setTextMarkupAdobeHack(boolean textMarkupAdobeHack)
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).
| ||||||||||
ToolManagerBuilder |
setUseDigitalSignature(boolean useDigitalSignature)
Sets whether to use digital signature instead of signature
| ||||||||||
ToolManagerBuilder |
setUsePressureSensitiveSignatures(boolean usePressureSensitiveSignatures)
Sets whether to use pressure sensitivity on styluses for signatures.
| ||||||||||
void | writeToParcel(Parcel dest, int flags) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
|
Add an AnnotStyleProperty used to hide annotation style properties in the annotation style dialog.
annotStyleProperty | the AnnotStyleProperty used to hide annotation style properties |
---|
Add customized tool
tool | customized tool. |
---|---|
params | parameter for instantiate tool |
Add customized tool
toolMode | customized tool mode. |
---|---|
toolClass | The customized tool mode class |
params | parameter for instantiate tool |
Add customized tool
toolMode | The customized tool mode |
---|---|
toolClass | The customized tool mode class |
Add customized tool
tool | The customized tool |
---|
Building tool manager by given PdfViewCtrlTabFragment2
or PdfViewCtrlTabFragment2
and sets fragment listener
fragment | The PdfViewCtrlTabFragment2 |
---|
Building tool manager by given PDFViewCtrl
pdfViewCtrl | The pdfviewCtrl |
---|
Disable editing by annot type in tool manager
annotTypes | disabled editing of annot types |
---|
Disable tool modes in tool manager
toolModes | disabled tool modes |
---|
Disable updating last modified date by annot type in tool manager
annotTypes | annot types |
---|
Disable updating last modified date by widget field type in tool manager
fieldTypes | field types |
---|
Sets whether to show the FreeText inline toggle button
freeTextInlineToggleEnabled | true showing the FreeText inline toggle button. Default to true. |
---|
Creates a new ToolManagerBuilder for constructing ToolManager
.
Creates a new ToolManagerBuilder for constructing ToolManager
.
context | The context |
---|---|
styleRes | style resource that contains tool manager configuration |
Sets whether user can add stamper image
addImage | true then able to add image, false other wise. Default to true. |
---|
Sets whether finger and stylus should always be able to draw annotations.
Sets whether to check annotation author permission
annotPermission | if true, annotation created by user A cannot be modified by user B, else anyone can modify any annotation. Default to false. |
---|
This method is deprecated.
this property is no longer in use for the new UI
use addToolbarBuilder(AnnotationToolbarBuilder)
instead
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 whether to enable annotation layer
annotationLayerEnabled | true if annotation layer is enabled, false otherwise. Default to false. |
---|
Sets whether can auto resize free text when editing
autoResizeFreeText | if true can auto resize, false otherwise. Default to false. |
---|
Sets whether auto select annotation after annotation is created
autoSelect | if true, after creating annotation, it will auto select it and show quick menu. Default to true. |
---|
Indicates whether to use/show the built-in page number indicator.
buildInPageIndicator | true to show the built-in page number indicator, false otherwise. Default to false. |
---|
Sets whether to copy annotated text to note. Default to true.
copyAnnot | enable copy annotated text to note |
---|
Sets whether "Store signature" setting in the CreateSignatureFragment dialog should be enabled or disabled by default.
If persistStoreSignatureSetting 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 persistStoreSignatureSetting 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 |
---|
Sets the digital signature keystore password
digitalSignatureKeystorePassword | the keystore password |
---|
Sets the digital signature keystore file path
digitalSignatureKeystorePath | the keystore file path |
---|
Sets disabled editing annot type reference int id
disableEditingAnnotId | disabled editing of annotation type int array id |
---|
Sets whether disable showing the long press quick menu
disableQuickMenu | if true, disable showing the long press quick menu. Default to false. |
---|
Sets disabled tool modes reference array id
disableToolModesId | disabled tool modes string array id |
---|
Sets whether can double tap to zoom. Default to true.
doubleTapToZoom | if true, can double tap to zoom, false otherwise |
---|
Sets whether can edit freetext annotation on tap
editFreeTextOnTap | true if tap will start edit FreeText, false otherwise. Default to false. |
---|
Sets whether user can edit ink annotation
editInk | true then able to edit ink, false other wise. Default to true. |
---|
Sets the eraser type.
type | the Eraser.EraserType for eraser tool
Default to INK_ERASER
|
---|
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 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
fontsName | 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
fontsPath | array of custom font's absolute path from device storage |
---|
Sets whether multi-stroke is enabled for ink tool
inkMultiStrokeEnabled | true if enabled, default to true. |
---|
Sets whether to smooth ink annotation. Default to true.
inkSmoothing | enable ink smoothing |
---|
Sets whether image stamp tool can insert multiple images.
insertMultipleImagesEnabled | whether image stamp tool can insert multiple images, default false |
---|
Sets the magnifying loupe when using text markup.
loupeEnabled | indicates if the user wants to enable magnifying loupe on text markup |
---|
Sets whether to allow moving annotations between pages
moveAnnotBetweenPages | true if moving annotations between pages is enabled, default to false. |
---|
Sets the multi-select mode.
mode | the AnnotEditRectGroup.SelectionMode for multi-select tool
Default to RECTANGULAR
|
---|
Sets whether ink tool will open annotation toolbar
openToolbar | if true, click ink from quick menu will open the annotation toolbar in ink mode, false otherwise. Default to true. |
---|
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 whether annotation editing is real time
realTimeAnnotEdit | true if real time, false otherwise. Default to true. |
---|
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 the margin between annotation bounding box and selection box.
selectionBoxMargin | margin value in DP, default to 16dp. |
---|
Sets whether can show indicator for annotations with comments
showAnnotIndicator | true if show indicator, false otherwise. Default to false. |
---|
ets whether to show author dialog the first time when user annotates.
showAuthor | if true, show author dialog the first time when user annotates. Default to false. |
---|
Sets whether to show rich content switch for FreeText. This API only takes effect for Lollipop+.
showRichContentOption | true show rich content switch for FreeText. Default to true. |
---|
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
showSavedSignatures | true if saved signature will show in signature dialog, false otherwise. Default to true. |
---|
Sets whether can show pick from image in signature dialog
showSignatureFromImage | true if pick from image icon will show in signature dialog, false otherwise. Default to true. |
---|
Sets whether to show color presets in the signature dialog
showSignaturePresets | true if color presets should be shown in the signature dialog, false otherwise. Default to true. |
---|
Sets whether can show typed signature button in signature dialog
showTypedSignature | true if typed signature will show in signature dialog, false otherwise. Default to true. |
---|
Sets whether to show undo/redo buttons in the toolbar.
showUndoRedo | true if showing undo/redo buttons in the toolbar. Default 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. |
---|
Set the point snapping mode for the SnapToNearestInDoc method. By default SnapToNearestInDoc will snap to line endpoints, midpoints, and intersections.
modeFlags | an array of SnapUtils.SnappingMode |
---|
Sets configuration to tool manager
styleRes | style resource that contains tool manager configuration |
---|
Sets whether to use stylus to draw without entering ink tool. Default to false.
stylusAsPen | enable inking with stylus in pan mode |
---|
Sets the half width for tap to create shapes
tapToCreateHalfWidth | 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). Default to true.
Sets whether to use digital signature instead of signature
useDigitalSignature | true if using digital signature instead of signature, false otherwise. Default to false. |
---|
Sets whether to use pressure sensitivity on styluses for signatures.
usePressureSensitiveSignatures | true if using pressure sensitivity for signatures. Default to true. |
---|