public static interface

AnnotationCreationToolbar.ItemToAnnotationToolMapper

com.pspdfkit.ui.toolbar.AnnotationCreationToolbar.ItemToAnnotationToolMapper

Class Overview

A mapper that allows you to map the IDs of AnnotationCreationToolbar menu items with the annotation tool (and variant) you want it to activate/deactivate. The annotation creation toolbar will automatically handle all the logic.

Summary

Public Methods
abstract SparseArray<Pair<AnnotationToolAnnotationToolVariant>> getItemToAnnotationToolMapping()
Gets the sparse array mapping contextual toolbar menu item ids with the pair of annotation tool and its variant that it handles.
abstract boolean isStyleIndicatorCircleEnabled(int itemId)
Whether the icon of item with specified ID should display the current properties used by its mapped tool.

Public Methods

public abstract SparseArray<Pair<AnnotationToolAnnotationToolVariant>> getItemToAnnotationToolMapping ()

Gets the sparse array mapping contextual toolbar menu item ids with the pair of annotation tool and its variant that it handles.

Returns
  • Sparse array of item IDs mapped to the annotation tools and variants they handle.

public abstract boolean isStyleIndicatorCircleEnabled (int itemId)

Whether the icon of item with specified ID should display the current properties used by its mapped tool. The style indicator is shown in the top left corner of the item's icon. If the provided ID is not mapped to any annotation tool, this will have no effect.

Parameters
itemId ID of the item for which the style indicator should be displayed or not.
Returns
  • true to display the style indicator for the item, false otherwise.