Interface AnnotationSelectionController
-
- All Implemented Interfaces:
public interface AnnotationSelectionController
Controls configurable properties on annotation selection layout that allows touch based editing (i.e. moving, scaling) on selected annotations. Can be retrieved by registering an using addOnAnnotationSelectedListener.
-
-
Method Summary
Modifier and Type Method Description abstract boolean
isResizeEnabled()
Test if selection resizing is enabled. abstract void
setResizeEnabled(boolean resizeEnabled)
Enable or disable selection resizing. abstract boolean
isResizeGuidesEnabled()
Test whether resize guides are enabled. abstract void
setResizeGuidesEnabled(boolean resizeGuidesEnabled)
Enable or disable resize guides. abstract void
setKeepAspectRatioEnabled(boolean keepAspectRatio)
Forces selection to keep/not keep aspect ratio. abstract Boolean
isKeepAspectRatioEnabled()
Test whether aspect ratio is maintained when resizing. abstract boolean
isDraggingEnabled()
Test whether selection dragging is enabled. abstract void
setDraggingEnabled(boolean isDragEnabled)
Enable or disable selection dragging. abstract boolean
isRotationEnabled()
Check whether rotating annotations (that support it) is enabled. abstract void
setRotationEnabled(boolean isRotationEnabled)
Enable or disable annotation rotation. abstract AnnotationSelectionViewThemeConfiguration
getAnnotationSelectionViewThemeConfiguration()
Gets the theme configuration used to customize the annotation selection view. abstract void
setAnnotationSelectionViewThemeConfiguration(@NonNull() AnnotationSelectionViewThemeConfiguration configuration)
Sets a theme configuration to customize the annotation selection view. -
-
Method Detail
-
isResizeEnabled
abstract boolean isResizeEnabled()
Test if selection resizing is enabled.
- Returns:
True when annotation can be resized in selection.
-
setResizeEnabled
abstract void setResizeEnabled(boolean resizeEnabled)
Enable or disable selection resizing.
- Parameters:
resizeEnabled
- When false, drag handles won't be drawn and annotation resizing will be disabled.
-
isResizeGuidesEnabled
abstract boolean isResizeGuidesEnabled()
Test whether resize guides are enabled.
- Returns:
True when resize guides are enabled.
-
setResizeGuidesEnabled
abstract void setResizeGuidesEnabled(boolean resizeGuidesEnabled)
Enable or disable resize guides.
- Parameters:
resizeGuidesEnabled
- When false, resize guides won't be drawn and snapping to square and aspect ratio will be disabled.
-
setKeepAspectRatioEnabled
abstract void setKeepAspectRatioEnabled(boolean keepAspectRatio)
Forces selection to keep/not keep aspect ratio. When false - resizing annotation is free and aspect ratio is not maintained. When true - resizing annotation will keep aspect ratio.
Note: image annotations keep aspect ratio regardless.
- Parameters:
keepAspectRatio
- True when aspect ratio should be kept when resizing.
-
isKeepAspectRatioEnabled
@Nullable() abstract Boolean isKeepAspectRatioEnabled()
Test whether aspect ratio is maintained when resizing.
- Returns:
True when keeping aspect ratio is enabled, false when it's disabled.
null
when default behavior is used - i.e. enabled for certain annotations (for example image stamps).
-
isDraggingEnabled
abstract boolean isDraggingEnabled()
Test whether selection dragging is enabled.
- Returns:
True when selection is draggable.
-
setDraggingEnabled
abstract void setDraggingEnabled(boolean isDragEnabled)
Enable or disable selection dragging.
- Parameters:
isDragEnabled
- True when selection can be dragged.
-
isRotationEnabled
abstract boolean isRotationEnabled()
Check whether rotating annotations (that support it) is enabled.
- Returns:
true
when annotation rotation is enabled,false
otherwise.
-
setRotationEnabled
abstract void setRotationEnabled(boolean isRotationEnabled)
Enable or disable annotation rotation.
- Parameters:
isRotationEnabled
-true
to enable annotation rotation,false
to disable it.
-
getAnnotationSelectionViewThemeConfiguration
@NonNull() abstract AnnotationSelectionViewThemeConfiguration getAnnotationSelectionViewThemeConfiguration()
Gets the theme configuration used to customize the annotation selection view.
- Returns:
theme configuration used to customize the annotation selection view.
-
setAnnotationSelectionViewThemeConfiguration
abstract void setAnnotationSelectionViewThemeConfiguration(@NonNull() AnnotationSelectionViewThemeConfiguration configuration)
Sets a theme configuration to customize the annotation selection view.
- Parameters:
configuration
- Theme configuration to be applied to the annotation selection view.
-
-
-
-