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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
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 |
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 |
setAnnotPermission(boolean annotPermission)
Sets whether to check annotation author permission
| ||||||||||
ToolManagerBuilder |
setAnnotToolbarPrecedence(ToolMode[] toolModes)
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 |
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 |
setInkSmoothing(boolean inkSmoothing)
Sets whether to smooth ink annotation.
| ||||||||||
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 |
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 |
setShowUndoRedo(boolean showUndoRedo)
Sets whether to show undo/redo buttons in the toolbar.
| ||||||||||
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
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 |
---|
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 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. |
---|
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 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 to smooth ink annotation. Default to true.
inkSmoothing | enable ink smoothing |
---|
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 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 to show undo/redo buttons in the toolbar.
showUndoRedo | true if showing undo/redo buttons in the toolbar. Default to true. |
---|
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. |
---|