java.lang.Object | |
↳ | com.pdftron.pdf.config.ToolConfig |
Helper class for config tools and tool related customize stuffs
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | ToolConfig.PanLongPressSwitchToolCallback | A functional interface for pan tool switch tool when long pressing on annotation |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addQMHideItem(int itemId)
Add quick menu item to no annotation permission list
| ||||||||||
void |
disableAnnotEditing(Integer[] annotTypes)
Disables annotation editing by type.
| ||||||||||
void |
enableAnnotEditing(Integer[] annotTypes)
Enables annotation editing by type.
| ||||||||||
ToolManager.ToolModeBase |
getAnnotationHandlerToolMode(int annotType)
get annotation handler tool mode
| ||||||||||
ArrayList<FontResource> |
getFontList()
Gets list of font to use for free text annotation
| ||||||||||
static ToolConfig | getInstance() | ||||||||||
ToolConfig.PanLongPressSwitchToolCallback |
getPanLongPressSwitchToolCallback()
Gets Pan tool long press switch tool callback, if no customized callback defined, return the default one.
| ||||||||||
ToolManager.ToolMode |
getToolModeByAnnotationToolbarItemId(int itemId)
Gets tool mode by annotation toolbar item id
| ||||||||||
ToolManager.ToolMode |
getToolModeByQMItemId(int qmItemId)
Gets tool mode by quick menu item id
| ||||||||||
boolean |
isAnnotEditingDisabled(int annotType)
Checks whether the editing of an annot type is disabled.
| ||||||||||
boolean |
isHideQMItem(int itemId)
Check if quick menu item should be hidden by a given item id
| ||||||||||
boolean | isRichContentEnabledForFreeText() | ||||||||||
boolean | isSnappingEnabledForMeasurementTools() | ||||||||||
void |
putAnnotationToolModePair(int annotType, ToolManager.ToolModeBase toolMode)
Put annotation type and tool mode into annotation tool mode pair
| ||||||||||
void |
putCustomToolAnnotationToolbarItemPair(int itemId, ToolManager.ToolMode mode)
put custom tool mode and annotation toolbar item view id pair
| ||||||||||
void |
putCustomToolQMItemPair(int qmItemId, ToolManager.ToolMode mode)
put custom tool mode and quick menu item pair
| ||||||||||
boolean |
removeQMHideItem(int itemId)
remove quick menu item from no annotation permission list
| ||||||||||
void |
setFontList(ArrayList<FontResource> fonts)
Sets list of font to use for free text annotation
| ||||||||||
void |
setPanToolLongPressSwitchToolCallback(ToolConfig.PanLongPressSwitchToolCallback callback)
Sets customized callback for pan tool switch tool when long press
| ||||||||||
void | setRichContentEnabledForFreeText(boolean enabled) | ||||||||||
void | setSnappingEnabledForMeasurementTools(boolean enabled) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Add quick menu item to no annotation permission list
itemId | quick menu item id |
---|
Disables annotation editing by type.
annotTypes | annot types to be disabled |
---|
Enables annotation editing by type.
annotTypes | annot types to be enabled |
---|
get annotation handler tool mode
annotType | annotation type |
---|
Gets list of font to use for free text annotation
Gets Pan tool long press switch tool callback, if no customized callback defined, return the default one. Default callback:
if (isTextSelect) {
return ToolMode.TEXT_SELECT;
if (annot == null) {
return ToolMode.PAN;
}
switch (annot.getType()) {
case Annot.e_Link:
if(isSelfMade){
return ToolMode.ANNOT_EDIT;
}else{
return ToolMode.LINK_ACTION;
}
case Annot.e_Widget:
if (isSelfMade) {
return ToolMode.ANNOT_EDIT;
} else {
return ToolMode.FORM_FILL;
}
case Annot.e_Line:
* return ToolMode.ANNOT_EDIT_LINE;
default:
return ToolMode.ANNOT_EDIT;
}
}
Gets tool mode by annotation toolbar item id
itemId | annotation toolbar item view id |
---|
Gets tool mode by quick menu item id
qmItemId | quick menu item id |
---|
Checks whether the editing of an annot type is disabled.
annotType | The annot type |
---|
Check if quick menu item should be hidden by a given item id
itemId | quick menu item id |
---|
Put annotation type and tool mode into annotation tool mode pair
annotType | annotation type |
---|---|
toolMode | tool mode |
put custom tool mode and annotation toolbar item view id pair
itemId | annotation toolbar item view id |
---|---|
mode | tool mode |
put custom tool mode and quick menu item pair
qmItemId | quick menu item id |
---|---|
mode | tool mode |
remove quick menu item from no annotation permission list
itemId | quick menu item id |
---|
Sets list of font to use for free text annotation
fonts | the list of fonts |
---|
Sets customized callback for pan tool switch tool when long press
callback | pan tool long press switch tool tool callback |
---|