Package org.apache.fop.area
Class DestinationData
java.lang.Object
org.apache.fop.area.AbstractOffDocumentItem
org.apache.fop.area.DestinationData
- All Implemented Interfaces:
OffDocumentItem
,Resolvable
An instance of this class is named destination from fox:destination
-
Field Summary
Fields inherited from class org.apache.fop.area.AbstractOffDocumentItem
AFTER_PAGE, END_OF_DOC, IMMEDIATELY, START_OF_DOC, whenToProcess
-
Constructor Summary
ConstructorDescriptionDestinationData
(String idRef) Create a new named destination.DestinationData
(Destination destination) Create a new pdf destination data object. -
Method Summary
Modifier and TypeMethodDescriptiongetIDRef()
Get the idref for this destinationString[]
Get the array of idrefs of this resolvable object.getName()
Return a human-readable name for this ODI (for error messages, etc.)Get the PageViewport object that this destination refers toboolean
Check if this resolvable object has been resolved.void
resolveIDRef
(String id, List<PageViewport> pages) Resolves the idref of this object by getting the PageViewport object that corresponds to the IDRef This method allows the Resolvable object to resolve one of its unresolved idrefs with the actual set of PageViewports containing the target ID.Methods inherited from class org.apache.fop.area.AbstractOffDocumentItem
getWhenToProcess
-
Constructor Details
-
DestinationData
Create a new pdf destination data object. This is used by the destination to create a data object with a idref. During processing, this idref will be subsequently resolved to a particular PageViewport.- Parameters:
destination
- the fo:bookmark object
-
DestinationData
Create a new named destination.- Parameters:
idRef
- the id reference of the destination
-
-
Method Details
-
getIDRef
Get the idref for this destination- Returns:
- the idref for the destination
-
getIDRefs
Get the array of idrefs of this resolvable object. If this object contains child resolvables that are resolved through this then it should return the idref's of the child also.- Specified by:
getIDRefs
in interfaceResolvable
- Returns:
- the id references for resolving this object
-
getPageViewport
Get the PageViewport object that this destination refers to- Returns:
- the PageViewport that this destination points to
-
isResolved
public boolean isResolved()Check if this resolvable object has been resolved. For now, just return true. To do: Find a way to determine whether the destination has been resolved.- Specified by:
isResolved
in interfaceResolvable
- Returns:
- true if this object has been resolved
-
resolveIDRef
Resolves the idref of this object by getting the PageViewport object that corresponds to the IDRef This method allows the Resolvable object to resolve one of its unresolved idrefs with the actual set of PageViewports containing the target ID. The Resolvable object initially identifies to the AreaTreeHandler which idrefs it needs resolved. After the idrefs are resolved, the ATH calls this method to allow the Resolvable object to update itself with the PageViewport information. TODO check to make sure it works if multiple bookmark-items have the same idref- Specified by:
resolveIDRef
in interfaceResolvable
- Parameters:
id
- an ID matching one of the Resolvable object's unresolved idref's.pages
- the list of PageViewports with the given ID
-
getName
Return a human-readable name for this ODI (for error messages, etc.)- Specified by:
getName
in interfaceOffDocumentItem
- Specified by:
getName
in classAbstractOffDocumentItem
- Returns:
- String name of ODI
-