Interface AnnotationConfiguration
-
- All Implemented Interfaces:
public interface AnnotationConfiguration
Base for all annotation configuration classes. Contains configuration options shared by all annotation types.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
AnnotationConfiguration.Builder
Builder for AnnotationConfiguration. All builders declared in subclasses of annotation configuration must extend this builder.
-
Method Summary
Modifier and Type Method Description 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. abstract boolean
getForceDefaults()
Indicates whether defaults defined by this configuration should be enforced. static AnnotationConfiguration.Builder<out AnnotationConfiguration.Builder>
builder(@NonNull() Context context, @NonNull() AnnotationTool annotationTool)
Creates a new instance of annotation configuration builder for given annotation tool. static AnnotationConfiguration.Builder<out AnnotationConfiguration.Builder>
builder(@NonNull() Context context, @NonNull() AnnotationType annotationType)
Creates a new instance of annotation configuration builder for given annotation type. -
-
Method Detail
-
getSupportedProperties
@NonNull() 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.
-
isZIndexEditingEnabled
abstract boolean isZIndexEditingEnabled()
Indicates whether the z-index editing is enabled for this annotation type.
- Returns:
true
if enabled,false
otherwise.
-
getForceDefaults
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 .
-
builder
@NonNull() static AnnotationConfiguration.Builder<out AnnotationConfiguration.Builder> builder(@NonNull() Context context, @NonNull() 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:
Implementation of AnnotationConfiguration.Builder implementing configuration interfaces for all annotation properties supported by
annotationTool
.
-
builder
@NonNull() static AnnotationConfiguration.Builder<out AnnotationConfiguration.Builder> builder(@NonNull() Context context, @NonNull() 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:
Implementation of AnnotationConfiguration.Builder implementing configuration interfaces for all annotation properties supported by
annotationType
.
-
-
-
-