java.lang.Object | |
↳ | com.pspdfkit.ui.special_mode.controller.AnnotationToolVariant |
Annotation tools can have variants represented by the name. To create a custom annotation tool
variant use fromName(String)
, and to get an instance of the default tool variant used by
the framework, use defaultVariant()
static creator. This class represents a variant of
the tool. You can pass it alongside the AnnotationTool
in enterAnnotationCreationMode(AnnotationTool, AnnotationToolVariant)
to start the annotation creation mode with the specified variant of the provided annotation tool.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
enum | AnnotationToolVariant.Preset | Annotation tool variants defined by the framework. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public static final Creator<AnnotationToolVariant> | CREATOR |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static AnnotationToolVariant |
defaultVariant()
Gets an instance of the default annotation tool variant used in the framework.
| ||||||||||
int | describeContents() | ||||||||||
boolean | equals(Object obj) | ||||||||||
static AnnotationToolVariant |
fromName(String variantName)
Gets an instance of the annotation tool variant with specified name.
| ||||||||||
static AnnotationToolVariant |
fromPreset(AnnotationToolVariant.Preset preset)
Gets an instance of the tool variant from the specified framework presets (the variants that
are inside the framework by default)
| ||||||||||
String |
getName()
Gets the name of this annotation tool variant, or
null if this is the default one. | ||||||||||
int | hashCode() | ||||||||||
void | writeToParcel(Parcel dest, int flags) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Gets an instance of the default annotation tool variant used in the framework.
Gets an instance of the annotation tool variant with specified name. The variant cannot be an
empty string. When specifying your own preset, make sure that the name doesn't collide with
the pre-defined variants used in the framework. Those are defined in enum called AnnotationToolVariant.Preset
. If you'd like to get one of the variants from our framework (from preset), you
should use fromPreset(Preset)
static creator.
variantName | Name of the variant to get an instance of. |
---|
Gets an instance of the tool variant from the specified framework presets (the variants that are inside the framework by default)
preset | Preset for which to get the annotation tool variant. |
---|
Gets the name of this annotation tool variant, or null
if this is the default one.