public interface

AnnotationConfiguration

com.pspdfkit.annotations.configuration.AnnotationConfiguration
Known Indirect Subclasses

Class Overview

Base for all annotation configuration classes. Contains configuration options shared by all annotation types.

Summary

Nested Classes
interface AnnotationConfiguration.Builder<T> Builder for AnnotationConfiguration
Public Methods
abstract static Builder<? extends Builder> builder(Context context, AnnotationTool annotationTool)
Creates a new instance of annotation configuration builder for given annotation tool.
abstract static Builder<? extends Builder> builder(Context context, AnnotationType annotationType)
Creates a new instance of annotation configuration builder for given annotation type.
abstract boolean getForceDefaults()

Indicates whether defaults defined by this configuration should be enforced.

abstract EnumSet<AnnotationProperty> getSupportedProperties()

Controls which annotation properties are enabled for this annotation type.

abstract boolean isZIndexEditingEnabled()
Indicates whether the z-index editing is enabled for this annotation type.

Public Methods

public static abstract Builder<? extends Builder> builder (Context context, AnnotationTool annotationTool)

Creates a new instance of annotation configuration builder for given annotation tool.

Parameters
context Context used to pre-fill the builder with implicit values.
annotationTool Annotation tool to create builder for.
Returns

public static abstract Builder<? extends Builder> builder (Context context, AnnotationType annotationType)

Creates a new instance of annotation configuration builder for given annotation type.

Parameters
context Context used to pre-fill the builder with implicit values.
annotationType Annotation type to create builder for.
Returns

public abstract boolean getForceDefaults ()

Indicates whether defaults defined by this configuration should be enforced. By default, last picked values are used when creating annotations.

Values from AnnotationConfiguration 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
  • true to always use annotation defaults even when property is set in AnnotationPreferencesManagerImpl.

public abstract EnumSet<AnnotationProperty> getSupportedProperties ()

Controls 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 configuration implements required interface. For example to enable editing annotation color property, this method should return COLOR and annotation configuration should implement AnnotationColorConfiguration.

Returns
  • Enum set of all supported annotation properties.

public abstract boolean isZIndexEditingEnabled ()

Indicates whether the z-index editing is enabled for this annotation type.

Returns
  • true if enabled, false otherwise.