fop 0.94

org.apache.fop.area
Class DestinationData

java.lang.Object
  extended by org.apache.fop.area.AbstractOffDocumentItem
      extended by org.apache.fop.area.DestinationData
All Implemented Interfaces:
OffDocumentItem, Resolvable

public class DestinationData
extends AbstractOffDocumentItem
implements 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
DestinationData(Destination destination)
          Create a new pdf destination data object.
 
Method Summary
 java.lang.String getIDRef()
          Get the idref for this destination
 java.lang.String[] getIDRefs()
          Get the array of idrefs of this resolvable object.
 java.lang.String getName()
          Return a human-readable name for this ODI (for error messages, etc.)
 PageViewport getPageViewport()
          Get the PageViewport object that this destination refers to
 boolean isResolved()
          Check if this resolvable object has been resolved.
 void resolveIDRef(java.lang.String id, java.util.List pages)
          Resolves the idref of this object by getting the PageViewport object that corresponds to the IDRef
 
Methods inherited from class org.apache.fop.area.AbstractOffDocumentItem
getWhenToProcess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DestinationData

public DestinationData(Destination destination)
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
Method Detail

getIDRef

public java.lang.String getIDRef()
Get the idref for this destination

Returns:
the idref for the destination

getIDRefs

public java.lang.String[] getIDRefs()
Description copied from interface: Resolvable
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 interface Resolvable
Returns:
the id references for resolving this object
See Also:
Resolvable.getIDRefs()

getPageViewport

public PageViewport 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 interface Resolvable
Returns:
true if this object has been resolved

resolveIDRef

public void resolveIDRef(java.lang.String id,
                         java.util.List pages)
Resolves the idref of this object by getting the PageViewport object that corresponds to the IDRef

Specified by:
resolveIDRef in interface Resolvable
Parameters:
id - an ID matching one of the Resolvable object's unresolved idref's.
pages - the list of PageViewports with the given ID
See Also:
Resolvable.resolveIDRef(String, List)
To do:
check to make sure it works if multiple bookmark-items have the same idref

getName

public java.lang.String getName()
Description copied from class: AbstractOffDocumentItem
Return a human-readable name for this ODI (for error messages, etc.)

Specified by:
getName in interface OffDocumentItem
Specified by:
getName in class AbstractOffDocumentItem
Returns:
String name of ODI
See Also:
OffDocumentItem.getName()

fop 0.94

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.