public final class

JavaScriptAction

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

Class Overview

Action that should trigger execution of JavaScript embedded in it.

Summary

Public Constructors
JavaScriptAction(String script)
Constructs the JavaScript action with given script.
JavaScriptAction(String script, List<Action> subActions)
Constructs the JavaScript action with given script.
Public Methods
boolean equals(Object o)
String getScript()
Returns JavaScript code to be executed.
ActionType getType()
Returns type of action to make down-casting easier.
int hashCode()
[Expand]
Inherited Methods
From class com.pspdfkit.annotations.actions.Action
From class java.lang.Object

Public Constructors

public JavaScriptAction (String script)

Constructs the JavaScript action with given script.

Parameters
script Script that should be executed when the action gets triggered.

public JavaScriptAction (String script, List<Action> subActions)

Constructs the JavaScript action with given script.

Parameters
script Script that should be executed when the action gets triggered.
subActions List of sub-actions of this action.

Public Methods

public boolean equals (Object o)

public String getScript ()

Returns JavaScript code to be executed.

Returns
  • javascript source.

public ActionType getType ()

Returns type of action to make down-casting easier.

Returns
  • Type of this action.

public int hashCode ()