public final class

HideAction

extends Action
java.lang.Object
   ↳ com.pspdfkit.annotations.actions.Action
     ↳ com.pspdfkit.annotations.actions.HideAction

Class Overview

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

Summary

Public Constructors
HideAction(List<Annotation> annotations, List<FormElement> formElements, boolean shouldHide)
Creates action instance.
HideAction(List<Annotation> annotations, List<FormElement> formElements, boolean shouldHide, List<Action> subActions)
Creates action instance.
Public Methods
boolean equals(Object o)
Observable<List<Annotation>> getAnnotationsAsync(PdfDocument document)
Resolves target annotations.
ActionType getType()
Returns type of action to make down-casting easier.
int hashCode()
boolean shouldHide()
Whether to hide or show referenced annotations/form elements.
String toString()
[Expand]
Inherited Methods
From class com.pspdfkit.annotations.actions.Action
From class java.lang.Object

Public Constructors

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

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

Public Methods

public boolean equals (Object o)

public Observable<List<Annotation>> getAnnotationsAsync (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.

public ActionType getType ()

Returns type of action to make down-casting easier.

Returns
  • Type of this action.

public int hashCode ()

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

public String toString ()