Class LaunchAction
java.lang.Object
org.openpdf.renderer.action.PDFAction
org.openpdf.renderer.action.LaunchAction
Action for launching an application, mostly used to open a file.
- Since:
- 08.07.2009
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInner class for storing a file specificationclassInternal class for the windows specific launch parameters -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate LaunchAction.FileSpecthe file/application to be opened (optional)private PDFObjectprivate booleanshould a new window be opened (optional)static final Stringprivate PDFObjectprivate LaunchAction.WinLaunchParam -
Constructor Summary
ConstructorsConstructorDescriptionLaunchAction(PDFObject obj, PDFObject root) Creates a new instance of LaunchAction from an object -
Method Summary
Modifier and TypeMethodDescriptionThe file / application to be openedGet the mac specific launch parameters.Get the unix specific launch parameters.Get the windows specific launch parameters.static booleanisAbsolute(String fileName) Is the file name absolute (if not, it is relative to the path of the currently opened PDF file).booleanShould a new window be opened for the file/application?private LaunchAction.FileSpecparseFileSpecification(PDFObject fileObj) Parse the file specification objectprivate LaunchAction.WinLaunchParamparseWinDict(PDFObject winDict) Parse the windows specific launch parameters
-
Field Details
-
SOLIDUS
- See Also:
-
file
the file/application to be opened (optional) -
newWindow
private boolean newWindowshould a new window be opened (optional) -
unixParam
-
macParam
-
winParam
-
-
Constructor Details
-
LaunchAction
Creates a new instance of LaunchAction from an object- Parameters:
obj- - the PDFObject with the action informationroot- - the root object- Throws:
IOException
-
-
Method Details
-
isAbsolute
Is the file name absolute (if not, it is relative to the path of the currently opened PDF file). If the file name starts with a "/", it is considered to be absolute.- Returns:
- boolean
-
parseFileSpecification
private LaunchAction.FileSpec parseFileSpecification(PDFObject fileObj) throws PDFParseException, IOException Parse the file specification object- Parameters:
fileObj-- Returns:
- FileSpec - might be
nullin case the passed object is null - Throws:
IOExceptionPDFParseException
-
parseWinDict
Parse the windows specific launch parameters- Parameters:
winDict-- Throws:
IOException- - in case of a problem during parsing content
-
getFileSpecification
The file / application to be opened- Returns:
- FileSpec
-
isNewWindow
public boolean isNewWindow()Should a new window be opened for the file/application?- Returns:
- boolean
-
getUnixParam
Get the unix specific launch parameters. Note: The dictionary is not specified yet in the PDF spec., so the PdfObject which is returned here is not parsed.- Returns:
- PDFObject
-
getMacParam
Get the mac specific launch parameters. Note: The dictionary is not specified yet in the PDF spec., so the PdfObject which is returned here is not parsed.- Returns:
- PDFObject
-
getWinParam
Get the windows specific launch parameters.- Returns:
- WinLaunchParam
-