Class PDTransition
java.lang.Object
org.apache.pdfbox.pdmodel.common.PDDictionaryWrapper
org.apache.pdfbox.pdmodel.interactive.pagenavigation.PDTransition
- All Implemented Interfaces:
COSObjectable
Represents a page transition as defined in paragraph 12.4.4.1 of PDF 32000-1:2008
- Author:
- Andrea Vacondio
-
Constructor Summary
ConstructorsConstructorDescriptioncreates a new transition with default "replace" stylePDTransitionStyle.R
PDTransition
(COSDictionary dictionary) creates a new transition for an existing dictionaryPDTransition
(PDTransitionStyle style) creates a new transition with the given style. -
Method Summary
Modifier and TypeMethodDescriptionfloat
float
getStyle()
boolean
void
setDimension
(PDTransitionDimension dimension) Sets the dimension in which the specified transition effect shall occur.void
setDirection
(PDTransitionDirection direction) Sets the direction in which the specified transition effect shall moves.void
setDuration
(float duration) void
setFlyAreaOpaque
(boolean opaque) void
setFlyScale
(float scale) void
setMotion
(PDTransitionMotion motion) Sets the direction of motion for the specified transition effect.Methods inherited from class org.apache.pdfbox.pdmodel.common.PDDictionaryWrapper
equals, getCOSObject, hashCode
-
Constructor Details
-
PDTransition
public PDTransition()creates a new transition with default "replace" stylePDTransitionStyle.R
-
PDTransition
creates a new transition for an existing dictionary- Parameters:
dictionary
- the dictionary to be used.
-
-
Method Details
-
getStyle
- Returns:
- the style for this transition
- See Also:
-
getDimension
- Returns:
- The dimension in which the specified transition effect shall occur or the default
PDTransitionDimension.H
if no dimension is found. - See Also:
-
getMotion
- Returns:
- The direction of motion for the specified transition effect or the default
PDTransitionMotion.I
if no motion is found. - See Also:
-
getDirection
- Returns:
- the direction in which the specified transition effect shall moves. It can be either a
COSInteger
orCOSName.NONE
. Default toCOSInteger.ZERO
- See Also:
-
getDuration
public float getDuration()- Returns:
- The duration in seconds of the transition effect or the default 1 if no duration is found.
-
setDuration
public void setDuration(float duration) - Parameters:
duration
- The duration of the transition effect, in seconds.
-
getFlyScale
public float getFlyScale()- Returns:
- The starting or ending scale at which the changes shall be drawn or the default 1 if no scale is found.
Only for
PDTransitionStyle.Fly
.
-
setFlyScale
public void setFlyScale(float scale) - Parameters:
scale
- The starting or ending scale at which the changes shall be drawn. Only forPDTransitionStyle.Fly
.
-
isFlyAreaOpaque
public boolean isFlyAreaOpaque()- Returns:
- true if the area that shall be flown in is rectangular and opaque. Default is false. Only for
PDTransitionStyle.Fly
.
-
setFlyAreaOpaque
public void setFlyAreaOpaque(boolean opaque) - Parameters:
opaque
- If true, the area that shall be flown in is rectangular and opaque. Only forPDTransitionStyle.Fly
.
-