PDF Clown
0.1.2

org.pdfclown.documents.interaction.actions
Class JavaScript

java.lang.Object
  extended by org.pdfclown.objects.PdfObjectWrapper<PdfDictionary>
      extended by org.pdfclown.documents.interaction.actions.Action
          extended by org.pdfclown.documents.interaction.actions.JavaScript
All Implemented Interfaces:
Cloneable, IPdfNamedObjectWrapper, IPdfObjectWrapper

@PDF(value=PDF13)
public final class JavaScript
extends Action
implements IPdfNamedObjectWrapper

'Cause a script to be compiled and executed by the JavaScript interpreter' action [PDF:1.6:8.6.4].

Since:
0.0.7
Version:
0.1.2, 12/21/12
Author:
Stefano Chizzolini (http://www.stefanochizzolini.it)

Constructor Summary
JavaScript(Document context, String script)
          Creates a new action within the given document context.
 
Method Summary
 JavaScript clone(Document context)
          Gets a clone of the object, registered inside the given document context.
 PdfString getName()
          Gets the object name.
 PdfDirectObject getNamedBaseObject()
          Gets the object name, if available; otherwise, behaves like getBaseObject().
 String getScript()
          Gets the JavaScript script to be executed.
 void setScript(String value)
           
 
Methods inherited from class org.pdfclown.documents.interaction.actions.Action
getActions, setActions, wrap
 
Methods inherited from class org.pdfclown.objects.PdfObjectWrapper
checkCompatibility, delete, equals, exists, getBaseDataObject, getBaseObject, getBaseObject, getContainer, getDataContainer, getDocument, getFile, getMetadata, retrieveName, retrieveNamedBaseObject, setBaseObject, setMetadata
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pdfclown.objects.IPdfObjectWrapper
getBaseObject
 

Constructor Detail

JavaScript

public JavaScript(Document context,
                  String script)
Creates a new action within the given document context.

Method Detail

clone

public JavaScript clone(Document context)
Description copied from class: PdfObjectWrapper
Gets a clone of the object, registered inside the given document context.

Overrides:
clone in class Action
Parameters:
context - Which document the clone has to be registered in.

getScript

public String getScript()
Gets the JavaScript script to be executed.


setScript

public void setScript(String value)
See Also:
getScript()

getName

public PdfString getName()
Description copied from interface: IPdfNamedObjectWrapper
Gets the object name.

As names are tipically loosely-coupled with their corresponding PDF objects, name retrieval implies a costly reverse lookup into the document's name tree.

Specified by:
getName in interface IPdfNamedObjectWrapper

getNamedBaseObject

public PdfDirectObject getNamedBaseObject()
Description copied from interface: IPdfNamedObjectWrapper
Gets the object name, if available; otherwise, behaves like getBaseObject().

Specified by:
getNamedBaseObject in interface IPdfNamedObjectWrapper

PDF Clown
0.1.2

Project home page

Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.