fop 1.0

org.apache.fop.area
Class LinkResolver

java.lang.Object
  extended by org.apache.fop.area.LinkResolver
All Implemented Interfaces:
java.io.Serializable, Resolvable

public class LinkResolver
extends java.lang.Object
implements Resolvable, java.io.Serializable

Link resolving for resolving internal links.

See Also:
Serialized Form

Constructor Summary
LinkResolver(java.lang.String id, Area a)
          Create a new link resolver.
 
Method Summary
 java.lang.String[] getIDRefs()
          Get the references for this link.
 boolean isResolved()
          Check if this area has been resolved.
 void resolveIDRef(java.lang.String id, java.util.List pages)
          Resolve by adding an internal link to the first PageViewport in the list.
 void resolveIDRef(java.lang.String id, PageViewport pv)
          Resolve by adding an InternalLink trait to the area
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkResolver

public LinkResolver(java.lang.String id,
                    Area a)
Create a new link resolver.

Parameters:
id - the id to resolve
a - the area that will have the link attribute
Method Detail

isResolved

public boolean isResolved()
Description copied from interface: Resolvable
Check if this area has been resolved.

Specified by:
isResolved in interface Resolvable
Returns:
true if this link is resolved

getIDRefs

public java.lang.String[] getIDRefs()
Get the references for this link.

Specified by:
getIDRefs in interface Resolvable
Returns:
the String array of references.

resolveIDRef

public void resolveIDRef(java.lang.String id,
                         java.util.List pages)
Resolve by adding an internal link to the first PageViewport in the list. 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.

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

resolveIDRef

public void resolveIDRef(java.lang.String id,
                         PageViewport pv)
Resolve by adding an InternalLink trait to the area

Parameters:
id - the target id (should be equal to the object's idRef)
pv - the PageViewport containing the first area with the given id

fop 1.0

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