public interface

AnnotationSelectionController

com.pspdfkit.ui.special_mode.controller.AnnotationSelectionController

Class Overview

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 AnnotationManager.OnAnnotationSelectedListener using addOnAnnotationSelectedListener(AnnotationManager.OnAnnotationSelectedListener).

Summary

Public Methods
abstract AnnotationSelectionViewThemeConfiguration getAnnotationSelectionViewThemeConfiguration()
Gets the theme configuration used to customize the annotation selection view.
abstract boolean isDraggingEnabled()
Test whether selection dragging is enabled.
abstract Boolean isKeepAspectRatioEnabled()
Test whether aspect ratio is maintained when resizing.
abstract boolean isResizeEnabled()
Test if selection resizing is enabled.
abstract boolean isResizeGuidesEnabled()
Test whether resize guides are enabled.
abstract boolean isRotationEnabled()
Check whether rotating annotations (that support it) is enabled.
abstract void setAnnotationSelectionViewThemeConfiguration(AnnotationSelectionViewThemeConfiguration configuration)
Sets a theme configuration to customize the annotation selection view.
abstract void setDraggingEnabled(boolean isDragEnabled)
Enable or disable selection dragging.
abstract void setKeepAspectRatioEnabled(boolean keepAspectRatio)
Forces selection to keep/not keep aspect ratio.
abstract void setResizeEnabled(boolean resizeEnabled)
Enable or disable selection resizing.
abstract void setResizeGuidesEnabled(boolean resizeGuidesEnabled)
Enable or disable resize guides.
abstract void setRotationEnabled(boolean isRotationEnabled)
Enable or disable annotation rotation.

Public Methods

public abstract AnnotationSelectionViewThemeConfiguration getAnnotationSelectionViewThemeConfiguration ()

Gets the theme configuration used to customize the annotation selection view.

Returns
  • theme configuration used to customize the annotation selection view.

public abstract boolean isDraggingEnabled ()

Test whether selection dragging is enabled.

Returns
  • True when selection is draggable.

public 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).

public abstract boolean isResizeEnabled ()

Test if selection resizing is enabled.

Returns
  • True when annotation can be resized in selection.

public abstract boolean isResizeGuidesEnabled ()

Test whether resize guides are enabled.

Returns
  • True when resize guides are enabled.

public abstract boolean isRotationEnabled ()

Check whether rotating annotations (that support it) is enabled.

Returns
  • true when annotation rotation is enabled, false otherwise.

public abstract void setAnnotationSelectionViewThemeConfiguration (AnnotationSelectionViewThemeConfiguration configuration)

Sets a theme configuration to customize the annotation selection view.

Parameters
configuration Theme configuration to be applied to the annotation selection view.

public abstract void setDraggingEnabled (boolean isDragEnabled)

Enable or disable selection dragging.

Parameters
isDragEnabled True when selection can be dragged.

public abstract void setKeepAspectRatioEnabled (boolean keepAspectRatio)

Forces selection to keep/not keep aspect ratio. When not set uses default behavior when only image annotations will keep aspect ratio.

Parameters
keepAspectRatio True when aspect ratio should be kept when resizing.

public 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.

public 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.

public abstract void setRotationEnabled (boolean isRotationEnabled)

Enable or disable annotation rotation.

Parameters
isRotationEnabled true to enable annotation rotation, false to disable it.