public class JSAction extends Action
Modifier and Type | Field and Description |
---|---|
static String |
ACTION_TYPE_DESCRIPTION |
OPEN_EXISTING_WINDOW, OPEN_NEW_WINDOW, OPEN_USER_PREFERENCE
Constructor and Description |
---|
JSAction(PDFReference jsStream)
Constructs the action with a reference to a JavaScript stream.
|
JSAction(String js)
Constructs the action with a JavaScript string.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compares this object to another for equality.
|
String |
getActionType()
Returns the type of action.
|
String |
getActionTypeDesc()
Returns the action type description
|
String |
getJavascript()
Returns the JavaScript of this action as a string.
|
void |
setJavaScriptString(String newJS)
Sets the JavaScript of this action with a string.
|
String |
toString()
Returns the description of the action.
|
getNextAction, setNextAction
public static String ACTION_TYPE_DESCRIPTION
public JSAction(String js)
js
- The JavaScriptpublic JSAction(PDFReference jsStream)
jsStream
- The JavaScriptpublic String getActionType()
Action
getActionType
in class Action
public String getActionTypeDesc()
Action
getActionTypeDesc
in class Action
public String toString()
public void setJavaScriptString(String newJS)
newJS
- The new JavaScript string for this action.public String getJavascript() throws PDFException
PDFException