Interface AnnotationPreferencesManager

    • Constructor Detail

    • Method Detail

      • isAnnotationCreatorSet

         abstract boolean isAnnotationCreatorSet()

        Checks if the annotation creator has been set.

        Returns:

        return false if the annotation creator has not been set, true otherwise.

      • getColor

        @ColorInt() abstract int getColor(@NonNull() AnnotationTool annotationTool)

        Retrieve last configured color from preferences. Uses default tool variant.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        Returns:

        Last configured color from preferences or default color if not available.

      • getColor

        @ColorInt() abstract int getColor(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant)

        Retrieve last configured color from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        toolVariant - Variant of the annotation tool.
        Returns:

        Last configured color from preferences or default color if not available.

      • setColor

         abstract void setColor(@NonNull() AnnotationTool annotationTool, @ColorInt() int color)

        Sets annotation color to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        color - Color to set.
      • setColor

         abstract void setColor(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant, @ColorInt() int color)

        Sets annotation color to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        toolVariant - Variant of the annotation tool.
        color - Color to set.
      • getFillColor

        @ColorInt() abstract int getFillColor(@NonNull() AnnotationTool annotationTool)

        Retrieve last configured fill color from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        Returns:

        Last configured fill color from preferences or default fill color if not available.

      • getFillColor

        @ColorInt() abstract int getFillColor(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant)

        Retrieve last configured fill color from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        toolVariant - Variant of the annotation tool.
        Returns:

        Last configured fill color from preferences or default fill color if not available.

      • setFillColor

         abstract void setFillColor(@NonNull() AnnotationTool annotationTool, @ColorInt() int color)

        Sets annotation fill color to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        color - Color to set.
      • setFillColor

         abstract void setFillColor(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant, @ColorInt() int color)

        Sets annotation fill color to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        toolVariant - Variant of the annotation tool.
        color - Color to set.
      • getOutlineColor

        @ColorInt() abstract int getOutlineColor(@NonNull() AnnotationTool annotationTool)

        Retrieve last configured outline color from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        Returns:

        Last configured outline color from preferences or default outline color if not available.

      • getOutlineColor

        @ColorInt() abstract int getOutlineColor(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant)

        Retrieve last configured outline color from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        toolVariant - Variant of the annotation tool.
        Returns:

        Last configured outline color from preferences or default outline color if not available.

      • setOutlineColor

         abstract void setOutlineColor(@NonNull() AnnotationTool annotationTool, @ColorInt() int color)

        Sets annotation outline color to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        color - Color to set.
      • getTextSize

        @FloatRange(from = 1.0) abstract float getTextSize(@NonNull() AnnotationTool annotationTool)

        Gets last configured text size from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        Returns:

        Last configured text size from preferences or default size if not available.

      • getTextSize

        @FloatRange(from = 1.0) abstract float getTextSize(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant)

        Gets last configured text size from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        toolVariant - Variant of the annotation tool.
        Returns:

        Last configured text size from preferences or default size if not available.

      • setTextSize

         abstract void setTextSize(@NonNull() AnnotationTool annotationTool, @FloatRange(from = 1.0) float textSize)

        Sets text size to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        textSize - Text size in pt.
      • setTextSize

         abstract void setTextSize(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant, @FloatRange(from = 1.0) float textSize)

        Sets text size to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        toolVariant - Variant of the annotation tool.
        textSize - Text size in pt.
      • getThickness

        @FloatRange(from = 0.0) abstract float getThickness(@NonNull() AnnotationTool annotationTool)

        Gets last configured annotation thickness from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        Returns:

        Last configured annotation thickness or default thickness if not available.

      • getThickness

        @FloatRange(from = 0.0) abstract float getThickness(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant)

        Gets last configured annotation thickness from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        toolVariant - Variant of the annotation tool.
        Returns:

        Last configured annotation thickness or default thickness if not available.

      • setThickness

         abstract void setThickness(@NonNull() AnnotationTool annotationTool, @FloatRange(from = 0.0) float thickness)

        Sets annotation thickness to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        thickness - Thickness in pt.
      • setThickness

         abstract void setThickness(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant, @FloatRange(from = 0.0) float thickness)

        Sets annotation thickness to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        toolVariant - Variant of the annotation tool.
        thickness - Thickness in pt.
      • getBorderStylePreset

        @NonNull() abstract BorderStylePreset getBorderStylePreset(@NonNull() AnnotationTool annotationTool)

        Gets last configured annotation border preset from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        Returns:

        Last configured annotation border preset or default if not available.

      • setBorderStylePreset

         abstract void setBorderStylePreset(@NonNull() AnnotationTool annotationTool, @NonNull() BorderStylePreset borderStylePreset)

        Sets annotation border preset to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        borderStylePreset - Border style preset to set.
      • getLineEnds

        @NonNull() abstract Pair<LineEndType, LineEndType> getLineEnds(@NonNull() AnnotationTool annotationTool)

        Gets last configured annotation line ends types from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        Returns:

        Last configured annotation line ends or default if not available.

      • getAlpha

        @FloatRange(from = 0.0, to = 1.0) abstract float getAlpha(@NonNull() AnnotationTool annotationTool)

        Gets last configured annotation alpha from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        Returns:

        Last configured annotation alpha or default alpha if not available.

      • getAlpha

        @FloatRange(from = 0.0, to = 1.0) abstract float getAlpha(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant)

        Gets last configured annotation alpha from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        toolVariant - Variant of the annotation tool.
        Returns:

        Last configured annotation alpha or default alpha if not available.

      • setAlpha

         abstract void setAlpha(@NonNull() AnnotationTool annotationTool, @FloatRange(from = 0.0, to = 1.0) float alpha)

        Sets annotation alpha to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        alpha - Thickness in pt.
      • setAlpha

         abstract void setAlpha(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant, @FloatRange(from = 0.0, to = 1.0) float alpha)

        Sets annotation alpha to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        toolVariant - Variant of the annotation tool.
        alpha - Thickness in pt.
      • getFont

        @NonNull() abstract Font getFont(@NonNull() AnnotationTool annotationTool)

        Gets last configured annotation font from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        Returns:

        Last configured annotation font or default annotation font if not available.

      • getFont

        @NonNull() abstract Font getFont(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant)

        Gets last configured annotation font from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        toolVariant - Variant of the annotation tool.
        Returns:

        Last configured annotation font or default annotation font if not available.

      • setFont

         abstract void setFont(@NonNull() AnnotationTool annotationTool, @NonNull() Font font)

        Sets annotation font to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        font - Font to set.
      • getOverlayText

        @NonNull() abstract String getOverlayText(@NonNull() AnnotationTool annotationTool)

        Gets last configured overlay text from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        Returns:

        The last configured overlay text or default overlay text if not available.

      • getOverlayText

        @NonNull() abstract String getOverlayText(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant)

        Gets last configured overlay text from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        toolVariant - Variant of the annotation tool.
        Returns:

        The last configured overlay text or default overlay text if not available.

      • setOverlayText

         abstract void setOverlayText(@NonNull() AnnotationTool annotationTool, @NonNull() String overlayText)

        Sets the overlay text to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        overlayText - The overlay text to set.
      • getRepeatOverlayText

         abstract boolean getRepeatOverlayText(@NonNull() AnnotationTool annotationTool)

        Gets last configured repeat overlay text setting from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        Returns:

        The last configured repeat overlay text setting.

      • getRepeatOverlayText

         abstract boolean getRepeatOverlayText(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant)

        Gets last configured repeat overlay text setting from preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        toolVariant - Variant of the annotation tool.
        Returns:

        The last configured repeat overlay text setting.

      • setRepeatOverlayText

         abstract void setRepeatOverlayText(@NonNull() AnnotationTool annotationTool, boolean repeatOverlayText)

        Sets the last configured repeat overlay text setting to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        repeatOverlayText - The repeat overlay text setting to set.
      • setRepeatOverlayText

         abstract void setRepeatOverlayText(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant, boolean repeatOverlayText)

        Sets the last configured repeat overlay text setting to preferences.

        Parameters:
        annotationTool - Annotation tool for which we need the preferences.
        toolVariant - Variant of the annotation tool.
        repeatOverlayText - The repeat overlay text setting to set.
      • setMeasurementSnappingEnabled

         abstract void setMeasurementSnappingEnabled(boolean enabled)

        Enables snapping to page graphics for measurement tools. This is a global setting and is not tied to any particular annotation.

        Parameters:
        enabled - true to enable measurement snapping, false to disable it.
      • isMeasurementSnappingEnabled

         abstract boolean isMeasurementSnappingEnabled()

        Returns true if snapping to page graphics for measurement tools is enabled. This is a global setting and is not tied to any particular annotation.

        Returns:

        true if snapping is enabled, false otherwise.