public class

NoteAnnotationDefaultsProvider

extends Object
implements AnnotationDefaultsColorProvider AnnotationDefaultsNoteIconProvider
java.lang.Object
   ↳ com.pspdfkit.annotations.defaults.NoteAnnotationDefaultsProvider

This class is deprecated.
Use NoteAnnotationConfiguration.Builder instead.

Class Overview

Defaults provider for note annotations.

Summary

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

Enforce provided annotation defaults.

int[] getAvailableColors()
Provides colors available in the color picker.
String[] getAvailableIconNames()
Provides name of note annotation icons available in the icon picker.
int getDefaultColor()
Provides default annotation foreground color.
String getDefaultIconName()
Provides default note annotation icon name.
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.AnnotationDefaultsColorProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsNoteIconProvider
From interface com.pspdfkit.annotations.defaults.AnnotationDefaultsProvider

Public Constructors

public NoteAnnotationDefaultsProvider (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 String[] getAvailableIconNames ()

Provides name of note annotation icons available in the icon picker.

public int getDefaultColor ()

Provides default annotation foreground color.

Returns
  • Foreground color used as default for editing annotations.

public String getDefaultIconName ()

Provides default note annotation icon name.

Returns
  • Name of the note annotation icon used as default when creating new annotations.

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.