com.crionics.jpdf.action
Class JavaScriptAction

java.lang.Object
  extended by PdfObjectContainer
      extended by com.crionics.jpdf.action.AbstractAction
          extended by com.crionics.jpdf.action.JavaScriptAction

public class JavaScriptAction
extends AbstractAction

A JavaScript action causes a script to be compiled and executed by the JavaScript interpreter of a PDF Viewer application.

Depending on the nature of the script, this can cause various interactive form fields in the document to update their values or change their visual appearances.


Method Summary
static JavaScriptAction createInstance(PdfDocument doc)
          Allows the creation of a new Action into the Specified document.
 java.lang.String getJavaScript()
          Returns the JavaScript code present in this action.
 void setJavaScript(java.lang.String code)
          Sets the JavaScript code which will be processed when this action is evaluated.
 
Methods inherited from class com.crionics.jpdf.action.AbstractAction
getNextAction, hasNextAction, setNextAction
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createInstance

public static JavaScriptAction createInstance(PdfDocument doc)
                                       throws PdfException,
                                              java.io.IOException
Allows the creation of a new Action into the Specified document.

The usage of this method requires the acquision of the Module jPDF Creator or jPDF Template

Parameters:
doc - The Document into which the Action should be created.
Returns:
The action created.
Throws:
PdfException - If a problem occured while parsing the document.
java.io.IOException - If a problem occured while parsing the file.

getJavaScript

public java.lang.String getJavaScript()
                               throws PdfException,
                                      java.io.IOException
Returns the JavaScript code present in this action.

Returns:
String The JavaScript code.
Throws:
PdfException - If a problem occured while parsing the document.
java.io.IOException - If a problem occured while parsing the file.

setJavaScript

public void setJavaScript(java.lang.String code)
                   throws PdfException,
                          java.io.IOException
Sets the JavaScript code which will be processed when this action is evaluated.

Parameters:
code - The JavaScript code.
Throws:
PdfException - If a problem occured while parsing the document.
java.io.IOException - If a problem occured while parsing the file.


Copyright © 1999-2007 Crionics. All Rights Reserved.