fop 0.95beta | |
Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.fop.fo.FOEventHandler
org.apache.fop.area.AreaTreeHandler
public class AreaTreeHandler
extends FOEventHandler
Field Summary | |
protected AreaTreeModel |
|
Fields inherited from class org.apache.fop.fo.FOEventHandler | |
foUserAgent , fontInfo , propertyListMaker , whiteSpaceHandler |
Constructor Summary | |
|
Method Summary | |
void |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
String |
|
AreaTreeModel |
|
IDTracker |
|
LayoutManagerMaker |
|
List |
|
FormattingResults |
|
void |
|
protected void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
public AreaTreeHandler(FOUserAgent userAgent, String outputFormat, OutputStream stream) throws FOPException
Constructor.
- Parameters:
userAgent
- FOUserAgent object for processoutputFormat
- the MIME type of the output format to use (ex. "application/pdf").stream
- OutputStream
- Throws:
FOPException
- if the RenderPagesModel cannot be created
public void addUnresolvedIDRef(String idref, Resolvable res)
Deprecated. use getIdTracker().addUnresolvedIDRef(idref, res) instead
Add an Resolvable object with an unresolved idref
- Parameters:
idref
- the idref whose target id has not yet been locatedres
- the Resolvable object needing the idref to be resolved
public boolean alreadyResolvedID(String id)
Deprecated. use getIdTracker().alreadyResolvedID(id) instead
Check if an ID has already been resolved
- Parameters:
id
- the id to check
- Returns:
- true if the ID has been resolved
public void associateIDWithPageViewport(String id, PageViewport pv)
Deprecated. use getIdTracker().associateIDWithPageViewport(id, pv) instead
Tie a PageViewport with an ID found on a child area of the PV. Note that an area with a given ID may be on more than one PV, hence an ID may have more than one PV associated with it.
- Parameters:
id
- the property ID of the areapv
- a page viewport that contains the area with this ID
public void endDocument() throws SAXException
End the document.
- Overrides:
- endDocument in interface FOEventHandler
public void endExternalDocument(ExternalDocument document)
- Overrides:
- endExternalDocument in interface FOEventHandler
public void endPageSequence(PageSequence pageSequence)
End the PageSequence. The PageSequence formats Pages and adds them to the AreaTree. The area tree then handles what happens with the pages.
- Overrides:
- endPageSequence in interface FOEventHandler
- Parameters:
pageSequence
- the page sequence ending
public String generatePageViewportKey()
Generates and returns a unique key for a page viewport.
- Returns:
- the generated key.
public AreaTreeModel getAreaTreeModel()
Get the area tree model for this area tree.
- Returns:
- AreaTreeModel the model being used for this area tree
public IDTracker getIDTracker()
Get the IDTracker for this area tree.
- Returns:
- IDTracker used to track reference ids for items in this area tree
public LayoutManagerMaker getLayoutManagerMaker()
Get the LayoutManager maker for this area tree.
- Returns:
- LayoutManagerMaker the LayoutManager maker being used for this area tree
public List getPageViewportsContainingID(String id)
Deprecated. use getIdTracker().getPageViewportsContainingID(id) instead
Get the list of page viewports that have an area with a given id.
- Parameters:
id
- the id to lookup
- Returns:
- the list of PageViewports
public FormattingResults getResults()
Get information about the rendered output, like number of pages created.
- Returns:
- the results structure
public void notifyPageSequenceFinished(AbstractPageSequence pageSequence, int pageCount)
Called by the PageSequenceLayoutManager when it is finished with a page-sequence.
- Parameters:
pageSequence
- the page-sequence just finishedpageCount
- The number of pages generated for the page-sequence
protected void setupModel(FOUserAgent userAgent, String outputFormat, OutputStream stream) throws FOPException
Sets up the AreaTreeModel instance for use by the AreaTreeHandler.
- Parameters:
userAgent
- FOUserAgent object for processoutputFormat
- the MIME type of the output format to use (ex. "application/pdf").stream
- OutputStream
- Throws:
FOPException
- if the RenderPagesModel cannot be created
public void signalIDProcessed(String id)
Deprecated. use getIdTracker().signalIDProcessed(id) instead
Signals that all areas for the formatting object with the given ID have been generated. This is used to determine when page-number-citation-last ref-ids can be resolved.
- Parameters:
id
- the id of the formatting object which was just finished
public void signalPendingID(String id)
Deprecated. use getIdTracker().signalPendingID(id) instead
This method tie an ID to the areaTreeHandler until this one is ready to be processed. This is used in page-number-citation-last processing so we know when an id can be resolved.
- Parameters:
id
- the id of the object being processed
public void startDocument() throws SAXException
Prepare AreaTreeHandler for document processing This is called from FOTreeBuilder.startDocument()
- Overrides:
- startDocument in interface FOEventHandler
public void startExternalDocument(ExternalDocument document)
- Overrides:
- startExternalDocument in interface FOEventHandler
public void startPageSequence(PageSequence pageSequence)
- Overrides:
- startPageSequence in interface FOEventHandler
public void tryIDResolution(PageViewport pv)
Deprecated. use getIdTracker().tryIDResolution(pv) instead
Tries to resolve all unresolved ID references on the given page.
- Parameters:
pv
- page viewport whose ID refs to resolve
fop 0.95beta |