Interface AnnotationCreationController

  • All Implemented Interfaces:
    com.pspdfkit.ui.special_mode.controller.base.FragmentSpecialModeController , com.pspdfkit.ui.special_mode.controller.base.SpecialModeController

    
    public interface AnnotationCreationController
     implements FragmentSpecialModeController
                        

    Default controller given when entering annotation creation mode. Used to control annotation creation mode properties and actions.

    • Constructor Detail

    • Method Detail

      • getActiveAnnotationTool

        @Nullable() abstract AnnotationTool getActiveAnnotationTool()

        Returns annotation creation tool that is currently active.

        Returns:

        Active annotation tool. NONE if annotation creation mode is active but no annotation tool is selected, null if annotation creation mode is inactive.

      • getAnnotationManager

        @NonNull() abstract AnnotationManager getAnnotationManager()

        Returns an annotation manager which you can use to register listeners from the controller.

        Returns:

        Annotation manager managing the annotation editing listeners.

      • getColor

        @ColorInt() abstract int getColor()

        Gets current color set to the annotation creation mode.

        Returns:

        Annotation creation mode color, displayed in the color circle starting up a color picker.

      • setColor

         abstract void setColor(@ColorInt() int color)

        Sets color for the annotation creation mode.

        Parameters:
        color - Annotation creation mode color.
      • getFillColor

        @ColorInt() abstract int getFillColor()

        Gets fill color set to the annotation creation mode.

        Returns:

        Annotation creation mode fill color.

      • setFillColor

         abstract void setFillColor(@ColorInt() int fillColor)

        Sets fill color for the annotation creation mode.

        Parameters:
        fillColor - Annotation creation mode fill color.
      • getOutlineColor

        @ColorInt() abstract int getOutlineColor()

        Gets outline color set to the annotation creation mode.

        Returns:

        Annotation creation mode outline color.

      • setOutlineColor

         abstract void setOutlineColor(@ColorInt() int outlineColor)

        Sets outline color for the annotation creation mode.

        Parameters:
        outlineColor - Annotation creation mode outline color.
      • getThickness

        @FloatRange(from = 0.0) abstract float getThickness()

        Gets thickness set to the annotation creation mode.

        Returns:

        Thickness in PDF points (font size for FREETEXT annotations).

      • setThickness

         abstract void setThickness(@FloatRange(from = 0.0) float thickness)

        Sets thickness to the annotation creation mode.

        Parameters:
        thickness - Thickness in PDF points (font size for FREETEXT annotations).
      • getTextSize

        @FloatRange(from = 1) abstract float getTextSize()

        Gets text size set to the annotation creation mode.

        Returns:

        Text size in PDF points.

      • setTextSize

         abstract void setTextSize(@FloatRange(from = 1) float textSize)

        Sets text size to the annotation creation mode.

        Parameters:
        textSize - Text size in PDF points.
      • setAlpha

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

        Sets alpha to the annotation creation mode.

        Parameters:
        alpha - Alpha in percent from 0 to 1.
      • getAlpha

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

        Gets alpha set to the annotation creation mode.

        Returns:

        Alpha in percent from 0 to 1.

      • setFont

         abstract void setFont(@NonNull() Font font)

        Sets the font to the annotation creation mode.

        Parameters:
        font - The font to use.
      • getFont

         abstract Font getFont()

        Gets the font set to the annotation creation mode.

        Returns:

        The font set.

      • setOverlayText

         abstract void setOverlayText(@NonNull() String overlayText)

        Sets the overlay text to the annotation creation mode.

        Parameters:
        overlayText - The overlay text to use.
      • getOverlayText

        @NonNull() abstract String getOverlayText()

        Gets the overlay text set to the annotation creation mode.

        Returns:

        The overlay text that is set.

      • setRepeatOverlayText

         abstract void setRepeatOverlayText(boolean repeatOverlayText)

        Sets if the overlay text should be repeated.

        Parameters:
        repeatOverlayText - If the overlay text should be repeated.
      • getRepeatOverlayText

         abstract boolean getRepeatOverlayText()

        Returns whether the overlay text should be repeated or not.

        Returns:

        Whether the overlay text should be repeated or not.

      • shouldDisplayPicker

         abstract boolean shouldDisplayPicker()

        Whether annotation inspector toolbar icon should be visible.

      • toggleAnnotationInspector

         abstract void toggleAnnotationInspector()

        Displays/hides an annotation inspector for the selected annotation type.

      • showAnnotationEditor

         abstract void showAnnotationEditor(@NonNull() Annotation annotation)

        Shows annotation editor for the passed annotation.

        Parameters:
        annotation - Annotation for which to show the editor.
      • displayScalePicker

         abstract void displayScalePicker()

        Displays/hides an annotation inspector for the measurement annotation types.