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

Class Overview

Defaults provider for RedactionAnnotation.

Summary

Public Constructors
RedactionAnnotationDefaultsProvider(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.
int[] getAvailableOutlineColors()
Provides outline colors available in the color picker.
int getDefaultColor()
Provides default annotation foreground color.
int getDefaultFillColor()
Provides default fill color.
int getDefaultOutlineColor()
Provides default annotation outline color.
String getDefaultOverlayText()
Provides the default overlay text for RedactionAnnotation.
boolean getDefaultRepeatOverlayTextSetting()
Provides default setting for the repeat overlay text property of RedactionAnnotations.
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.AnnotationDefaultsColorProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsFillColorProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsOutlineColorProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsOverlayTextProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsPreviewProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsRepeatOverlayTextProvider

Public Constructors

public RedactionAnnotationDefaultsProvider (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 int[] getAvailableOutlineColors ()

Provides outline colors available in the color picker.

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 int getDefaultOutlineColor ()

Provides default annotation outline color.

Returns
  • The outline color used as default for editing annotations.

public String getDefaultOverlayText ()

Provides the default overlay text for RedactionAnnotation.

Returns
  • The default overlay text.

public boolean getDefaultRepeatOverlayTextSetting ()

Provides default setting for the repeat overlay text property of RedactionAnnotations.

Returns
  • The default setting for the repeat overlay text property.

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.