public class

StampAnnotationDefaultsProvider

extends Object
implements AnnotationDefaultsStampProvider
java.lang.Object
   ↳ com.pspdfkit.annotations.defaults.StampAnnotationDefaultsProvider

Class Overview

Defaults provider for stamp annotations.

Summary

Constants
float DEFAULT_STAMP_ANNOTATION_ASPECT_RATIO Default stamp annotation aspect ration.
float DEFAULT_STAMP_ANNOTATION_PDF_HEIGHT Default stamp annotation height.
float DEFAULT_STAMP_ANNOTATION_PDF_WIDTH Default stamp annotation width.
Public Constructors
StampAnnotationDefaultsProvider(Context context)
Public Methods
boolean forceDefaults()

Enforce provided annotation defaults.

List<StampPickerItem> getStampsForPicker()
Provides default set of stamp annotations.
EnumSet<AnnotationProperty> getSupportedProperties()
Control which annotation properties are enabled for this annotation type.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsStampProvider

Constants

public static final float DEFAULT_STAMP_ANNOTATION_ASPECT_RATIO

Default stamp annotation aspect ration.

Constant Value: 0.33333334

public static final float DEFAULT_STAMP_ANNOTATION_PDF_HEIGHT

Default stamp annotation height.

Constant Value: 70.0

public static final float DEFAULT_STAMP_ANNOTATION_PDF_WIDTH

Default stamp annotation width.

Constant Value: 210.0

Public Constructors

public StampAnnotationDefaultsProvider (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 List<StampPickerItem> getStampsForPicker ()

Provides default set of stamp annotations.

Returns
  • Stamp annotation list used as default when entering com.pspdfkit.framework.ui.dialog.stamps.StampPickerDialog.

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.