Package com.pspdfkit.annotations.actions
Class GoToEmbeddedAction
-
- All Implemented Interfaces:
public final class GoToEmbeddedAction extends Action
Action that allows jumping to a PDF file that is embedded in the document.
-
-
Field Summary
Fields Modifier and Type Field Description public final String
pdfPath
public final int
pageIndex
public final Destination
destination
-
Constructor Summary
Constructors Constructor Description GoToEmbeddedAction(EmbeddedFile targetFile, boolean openInNewWindow)
Creates action instance. GoToEmbeddedAction(EmbeddedFile targetFile, boolean openInNewWindow, List<Action> subActions)
Creates action instance.
-
Method Summary
Modifier and Type Method Description String
getPdfPath()
Relative path to the embedded PDF document. int
getPageIndex()
Page index in the target document to skip to once the action is executed. Destination
getDestination()
Destination of this action. boolean
isNewWindow()
Whether or not a new window should be created for displaying the embedded document. ActionType
getType()
Returns type of action to make down-casting easier. boolean
equals(Object o)
int
hashCode()
String
toString()
-
-
Constructor Detail
-
GoToEmbeddedAction
GoToEmbeddedAction(EmbeddedFile targetFile, boolean openInNewWindow)
Creates action instance.- Parameters:
targetFile
- Target embedded file, action will be no-op if the embedded file won't be present in the document once the action is executed.openInNewWindow
-true
to open embedded file in a new activity (works only when executed from within PdfActivity),false
to replace currently opened file.
-
GoToEmbeddedAction
GoToEmbeddedAction(EmbeddedFile targetFile, boolean openInNewWindow, List<Action> subActions)
Creates action instance.- Parameters:
targetFile
- Target embedded file, action will be no-op if the embedded file won't be present in the document once the action is executed.openInNewWindow
-true
to open embedded file in a new activity (works only when executed from within PdfActivity),false
to replace currently opened file.subActions
- List of sub-actions of this action.
-
-
Method Detail
-
getPdfPath
@Nullable() String getPdfPath()
Relative path to the embedded PDF document.
- Returns:
Relative path to the target document.
null
if path to embedded file could not be resolved.
-
getPageIndex
@IntRange(from = 0) int getPageIndex()
Page index in the target document to skip to once the action is executed.
- Returns:
0-indexed page number.
-
getDestination
Destination getDestination()
Destination of this action.
- Returns:
An structure that contains the page index and the particular view of the document that this action points to.
-
isNewWindow
boolean isNewWindow()
Whether or not a new window should be created for displaying the embedded document.
- Returns:
true
if a new window should be created for displayed document.
-
getType
@NonNull() ActionType getType()
Returns type of action to make down-casting easier.
- Returns:
Type of this action.
-
hashCode
int hashCode()
-
-
-
-