Package com.pspdfkit.annotations.actions
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.
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
Modifier and Type Method Description ActionType
getType()
Returns type of action to make down-casting easier. boolean
shouldHide()
Whether to hide or show referenced annotations/form elements. Observable<List<Annotation>>
getAnnotationsAsync(@NonNull() PdfDocument document)
Resolves target annotations. boolean
equals(Object o)
int
hashCode()
String
toString()
-
-
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.
-
hashCode
int hashCode()
-
-
-
-