org.icepdf.core.pobjects.actions
Class LaunchAction

java.lang.Object
  extended by org.icepdf.core.pobjects.Dictionary
      extended by org.icepdf.core.pobjects.actions.Action
          extended by org.icepdf.core.pobjects.actions.LaunchAction

public class LaunchAction
extends Action

The launch action launches an applicaiton or opens or prints a document.

There are optional Win which allow for platform specific parameters for launching the designated application.

Since:
2.6
Author:
ICEsoft Technologies, Inc.

Nested Class Summary
 class LaunchAction.WindowsLaunchParameters
          Paramaters specific to launching files on windows.
 
Field Summary
static Name FILE_KEY
           
static Name MAC_KEY
           
static Name NEW_WINDOW_KEY
           
static Name UNIX_KEY
           
static Name WIN_KEY
           
 
Fields inherited from class org.icepdf.core.pobjects.actions.Action
ACTION_TYPE, ACTION_TYPE_GOTO, ACTION_TYPE_GOTO_REMOTE, ACTION_TYPE_KEY, ACTION_TYPE_LAUNCH, ACTION_TYPE_URI, NEXT_KEY
 
Fields inherited from class org.icepdf.core.pobjects.Dictionary
entries, inited, isDeleted, isNew, library, SUBTYPE_KEY, TYPE_KEY
 
Constructor Summary
LaunchAction(Library l, java.util.Hashtable h)
          Creates a new instance of a Action.
 
Method Summary
 java.lang.String getExternalFile()
          Gets the applicaiton to be launched or the document to be opened or printed.
 FileSpecification getFileSpecification()
          Gets the file specification of the destination file.
 boolean getNewWindow()
          Specifies whether or not a new window should be opend.
 LaunchAction.WindowsLaunchParameters getWinLaunchParameters()
          Gets an object which hold the windows-specific launch parameters.
 void setExternalFile(java.lang.String externalFile)
          Sets the external file flag of the action.
 
Methods inherited from class org.icepdf.core.pobjects.actions.Action
buildAction, getType, similar
 
Methods inherited from class org.icepdf.core.pobjects.Dictionary
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getObject, getPObjectReference, init, isDeleted, isNew, setDeleted, setNew, setPObjectReference, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FILE_KEY

public static final Name FILE_KEY

WIN_KEY

public static final Name WIN_KEY

MAC_KEY

public static final Name MAC_KEY

UNIX_KEY

public static final Name UNIX_KEY

NEW_WINDOW_KEY

public static final Name NEW_WINDOW_KEY
Constructor Detail

LaunchAction

public LaunchAction(Library l,
                    java.util.Hashtable h)
Creates a new instance of a Action.

Parameters:
l - document library.
h - Action dictionary entries.
Method Detail

getExternalFile

public java.lang.String getExternalFile()
Gets the applicaiton to be launched or the document to be opened or printed. This value can either come from the F key entry of the launch action or the F key of the file specification.

Returns:
file specification

setExternalFile

public void setExternalFile(java.lang.String externalFile)
Sets the external file flag of the action. At this time it is not possible to set a FileSpecification object but could be added at a later date if deamed necessary.

Parameters:
externalFile - external file path and or name to be associated with this launch action.

getNewWindow

public boolean getNewWindow()
Specifies whether or not a new window should be opend.

Returns:
true indicates a new window should be used, false otherwise.

getWinLaunchParameters

public LaunchAction.WindowsLaunchParameters getWinLaunchParameters()
Gets an object which hold the windows-specific launch parameters.

Returns:
window specific launch parameters.

getFileSpecification

public FileSpecification getFileSpecification()
Gets the file specification of the destination file. This objects should be interigated to deside what should be done

Returns:
file specification, maybe nukll if external file was specified.