Interface AnnotationEditingController

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

    
    public interface AnnotationEditingController
     implements FragmentSpecialModeController
                        

    Default controller given when entering annotation editing mode. Used to control annotation editing mode actions.

    • Constructor Detail

    • Method Detail

      • hasCurrentlySelectedAnnotations

         boolean hasCurrentlySelectedAnnotations()

        Returns whether there are any currently selected annotations.

        Returns:

        true if there are currently selected annotations, false otherwise.

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

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

      • startRecording

         abstract void startRecording()

        Starts recording the edits.

      • stopRecording

         abstract void stopRecording()

        Stops recording the edits, notifies the result and clears current record, so calling startRecording will start from clean state.

      • recordAnnotationZIndexEdit

         abstract void recordAnnotationZIndexEdit(@NonNull() Annotation annotation, int oldZIndex, int newZIndex)

        Records the z-index being changed on the specified annotation.

        Parameters:
        annotation - Annotation being reordered.
        oldZIndex - Old z-index of the annotation.
        newZIndex - New z-index of the annotation.
      • showAnnotationEditor

         abstract void showAnnotationEditor(@NonNull() Annotation annotation)

        Shows annotation editor for the passed annotation.

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

         abstract void enterAudioPlaybackMode()

        Starts playback mode for the currently selected sound annotation.

      • enterAudioRecordingMode

         abstract void enterAudioRecordingMode()

        Starts recording mode for the currently selected sound annotation.

      • shouldDisplayPlayAudioButton

         abstract boolean shouldDisplayPlayAudioButton()

        Whether play button should be displayed for the selected sound annotation.

      • shouldDisplayRecordAudioButton

         abstract boolean shouldDisplayRecordAudioButton()

        Whether record button should be displayed for the selected sound annotation.

      • showEditedAnnotationPositionOnThePage

         abstract void showEditedAnnotationPositionOnThePage(int pageIndex)

        Temporarily hides the selected/edited annotation view and shows its relative position on the page.

        Parameters:
        pageIndex - A page on which to temporarily hide the selected annotation views.
      • isDeleteEnabled

         boolean isDeleteEnabled()

        Checks if all currently edited annotations can be deleted.

        Returns:

        true if all edited annotations can be deleted, false otherwise

      • isDeleteEnabled

         abstract boolean isDeleteEnabled(@Nullable() List<Annotation> annotations)

        Checks if all provided annotations can be deleted.

        Returns:

        true if all annotations can be deleted, false otherwise

      • isCopyEnabled

         boolean isCopyEnabled()

        Checks if all currently edited annotations can be copied.

        Returns:

        true if all annotations can be copied, false otherwise

      • isCopyEnabled

         abstract boolean isCopyEnabled(@Nullable() List<Annotation> annotations)

        Checks if all provided annotations can be copied.

        Returns:

        true if all annotations can be copied, false otherwise

      • isCutEnabled

         boolean isCutEnabled()

        Checks if all currently edited annotations can be cut.

        Returns:

        true if all annotations can be cut, false otherwise

      • isCutEnabled

         boolean isCutEnabled(@Nullable() List<Annotation> annotations)

        Checks if all provided annotations can be cut.

        Returns:

        true if all annotations can be cut, false otherwise