Class HideAction

  • All Implemented Interfaces:

    
    public final class HideAction
    extends Action
                        

    A hide action hides or shows one or more annotations on the screen by setting or clearing their hidden flags.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

      • HideAction

        HideAction(List<Annotation> annotations, List<FormElement> formElements, boolean shouldHide)
        Creates action instance.
        Parameters:
        annotations - List of target annotations.
        formElements - List of target form elements.
        shouldHide - true to hide targets, false to show them.
      • HideAction

        HideAction(List<Annotation> annotations, List<FormElement> formElements, boolean shouldHide, List<Action> subActions)
        Creates action instance.
        Parameters:
        annotations - List of target annotations.
        formElements - List of target form elements.
        shouldHide - true to hide targets, false to show them.
        subActions - List of sub-actions of this action.
    • Method Detail

      • getType

        @NonNull() ActionType getType()

        Returns type of action to make down-casting easier.

        Returns:

        Type of this action.

      • shouldHide

         boolean shouldHide()

        Whether to hide or show referenced annotations/form elements. This is achieved by removing both INVISIBLE and NOVIEW and toggling HIDDEN.

        Returns:

        true when referenced annotations/form elements should be hidden, false when they should be shown.

      • getAnnotationsAsync

        @NonNull() Observable<List<Annotation>> getAnnotationsAsync(@NonNull() PdfDocument document)

        Resolves target annotations. These annotation will be shown/hidden when action is executed.

        Parameters:
        document - Owning document.
        Returns:

        Observable emitting a list of target annotations. This list includes widget annotations of target form elements.