com.crionics.jpdf.action
Class URIAction

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

public class URIAction
extends AbstractAction

A URI action specify a resource on the Internet—typically a file that is the destination of a hypertext link, although it can also resolve to a query or other entity.


Method Summary
static URIAction createInstance(PdfDocument doc)
          Allows the creation of a new Action into the Specified document.
 java.net.URL getURL()
          Returns the URL to be resolved.
 boolean isMap()
          Determines if the map flag is set or not.
 void setMap(boolean flag)
          Sets a flag specifying whether to track the mouse position when the URL is resolved.
 void setURL(java.net.URL url)
          Sets the URL to be resolved.
 
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 URIAction 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.

getURL

public java.net.URL getURL()
                    throws java.io.IOException,
                           PdfException
Returns the URL to be resolved.

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

isMap

public boolean isMap()
              throws PdfException,
                     java.io.IOException
Determines if the map flag is set or not. See setMap(boolean).

Returns:
true if set, false otherwise.
Throws:
PdfException - If a problem occured while parsing the document.
java.io.IOException - If a problem occured while parsing the file.

setMap

public void setMap(boolean flag)
            throws PdfException,
                   java.io.IOException
Sets a flag specifying whether to track the mouse position when the URL is resolved. This entry applies only to actions triggered by the user’s clicking an annotation; it is ignored for actions associated with outline items or with a document’s OpenAction entry.

If the flag is set to true and the user has triggered the URI action by clicking an annotation with the mouse, the coordinates of the mouse position at the time the action will be added to the URL as follow: ?x,y
where x and y are the coordinates from the top-left corner of the annotation.

Parameters:
flag - true/false.
Throws:
PdfException - If a problem occured while parsing the document.
java.io.IOException - If a problem occured while parsing the file.

setURL

public void setURL(java.net.URL url)
            throws java.io.IOException,
                   PdfException
Sets the URL to be resolved.

Parameters:
url - The URL.
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.