com.crionics.jpdf.action
Class AbstractAction

java.lang.Object
  extended by PdfObjectContainer
      extended by com.crionics.jpdf.action.AbstractAction
Direct Known Subclasses:
GotoAction, HideAction, JavaScriptAction, LaunchAction, NamedAction, ResetFormAction, SubmitFormAction, URIAction

public abstract class AbstractAction
extends PdfObjectContainer

Abstract implementation of an action, where the common methods are stored.

Actions are tasks which are performed by a PDF Viewer application when their container are activated.
Actions can be associated with:

The PDF Specification includes a wide variety of standard action types as follow:
GotoAction Go to a destination in the current document.
HideAction Set an annotation’s Hidden flag.
JavaScriptAction Execute a JavaScript script.
LaunchAction Launch an application, usually to open a file.
NamedAction Execute an action predefined by the viewer application.
ResetFormAction Set fields to their default values.
SubmitFormAction Send data to a uniform resource locator.
URIAction Resolve a uniform resource identifier.
GoToR Go to a destination in another document.
GoToE Go to a destination in an embedded file.
Thread Begin reading an article thread.
Sound Play a sound.
Movie Play a movie.
ImportData Import field values from a file.
SetOCGState Set the states of optional content groups.
Rendition Controls the playing of multimedia content.
Trans Updates the display of a document, using a transition dictionary.
GoTo3DView Set the current view of a 3D annotation.
A facility is also available to add multiple actions to be trigged (see setNextAction(AbstractAction)).


Method Summary
 AbstractAction getNextAction()
          Returns the next action which will be executed after the current one.
 boolean hasNextAction()
          Checks for the presence of another action registered to be executed after the current one.
 void setNextAction(AbstractAction action)
          Sets the next action to execute after the current one.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNextAction

public AbstractAction getNextAction()
                             throws PdfException,
                                    java.io.IOException
Returns the next action which will be executed after the current one.

Returns:
The next action in the list, or null if none exists.
Throws:
PdfException - If a problem occured while parsing the document.
java.io.IOException - If a problem occured while parsing the file.

hasNextAction

public boolean hasNextAction()
Checks for the presence of another action registered to be executed after the current one.

Returns:
true if it is the case, false otherwise.

setNextAction

public void setNextAction(AbstractAction action)
                   throws PdfException,
                          java.io.IOException
Sets the next action to execute after the current one.

Parameters:
action - The action to add to the current list, or null if the rest of the list should be deleted.
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.