java.lang.Object
   ↳ com.pspdfkit.annotations.defaults.FreeTextAnnotationDefaultsProvider

This class is deprecated.
Use FreeTextAnnotationConfiguration.Builder instead.

Class Overview

Defaults provider for free text annotations.

Summary

Public Constructors
FreeTextAnnotationDefaultsProvider(Context context)
Public Methods
boolean forceDefaults()

Enforce provided annotation defaults.

int[] getAvailableColors()
Provides colors available in the color picker.
int[] getAvailableFillColors()
Provides fill colors available in the color picker.
List<Font> getAvailableFonts()
Provides all available fonts.
List<LineEndType> getAvailableLineEndTypes()
Provides list of supported line end types.
List<BorderStylePreset> getBorderStylePresets()
Provides list of supported border style presets.
float getDefaultAlpha()
Provides default annotation alpha.
BorderStylePreset getDefaultBorderStylePreset()
Provides default border style preset.
int getDefaultColor()
Provides default annotation foreground color.
int getDefaultFillColor()
Provides default fill color.
Font getDefaultFont()
Provides default annotation font.
Pair<LineEndTypeLineEndType> getDefaultLineEnds()
Provides default line end types.
float getDefaultTextSize()
Provides default annotation text size.
float getDefaultThickness()
Provides default annotation thickness.
float getMaxAlpha()
Provides maximal annotation alpha.
float getMaxTextSize()
Provides maximal annotation text size.
float getMaxThickness()
Provides maximal annotation thickness.
float getMinAlpha()
Provides minimal annotation alpha.
float getMinTextSize()
Provides minimal annotation text size.
float getMinThickness()
Provides minimal annotation thickness.
EnumSet<AnnotationProperty> getSupportedProperties()
Control which annotation properties are enabled for this annotation type.
boolean isPreviewEnabled()
Controls whether annotation preview is enabled when creating annotations.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsAlphaProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsBorderStyleProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsColorProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsFillColorProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsFontProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsLineEndTypeProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsPreviewProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsTextSizeProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsThicknessProvider

Public Constructors

public FreeTextAnnotationDefaultsProvider (Context context)

Public Methods

public boolean forceDefaults ()

Enforce provided annotation defaults. By default last picked values are used when creating annotations. Values from AnnotationDefaultsProvider are used only when last used value is not available.

For example getDefaultColor() is used only when creating annotation of given type for the first time, all annotation created after that are created with last used color.

Returns

public int[] getAvailableColors ()

Provides colors available in the color picker.

public int[] getAvailableFillColors ()

Provides fill colors available in the color picker.

public List<Font> getAvailableFonts ()

Provides all available fonts.

Returns
  • All available fonts.

public List<LineEndType> getAvailableLineEndTypes ()

Provides list of supported line end types.

public List<BorderStylePreset> getBorderStylePresets ()

Provides list of supported border style presets.

public float getDefaultAlpha ()

Provides default annotation alpha.

Returns
  • The default annotation alpha in percent from 0 to 1.

public BorderStylePreset getDefaultBorderStylePreset ()

Provides default border style preset.

Returns
  • Border style preset used as default for editing annotations.

public int getDefaultColor ()

Provides default annotation foreground color.

Returns
  • Foreground color used as default for editing annotations.

public int getDefaultFillColor ()

Provides default fill color.

Returns
  • Fill color used as default for editing annotations.

public Font getDefaultFont ()

Provides default annotation font.

Returns
  • The default annotation font.

public Pair<LineEndTypeLineEndType> getDefaultLineEnds ()

Provides default line end types.

Returns
  • Pair of line end types used as default for editing annotations.

public float getDefaultTextSize ()

Provides default annotation text size.

Returns
  • The default annotation text size in pt.

public float getDefaultThickness ()

Provides default annotation thickness.

Returns
  • The default annotation thickness in pt.

public float getMaxAlpha ()

Provides maximal annotation alpha.

Returns
  • The maximal annotation alpha in percent from 0 to 1.

public float getMaxTextSize ()

Provides maximal annotation text size.

Returns
  • The maximal annotation text size in pt.

public float getMaxThickness ()

Provides maximal annotation thickness.

Returns
  • The maximal annotation thickness in pt.

public float getMinAlpha ()

Provides minimal annotation alpha.

Returns
  • The minimal annotation alpha in percent from 0 to 1.

public float getMinTextSize ()

Provides minimal annotation text size.

Returns
  • The minimal annotation text size in pt.

public float getMinThickness ()

Provides minimal annotation thickness.

Returns
  • The minimal annotation thickness in pt.

public EnumSet<AnnotationProperty> getSupportedProperties ()

Control which annotation properties are enabled for this annotation type. This is used to customize annotation inspector contents. Property can be editable in annotation inspector when its returned by this method and annotation defaults provider implements required interface. For example to enable editing annotation color property, this method must return COLOR and annotation defaults provider must implement AnnotationDefaultsColorProvider.

Returns
  • Enum set of all supported annotation properties.

public boolean isPreviewEnabled ()

Controls whether annotation preview is enabled when creating annotations.