org.apache.pdfbox.pdmodel.interactive.action

## Class PDActionJavaScript

- java.lang.Object
- - org.apache.pdfbox.pdmodel.interactive.action.PDAction
  - - org.apache.pdfbox.pdmodel.interactive.action.PDActionJavaScript

All Implemented Interfaces:
  COSObjectable, PDDestinationOrAction

    public class PDActionJavaScript
    extends PDAction

This represents a JavaScript action.

Author:
  Michael Schwarzenberger

### Field Summary

Fields
`static String` `SUB_TYPE` This type of action this object represents.

### Fields inherited from class org.apache.pdfbox.pdmodel.interactive.action.PDAction

`action, TYPE`

### Constructor Summary

Constructors
Constructor and Description
`PDActionJavaScript()` Constructor #1.
`PDActionJavaScript(COSDictionary a)` Constructor #2.
`PDActionJavaScript(String js)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getAction()`
`void` `setAction(String sAction)`

### Methods inherited from class org.apache.pdfbox.pdmodel.interactive.action.PDAction

`getCOSObject, getNext, getSubType, getType, setNext, setSubType, setType`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### SUB_TYPE

    public static final String SUB_TYPE

This type of action this object represents.

See Also:
  Constant Field Values

### Constructor Detail

#### PDActionJavaScript

    public PDActionJavaScript()

Constructor #1.

#### PDActionJavaScript

    public PDActionJavaScript(String js)

Constructor.

Parameters:
  `js` - Some javascript code.

#### PDActionJavaScript

    public PDActionJavaScript(COSDictionary a)

Constructor #2.

Parameters:
  `a` - The action dictionary.

### Method Detail

#### setAction

    public final void setAction(String sAction)

Parameters:
  `sAction` - The JavaScript.

#### getAction

    public String getAction()

Returns:
  The Javascript Code.