java.lang.Object | |
↳ | com.pdftron.pdf.config.ToolStyleConfig |
A helper class for configuring style of annotation creator tools.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public static String | KEY_PREF_PRESET_INDEX |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ToolStyleConfig()
Class constructor
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addAnnotPresetMap(int annotType, int attrRes)
Add Customized default style for annotation
| ||||||||||
void |
addDefaultStyleMap(int annotType, int styleRes)
Add Customized default style for annotation
| ||||||||||
AnnotStyle |
getAnnotPresetStyle(Context context, int annotType, int index)
Gets annotation preset style saved in settings
| ||||||||||
AnnotStyle |
getAnnotPresetStyle(Context context, int annotType, int index, String suffix)
Gets annotation preset style saved in settings
| ||||||||||
String |
getAnnotationPropertySettingsKey(int annotType, String extraTag, String mode)
Gets color key to put in settings
| ||||||||||
String | getBorderStyleKey(int annotType, String extraTag) | ||||||||||
String | getColorKey(int annotType, String extraTag) | ||||||||||
AnnotStyle |
getCustomAnnotStyle(Context context, int annotType, String extraTag)
Gets custom annotation style from settings
| ||||||||||
ShapeBorderStyle |
getCustomBorderStyleMode(Context context, int annotType, String extraTag)
Gets borderStyle mode saved in settings
| ||||||||||
int |
getCustomColor(Context context, int annotType, String extraTag)
Gets color saved in settings
| ||||||||||
String |
getCustomDateFormat(Context context, int annotType, String extraTag)
Gets date format saved in settings
| ||||||||||
Eraser.EraserType |
getCustomEraserType(Context context, int annotType, String extraTag)
Gets the eraser type saved in settings
| ||||||||||
int |
getCustomFillColor(Context context, int annotType, String extraTag)
Gets fill color saved in settings
| ||||||||||
String |
getCustomFontName(Context context, int annotType, String extraTag)
Gets font name saved in settings
| ||||||||||
int | getCustomHorizontalAlignment(Context context, int annotType, String extraTag) | ||||||||||
String |
getCustomIconName(Context context, int annotType, String extraTag)
Gets icon name saved in settings
| ||||||||||
Eraser.InkEraserMode |
getCustomInkEraserMode(Context context, int annotType, String extraTag)
Gets the ink eraser mode saved in settings
| ||||||||||
LineEndingStyle |
getCustomLineEndStyleMode(Context context, int annotType, String extraTag)
Gets lineEndStyle mode saved in settings
| ||||||||||
LineEndingStyle |
getCustomLineStartStyleMode(Context context, int annotType, String extraTag)
Gets lineStartStyle mode saved in settings
| ||||||||||
LineStyle |
getCustomLineStyleMode(Context context, int annotType, String extraTag)
Gets lineStyle mode saved in settings
| ||||||||||
float |
getCustomOpacity(Context context, int annotType, String extraTag)
Gets opacity saved in settings
| ||||||||||
boolean |
getCustomPressureSensitive(Context context, int annotType, String extraTag)
Gets the eraser type saved in settings
| ||||||||||
String |
getCustomRulerBaseUnit(Context context, int annotType, String extraTag)
Gets ruler base unit saved in settings
| ||||||||||
float |
getCustomRulerBaseValue(Context context, int annotType, String extraTag)
Gets ruler base value saved in settings
| ||||||||||
int |
getCustomRulerPrecision(Context context, int annotType, String extraTag)
Gets ruler translate unit saved in settings
| ||||||||||
String |
getCustomRulerTranslateUnit(Context context, int annotType, String extraTag)
Gets ruler translate unit saved in settings
| ||||||||||
float |
getCustomRulerTranslateValue(Context context, int annotType, String extraTag)
Gets ruler translate value saved in settings
| ||||||||||
int |
getCustomTextColor(Context context, int annotType, String extraTag)
Gets text color saved in settings
| ||||||||||
float |
getCustomTextSize(Context context, int annotType, String extraTag)
Gets text size saved in settings
| ||||||||||
float |
getCustomThickness(Context context, int annotType, String extraTag)
Gets thickness saved in settings
| ||||||||||
int | getCustomVerticalAlignment(Context context, int annotType, String extraTag) | ||||||||||
String | getDateFormatKey(int annotType, String extraTag) | ||||||||||
AnnotStyle |
getDefaultAnnotPresetStyle(Context context, int annotType, int index, int attrRes, int arrayRes)
Gets default annotation preset style defined in attribute, style, and array resource
| ||||||||||
AnnotStyle |
getDefaultAnnotStyle(Context context, int annotType)
Gets default annotation style defined in attrs
| ||||||||||
int |
getDefaultAttr(int annotType)
Gets default tool style
| ||||||||||
ShapeBorderStyle |
getDefaultBorderStyle(Context context, int annotType)
Gets default border style for the given annotation type.
| ||||||||||
ShapeBorderStyle |
getDefaultBorderStyle(Context context, int defAttrRes, int defStyleRes)
Gets default border style
| ||||||||||
int |
getDefaultColor(Context context, int annotType, String extraTag)
Gets default tool color
| ||||||||||
int |
getDefaultColor(Context context, int defStyleAttr, int defStyleRes)
Gets default tool color
| ||||||||||
int |
getDefaultColor(Context context, int annotType)
Gets default color
| ||||||||||
String |
getDefaultDateFormat(Context context, int defAttrRes, int defStyleRes)
Gets default date format
| ||||||||||
String |
getDefaultDateFormat(Context context, int annotType)
Gets default date format
| ||||||||||
Eraser.EraserType | getDefaultEraserType() | ||||||||||
int |
getDefaultFillColor(Context context, int annotType)
Gets default fill color
| ||||||||||
int |
getDefaultFillColor(Context context, int defAttrRes, int defStyleRes)
Gets default fill color
| ||||||||||
String |
getDefaultFont(Context context, int defAttrRes, int defStyleRes)
Gets default font
| ||||||||||
String |
getDefaultFont(Context context, int annotType)
Gets default font
| ||||||||||
int |
getDefaultHorizontalAlignment(Context context, int annotType)
Gets the horizontal text alignment
| ||||||||||
int |
getDefaultHorizontalAlignment(Context context, int defAttrRes, int defStyleRes)
Gets the horizontal text alignment
| ||||||||||
String |
getDefaultIcon(Context context, int annotType)
Gets default icon
| ||||||||||
String |
getDefaultIcon(Context context, int defAttrRes, int defStyleRes)
Gets default icon
| ||||||||||
LineEndingStyle |
getDefaultLineEndStyle(Context context, int annotType)
Gets default line end style for the given annotation type.
| ||||||||||
LineEndingStyle |
getDefaultLineEndStyle(Context context, int defAttrRes, int defStyleRes)
Gets default line end style
| ||||||||||
LineEndingStyle |
getDefaultLineStartStyle(Context context, int annotType)
Gets default line start style for the given annotation type.
| ||||||||||
LineEndingStyle |
getDefaultLineStartStyle(Context context, int defAttrRes, int defStyleRes)
Gets default line start style
| ||||||||||
LineStyle |
getDefaultLineStyle(Context context, int defAttrRes, int defStyleRes)
Gets default line style
| ||||||||||
LineStyle |
getDefaultLineStyle(Context context, int annotType)
Gets default line style for the given annotation type.
| ||||||||||
float |
getDefaultMaxTextSize(Context context, int defAttrRes, int defStyleRes)
Gets default maximum text size
| ||||||||||
float |
getDefaultMaxTextSize(Context context)
Gets default maximum text size
| ||||||||||
float |
getDefaultMaxThickness(Context context, int defAttrRes, int defStyleRes)
Gets default maximum thickness
| ||||||||||
float |
getDefaultMaxThickness(Context context, int annotType)
Gets default maximum thickness
| ||||||||||
float |
getDefaultMinTextSize(Context context)
Gets default minimum text size
| ||||||||||
float |
getDefaultMinTextSize(Context context, int defAttrRes, int defStyleRes)
Gets default minimum text size
| ||||||||||
float |
getDefaultMinThickness(Context context, int annotType)
Gets default minimum thickness
| ||||||||||
float |
getDefaultMinThickness(Context context, int defAttrRes, int defStyleRes)
Gets default minimum thickness
| ||||||||||
float |
getDefaultOpacity(Context context, int annotType)
Gets default opacity
| ||||||||||
float |
getDefaultOpacity(Context context, int defAttrRes, int defStyleRes)
Gets default opacity
| ||||||||||
int |
getDefaultPresetsArrayRes(int annotType)
Gets default tool style
| ||||||||||
boolean |
getDefaultPressureSensitivity(Context context, int annotType)
Gets whether freehand will use pressure sensitive calculation
| ||||||||||
boolean |
getDefaultPressureSensitivity(Context context, int defAttrRes, int defStyleRes)
Gets whether freehand will use pressure sensitive calculation
| ||||||||||
String |
getDefaultRulerBaseUnit(Context context, int defAttrRes, int defStyleRes)
Gets default ruler scale base unit
| ||||||||||
String |
getDefaultRulerBaseUnit(Context context, int annotType)
Gets default ruler scale base unit
| ||||||||||
float |
getDefaultRulerBaseValue(Context context, int defAttrRes, int defStyleRes)
Gets default ruler scale base value
| ||||||||||
float |
getDefaultRulerBaseValue(Context context, int annotType)
Gets default ruler scale base value
| ||||||||||
int |
getDefaultRulerPrecision(Context context, int defAttrRes, int defStyleRes)
Gets default ruler precision
| ||||||||||
int |
getDefaultRulerPrecision(Context context, int annotType)
Gets default ruler precision
| ||||||||||
String |
getDefaultRulerTranslateUnit(Context context, int annotType)
Gets default ruler scale base unit
| ||||||||||
String |
getDefaultRulerTranslateUnit(Context context, int defAttrRes, int defStyleRes)
Gets default ruler scale base unit
| ||||||||||
float |
getDefaultRulerTranslateValue(Context context, int annotType)
Gets default ruler scale translate value
| ||||||||||
float |
getDefaultRulerTranslateValue(Context context, int defAttrRes, int defStyleRes)
Gets default ruler scale translate value
| ||||||||||
int |
getDefaultStyle(int annotType)
Gets default tool style
| ||||||||||
int |
getDefaultTextColor(Context context, int attrRes, int defStyleRes)
Gets default text color
| ||||||||||
int |
getDefaultTextColor(Context context)
This method is deprecated.
use
getDefaultTextColor(Context, int) instead
| ||||||||||
int |
getDefaultTextColor(Context context, int annotType)
Gets default text color for the given annotation type.
| ||||||||||
float |
getDefaultTextSize(Context context, int defAttrRes, int defStyleRes)
Gets default font size
| ||||||||||
float |
getDefaultTextSize(Context context, int annotType)
Gets default font size for the given annotation type.
| ||||||||||
float |
getDefaultThickness(Context context, int annotType)
Gets default thickness
| ||||||||||
float |
getDefaultThickness(Context context, int defAttrRes, int defStyleRes)
Gets default thickness
| ||||||||||
float |
getDefaultThicknessRange(Context context, int defAttrRes, int defStyleRes)
Gets thickness range
| ||||||||||
float |
getDefaultThicknessRange(Context context, int annotType)
Gets thickness range
| ||||||||||
int |
getDefaultVerticalAlignment(Context context, int annotType)
Gets the vertical text alignment
| ||||||||||
int |
getDefaultVerticalAlignment(Context context, int defAttrRes, int defStyleRes)
Gets the vertical text alignment
| ||||||||||
String | getEraserTypeKey(int annotType, String extraTag) | ||||||||||
String | getFillColorKey(int annotType, String extraTag) | ||||||||||
String | getFontKey(int annotType, String extraTag) | ||||||||||
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
| ||||||||||
String | getHorizontalAlignmentKey(int annotType, String extraTag) | ||||||||||
String | getIconKey(int annotType, String extraTag) | ||||||||||
ArrayList<String> |
getIconsList(Context context, int defAttrRes, int defArrayRes)
Gets icon list based on given attribute resource and default array resource
| ||||||||||
ArrayList<String> |
getIconsList(Context context)
Gets default icon list
| ||||||||||
String | getInkEraserModeKey(int annotType, String extraTag) | ||||||||||
static ToolStyleConfig | getInstance() | ||||||||||
int | getLastSelectedPresetIndex(Context context, int toolbarItemType, String toolbarStyleId) | ||||||||||
String | getLineEndStyleKey(int annotType, String extraTag) | ||||||||||
String | getLineStartStyleKey(int annotType, String extraTag) | ||||||||||
String | getLineStyleKey(int annotType, String extraTag) | ||||||||||
String | getOpacityKey(int annotType, String extraTag) | ||||||||||
int |
getPresetColor(Context context, int index, int attrRes, int arrayRes, int defaultStyleRes)
Gets preset color
| ||||||||||
int |
getPresetsAttr(int annotType)
Gets presets attr
| ||||||||||
String | getPressureSensitiveKey(int annotType, String extraTag) | ||||||||||
String | getRulerBaseUnitKey(int annotType, String extraTag) | ||||||||||
String | getRulerBaseValueKey(int annotType, String extraTag) | ||||||||||
String | getRulerPrecisionKey(int annotType, String extraTag) | ||||||||||
String | getRulerTranslateUnitKey(int annotType, String extraTag) | ||||||||||
String | getRulerTranslateValueKey(int annotType, String extraTag) | ||||||||||
String | getTextColorKey(int annotType, String extraTag) | ||||||||||
String | getTextMarkupTypeKey(int annotType, String extraTag) | ||||||||||
String | getTextSizeKey(int annotType, String extraTag) | ||||||||||
String | getThicknessKey(int annotType, String extraTag) | ||||||||||
String | getVerticalAlignmentKey(int annotType, String extraTag) | ||||||||||
int |
numberOfAnnotPresetStyles(Context context, int annotType)
Returns the number of presets defined in styles for given annot type
| ||||||||||
void |
saveAnnotStyle(Context context, AnnotStyle annotStyle, String extraTag)
Save annotation style to settings.
| ||||||||||
void | setDefaultEraserType(Eraser.EraserType type) | ||||||||||
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 | setLastSelectedPresetIndex(Context context, int toolbarItemType, String toolbarStyleId, int index) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Class constructor
Add Customized default style for annotation
annotType | annotation mode |
---|---|
attrRes | preset attribute resource |
Add Customized default style for annotation
annotType | annotation mode |
---|---|
styleRes | annotation style resource |
Gets annotation preset style saved in settings
context | The context |
---|---|
annotType | annotation type |
index | index of the preset |
Gets annotation preset style saved in settings
context | The context |
---|---|
annotType | annotation type |
index | index of the preset |
suffix | suffix string to uniquely identify this annot style |
Gets color key to put in settings
annotType | The annotation mode |
---|---|
extraTag | extra tag |
mode | mode |
Gets custom annotation style from settings
context | the context |
---|---|
annotType | tool mode |
Gets borderStyle mode saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets color saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets date format saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets the eraser type saved in settings
context | the context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets fill color saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets font name saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets icon name saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets the ink eraser mode saved in settings
context | the context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets lineEndStyle mode saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets lineStartStyle mode saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets lineStyle mode saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets opacity saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets the eraser type saved in settings
context | the context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets ruler base unit saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets ruler base value saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets ruler translate unit saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets ruler translate unit saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets ruler translate value saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets text color saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets text size saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets thickness saved in settings
context | The context |
---|---|
annotType | annotation type |
extraTag | extra tag for settings |
Gets default annotation preset style defined in attribute, style, and array resource
context | The context |
---|---|
annotType | annotation type |
index | index of annotation type |
attrRes | attribute resource for annotation preset |
arrayRes | array resource for defining presets of annotation style |
Gets default annotation style defined in attrs
context | the context |
---|---|
annotType | tool mode |
Gets default tool style
annotType | annotation tool mode |
---|
Gets default border style for the given annotation type.
context | The context |
---|---|
annotType | The annotation type |
Gets default border style
context | The context |
---|
Gets default tool color
context | The context |
---|---|
annotType | annotation tool mode |
extraTag | extra tag |
Gets default tool color
context | The context |
---|
Gets default color
context | The context |
---|---|
annotType | annotation tool mode |
Gets default date format
context | The context |
---|
Gets default date format
context | The context |
---|---|
annotType | annotation tool mode |
Gets default fill color
context | The context |
---|---|
annotType | The annotation type |
Gets default fill color
context | context |
---|
Gets default font
context | context |
---|
Gets default font
context | context |
---|---|
annotType | annotation tool mode |
Gets the horizontal text alignment
context | the context |
---|---|
annotType | annotation tool mode |
Gets the horizontal text alignment
context | the context |
---|
Gets default icon
context | context |
---|---|
annotType | annotation tool mode |
Gets default icon
context | context |
---|
Gets default line end style for the given annotation type.
context | The context |
---|---|
annotType | The annotation type |
Gets default line end style
context | The context |
---|
Gets default line start style for the given annotation type.
context | The context |
---|---|
annotType | The annotation type |
Gets default line start style
context | The context |
---|
Gets default line style
context | The context |
---|
Gets default line style for the given annotation type.
context | The context |
---|---|
annotType | The annotation type |
Gets default maximum text size
context | context |
---|
Gets default maximum text size
context | context |
---|
Gets default maximum thickness
context | context |
---|
Gets default maximum thickness
context | context |
---|---|
annotType | The annotation type |
Gets default minimum text size
context | context |
---|
Gets default minimum text size
context | context |
---|
Gets default minimum thickness
context | context |
---|---|
annotType | annotation tool mode |
Gets default minimum thickness
context | context |
---|
Gets default opacity
context | context |
---|---|
annotType | annotation tool mode |
Gets default opacity
context | context |
---|
Gets default tool style
annotType | annotation tool mode |
---|
Gets whether freehand will use pressure sensitive calculation
context | context |
---|
Gets whether freehand will use pressure sensitive calculation
context | context |
---|
Gets default ruler scale base unit
context | The context |
---|
Gets default ruler scale base unit
context | The context |
---|---|
annotType | annotation tool mode |
Gets default ruler scale base value
context | The context |
---|
Gets default ruler scale base value
context | The context |
---|---|
annotType | annotation tool mode |
Gets default ruler precision
context | The context |
---|
Gets default ruler precision
context | The context |
---|---|
annotType | annotation tool mode |
Gets default ruler scale base unit
context | The context |
---|---|
annotType | annotation tool mode |
Gets default ruler scale base unit
context | The context |
---|
Gets default ruler scale translate value
context | The context |
---|---|
annotType | annotation tool mode |
Gets default ruler scale translate value
context | The context |
---|
Gets default tool style
annotType | annotation tool mode |
---|
Gets default text color
context | the context |
---|---|
attrRes | attribute resource |
defStyleRes | default style resource |
This method is deprecated.
use getDefaultTextColor(Context, int)
instead
Gets default text color
context | the context |
---|
Gets default text color for the given annotation type.
context | the context |
---|---|
annotType | the annotation type |
Gets default font size
context | The context |
---|
Gets default font size for the given annotation type.
context | The context |
---|---|
annotType | The annotation type |
Gets default thickness
context | The context |
---|---|
annotType | annotation tool mode |
Gets default thickness
context | The context |
---|
Gets thickness range
context | context |
---|
Gets thickness range
context | context |
---|---|
annotType | annotation tool mode |
Gets the vertical text alignment
context | the context |
---|---|
annotType | annotation tool mode |
Gets the vertical text alignment
context | the context |
---|
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 icon list based on given attribute resource and default array resource
context | The context |
---|---|
defAttrRes | attribute resource |
defArrayRes | array resource |
Gets default icon list
context | The context |
---|
Gets preset color
context | the context |
---|---|
index | index of presets |
attrRes | preset attribute resource, get default attr:getPresetsAttr(int) |
arrayRes | array resource, get default array resource: getDefaultPresetsArrayRes(int) |
defaultStyleRes | default style resource, get default style resource: getDefaultStyle(int) |
Gets presets attr
annotType | annotation tool mode |
---|
Returns the number of presets defined in styles for given annot type
context | the context to obtain preset from style attributes |
---|---|
annotType | the annot type of preset |
Save annotation style to settings. The saved annotation style can be retrieved by getCustomAnnotStyle(Context, int, String)
context | The context |
---|---|
annotStyle | annotation style |
extraTag | extra tag for settings |
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 |
---|