Gnostice PDFOne
Pro. Ed. v5.0.0


com.gnostice.pdfone
Class PdfLaunchAction

java.lang.Object
  extended bycom.gnostice.pdfone.PdfAction
      extended bycom.gnostice.pdfone.PdfLaunchAction

public class PdfLaunchAction
extends PdfAction

This class represents a launch action.

// Create a PDF page
PdfPage page1 = new PdfPage();

// Render some text on the page
page1.writeText(
        "Click here to launch the notepad " +
        "application in the current folder.", 
        200, 100);

// Create a link annotation over a word rendered on page 1
PdfLinkAnnot la = 
    new PdfLinkAnnot(new PdfRect(223, 100, 23, 12), Color.BLUE);

// Create a launch action that launches an
// application in the current directory
PdfLaunchAction lAction = 
    new PdfLaunchAction("notepad.exe", false);

// Add the launch action to the link annotation
la.addAction(lAction);

// Add the link annotation to page 1
page1.addAnnotation(la);


Nested Class Summary
 
Nested classes inherited from class com.gnostice.pdfone.PdfAction
PdfAction.PdfEvent
 
Field Summary
 
Fields inherited from class com.gnostice.pdfone.PdfAction
GOTO, JAVASCRIPT, LAUNCH, NAMED, NAMED_FIND, NAMED_FIRSTPAGE, NAMED_LASTPAGE, NAMED_NEXTPAGE, NAMED_OPEN, NAMED_PREVPAGE, NAMED_PRINT, NAMED_SEARCH, REMOTE_GOTO, URI
 
Constructor Summary
PdfLaunchAction(String applicationOrFileToLaunch, boolean print)
          Constructs a new PDF launch action with specified application or file.
 
Method Summary
 String getApplicationOrFileToLaunch()
          Returns pathname of the application or file that will be launched by the action.
 boolean isPrint()
          Returns whether the action will make the viewer application to print the file with file's default application, instead of simply opening the file with the default application.
 void setApplicationOrFileToLaunch(String applicationOrFileToLaunch)
          Specifies pathname of the application or file that needs to be launched by the action.
 void setPrint(boolean print)
          Specifies whether the action needs to make the viewer application print the file with the file's default application, instead of simply opening the file with the default application.
 
Methods inherited from class com.gnostice.pdfone.PdfAction
getActionType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfLaunchAction

public PdfLaunchAction(String applicationOrFileToLaunch,
                       boolean print)
Constructs a new PDF launch action with specified application or file.

Parameters:
applicationOrFileToLaunch - pathname of the application or file that needs to be launched by the action
print - whether the action needs to make the viewer application print the file with its default application
Method Detail

getApplicationOrFileToLaunch

public String getApplicationOrFileToLaunch()
Returns pathname of the application or file that will be launched by the action.

Returns:
pathname of the application or file
See Also:
setApplicationOrFileToLaunch(String)

setApplicationOrFileToLaunch

public void setApplicationOrFileToLaunch(String applicationOrFileToLaunch)
Specifies pathname of the application or file that needs to be launched by the action.

Parameters:
applicationOrFileToLaunch - pathname of the application or file
See Also:
getApplicationOrFileToLaunch()

isPrint

public boolean isPrint()
Returns whether the action will make the viewer application to print the file with file's default application, instead of simply opening the file with the default application.

Returns:
whether the action will make the viewer application to print the file with file's default application
See Also:
setPrint(boolean)

setPrint

public void setPrint(boolean print)
Specifies whether the action needs to make the viewer application print the file with the file's default application, instead of simply opening the file with the default application.

Parameters:
print - whether the action needs to make the viewer application print the file with the file's default application
See Also:
isPrint()

Gnostice PDFOne
Pro. Ed. v5.0.0

To contact our support team, send an e-mail to support@gnostice.com.
 
© 2010 Gnostice Information Technologies Private Limited. All rights reserved.
www.gnostice.com