com.crionics.jpdf.action
Class NamedAction

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

public class NamedAction
extends AbstractAction

Allows a specific action to be executed when viewing a document.

Note 1: Viewer applications may support additional, nonstandard named actions, but any document using them would not be portable. If the viewer encounters a named action that is inappropriate for a viewing platform, or if the viewer does not recognize the name, it will take no action.

Note2 :Acrobat viewers extend the list of named actions to include most of the menu item names available in the viewer.


Field Summary
static java.lang.String FIRSTPAGE
          Go to the first page of the document.
static java.lang.String LASTPAGE
          Go to the last page of the document.
static java.lang.String NEXTPAGE
          Go to the next page of the document.
static java.lang.String PREVPAGE
          Go to the previous page of the document.
 
Method Summary
static NamedAction createInstance(PdfDocument doc)
          Allows the creation of a new Action into the Specified document.
 java.lang.String getName()
          Recovers the Action defined within this object.
 void setName(java.lang.String name)
          Sets the Action to be realised by this object.
 
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
 

Field Detail

FIRSTPAGE

public static final java.lang.String FIRSTPAGE
Go to the first page of the document.


LASTPAGE

public static final java.lang.String LASTPAGE
Go to the last page of the document.


NEXTPAGE

public static final java.lang.String NEXTPAGE
Go to the next page of the document.


PREVPAGE

public static final java.lang.String PREVPAGE
Go to the previous page of the document.

Method Detail

createInstance

public static NamedAction 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.

getName

public java.lang.String getName()
                         throws PdfException,
                                java.io.IOException
Recovers the Action defined within this object. The value returned can be any of the constant defined in this class, or another value which is viewer dependant.

Returns:
A String value defining the action to be performed by a PDF Viewer application.
Throws:
PdfException - If a problem occured while parsing the document.
java.io.IOException - If a problem occured while parsing the file.

setName

public void setName(java.lang.String name)
             throws PdfException,
                    java.io.IOException
Sets the Action to be realised by this object. The value returned can be any of the constant defined in this class, or another value which is viewer dependant (like for examples the string "Print" for Acrobat products).

Parameters:
name - The action to set.
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.