Top Description Constructors Methods
org.apache.pdfbox.pdmodel.interactive.pagenavigation

public final Class PDTransition

extends PDDictionaryWrapper
Class Inheritance
Imports
org.apache.pdfbox.cos.COSBase, .COSBoolean, .COSDictionary, .COSFloat, .COSInteger, .COSName, org.apache.pdfbox.pdmodel.common.PDDictionaryWrapper

Represents a page transition as defined in paragraph 12.4.4.1 of PDF 32000-1:2008
Author
Andrea Vacondio

Constructor Summary

AccessConstructor and Description
public
PDTransition()

creates a new transition with default "replace" style PDTransitionStyle#R

public
PDTransition(PDTransitionStyle
the style to be used to create the new transition
style
)

creates a new transition with the given style.

public
PDTransition(COSDictionary
the dictionary to be used for the new transition
dictionary
)

creates a new transition for an existing dictionary

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The dimension in which the specified transition effect shall occur or the default PDTransitionDimension#H if no dimension is found.
getDimension
()

public COSBase

Returns:

the direction in which the specified transition effect shall move. It can be either a COSInteger or COSName#NONE. Default to COSInteger#ZERO
getDirection
()

public float

Returns:

The duration in seconds of the transition effect or the default 1 if no duration is found.
getDuration
()

public float

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.
getFlyScale
()

public String

Returns:

The direction of motion for the specified transition effect or the default PDTransitionMotion#I if no motion is found.
getMotion
()

public String

Returns:

the style for this transition
getStyle
()

public boolean

Returns:

true if the area that shall be flown in is rectangular and opaque. Default is false. Only for PDTransitionStyle#Fly.
isFlyAreaOpaque
()

public void
setDimension(PDTransitionDimension
the dimension in which the specified transition effect shall occur
dimension
)

Sets the dimension in which the specified transition effect shall occur.

public void
setDirection(PDTransitionDirection
the direction in which the specified transition effect shall move
direction
)

Sets the direction in which the specified transition effect shall move.

public void
setDuration(float
The duration of the transition effect, in seconds.
duration
)

public void
setFlyAreaOpaque(boolean
If true, the area that shall be flown in is rectangular and opaque. Only for PDTransitionStyle#Fly.
opaque
)

public void
setFlyScale(float
The starting or ending scale at which the changes shall be drawn. Only for PDTransitionStyle#Fly.
scale
)

public void
setMotion(PDTransitionMotion
the direction of motion for the specified transition effect
motion
)

Sets the direction of motion for the specified transition effect.

Inherited from org.apache.pdfbox.pdmodel.common.PDDictionaryWrapper:
equalsgetCOSObjecthashCode

Constructor Detail

PDTransitionback to summary
public PDTransition()

creates a new transition with default "replace" style PDTransitionStyle#R

PDTransitionback to summary
public PDTransition(PDTransitionStyle style)

creates a new transition with the given style.

Parameters
style:PDTransitionStyle

the style to be used to create the new transition

PDTransitionback to summary
public PDTransition(COSDictionary dictionary)

creates a new transition for an existing dictionary

Parameters
dictionary:COSDictionary

the dictionary to be used for the new transition

Method Detail

getDimensionback to summary
public String getDimension()
Returns:String

The dimension in which the specified transition effect shall occur or the default PDTransitionDimension#H if no dimension is found.

See Also
PDTransitionDimension
getDirectionback to summary
public COSBase getDirection()
Returns:COSBase

the direction in which the specified transition effect shall move. It can be either a COSInteger or COSName#NONE. Default to COSInteger#ZERO

See Also
PDTransitionDirection
getDurationback to summary
public float getDuration()
Returns:float

The duration in seconds of the transition effect or the default 1 if no duration is found.

getFlyScaleback to summary
public float getFlyScale()
Returns:float

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.

getMotionback to summary
public String getMotion()
Returns:String

The direction of motion for the specified transition effect or the default PDTransitionMotion#I if no motion is found.

See Also
PDTransitionMotion
getStyleback to summary
public String getStyle()
Returns:String

the style for this transition

See Also
PDTransitionStyle#valueOf(String)
isFlyAreaOpaqueback to summary
public boolean isFlyAreaOpaque()
Returns:boolean

true if the area that shall be flown in is rectangular and opaque. Default is false. Only for PDTransitionStyle#Fly.

setDimensionback to summary
public void setDimension(PDTransitionDimension dimension)

Sets the dimension in which the specified transition effect shall occur. Only for PDTransitionStyle#Split and PDTransitionStyle#Blinds.

Parameters
dimension:PDTransitionDimension

the dimension in which the specified transition effect shall occur

setDirectionback to summary
public void setDirection(PDTransitionDirection direction)

Sets the direction in which the specified transition effect shall move. Only for PDTransitionStyle#Wipe, PDTransitionStyle#Glitter, PDTransitionStyle#Fly, PDTransitionStyle#Cover, PDTransitionStyle#Uncover and PDTransitionStyle#Push.

Parameters
direction:PDTransitionDirection

the direction in which the specified transition effect shall move

setDurationback to summary
public void setDuration(float duration)
Parameters
duration:float

The duration of the transition effect, in seconds.

setFlyAreaOpaqueback to summary
public void setFlyAreaOpaque(boolean opaque)
Parameters
opaque:boolean

If true, the area that shall be flown in is rectangular and opaque. Only for PDTransitionStyle#Fly.

setFlyScaleback to summary
public void setFlyScale(float scale)
Parameters
scale:float

The starting or ending scale at which the changes shall be drawn. Only for PDTransitionStyle#Fly.

setMotionback to summary
public void setMotion(PDTransitionMotion motion)

Sets the direction of motion for the specified transition effect. Only for PDTransitionStyle#Split, PDTransitionStyle#Blinds and PDTransitionStyle#Fly.

Parameters
motion:PDTransitionMotion

the direction of motion for the specified transition effect