com.qoppa.pdfViewer.actions
Class JSAction

java.lang.Object
  extended by com.qoppa.pdfViewer.actions.Action
      extended by com.qoppa.pdfViewer.actions.JSAction

public class JSAction
extends Action

Action that executes a JavaScript.


Field Summary
static String ACTION_TYPE_DESCRIPTION
           
 
Constructor Summary
JSAction(com.qoppa.pdf.loObjects.PDFReference jsStream)
          Constructs the action with a reference to a JavaScript stream.
JSAction(String js)
          Constructs the action with a JavaScript string.
 
Method Summary
 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.
 String toString()
          Returns the description of the action.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACTION_TYPE_DESCRIPTION

public static String ACTION_TYPE_DESCRIPTION
Constructor Detail

JSAction

public JSAction(String js)
Constructs the action with a JavaScript string.

Parameters:
js - The JavaScript

JSAction

public JSAction(com.qoppa.pdf.loObjects.PDFReference jsStream)
Constructs the action with a reference to a JavaScript stream.

Parameters:
jsStream - The JavaScript
Method Detail

getActionType

public String getActionType()
Description copied from class: Action
Returns the type of action.

Specified by:
getActionType in class Action
Returns:
The action type.

getActionTypeDesc

public String getActionTypeDesc()
Description copied from class: Action
Returns the action type description

Specified by:
getActionTypeDesc in class Action

toString

public String toString()
Returns the description of the action.

Overrides:
toString in class Object

getJavascript

public String getJavascript()
                     throws PDFException
Returns the JavaScript of this action as a string.

Returns:
The JavaScript
Throws:
PDFException

equals

public boolean equals(Object obj)
Compares this object to another for equality. If the other object is also a JSAction object and the Javascript code held by both objects is the same, this method will return true.

Overrides:
equals in class Object
Parameters:
obj - The object to compare to.