|
fop 0.93 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.fo.FOEventHandler
org.apache.fop.area.AreaTreeHandler
Area tree handler for formatting objects. Concepts: The area tree is to be as small as possible. With minimal classes and data to fully represent an area tree for formatting objects. The area tree needs to be simple to render and follow the spec closely. This area tree has the concept of page sequences. Wherever possible information is discarded or optimized to keep memory use low. The data is also organized to make it possible for renderers to minimize their output. A page can be saved if not fully resolved and once rendered a page contains only size and id reference information. The area tree pages are organized in a model that depends on the type of renderer.
Field Summary | |
protected AreaTreeModel |
model
AreaTreeModel in use |
Fields inherited from class org.apache.fop.fo.FOEventHandler |
fontInfo, foUserAgent, propertyListMaker, whiteSpaceHandler |
Constructor Summary | |
AreaTreeHandler(FOUserAgent userAgent,
java.lang.String outputFormat,
java.io.OutputStream stream)
Constructor. |
Method Summary | |
void |
addUnresolvedIDRef(java.lang.String idref,
Resolvable res)
Add an Resolvable object with an unresolved idref |
boolean |
alreadyResolvedID(java.lang.String id)
Check if an ID has already been resolved |
void |
associateIDWithPageViewport(java.lang.String id,
PageViewport pv)
Tie a PageViewport with an ID found on a child area of the PV. |
void |
endDocument()
End the document. |
void |
endPageSequence(PageSequence pageSequence)
End the PageSequence. |
java.lang.String |
generatePageViewportKey()
Generates and returns a unique key for a page viewport. |
AreaTreeModel |
getAreaTreeModel()
Get the area tree model for this area tree. |
LayoutManagerMaker |
getLayoutManagerMaker()
Get the LayoutManager maker for this area tree. |
java.util.List |
getPageViewportsContainingID(java.lang.String id)
Get the list of page viewports that have an area with a given id. |
FormattingResults |
getResults()
Get information about the rendered output, like number of pages created. |
void |
notifyPageSequenceFinished(PageSequence pageSequence,
int pageCount)
Called by the PageSequenceLayoutManager when it is finished with a page-sequence. |
protected void |
setupModel(FOUserAgent userAgent,
java.lang.String outputFormat,
java.io.OutputStream stream)
Sets up the AreaTreeModel instance for use by the AreaTreeHandler. |
void |
signalIDProcessed(java.lang.String id)
Signals that all areas for the formatting object with the given ID have been generated. |
void |
signalPendingID(java.lang.String id)
This method tie an ID to the areaTreeHandler until this one is ready to be processed. |
void |
startDocument()
Prepare AreaTreeHandler for document processing This is called from FOTreeBuilder.startDocument() |
void |
startPageSequence(PageSequence pageSequence)
|
void |
tryIDResolution(PageViewport pv)
Tries to resolve all unresolved ID references on the given page. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected AreaTreeModel model
Constructor Detail |
public AreaTreeHandler(FOUserAgent userAgent, java.lang.String outputFormat, java.io.OutputStream stream) throws FOPException
userAgent
- FOUserAgent object for processoutputFormat
- the MIME type of the output format to use (ex. "application/pdf").stream
- OutputStream
FOPException
- if the RenderPagesModel cannot be createdMethod Detail |
protected void setupModel(FOUserAgent userAgent, java.lang.String outputFormat, java.io.OutputStream stream) throws FOPException
userAgent
- FOUserAgent object for processoutputFormat
- the MIME type of the output format to use (ex. "application/pdf").stream
- OutputStream
FOPException
- if the RenderPagesModel cannot be createdpublic AreaTreeModel getAreaTreeModel()
public LayoutManagerMaker getLayoutManagerMaker()
public void associateIDWithPageViewport(java.lang.String id, PageViewport pv)
id
- the property ID of the areapv
- a page viewport that contains the area with this IDpublic void signalPendingID(java.lang.String id)
id
- the id of the object being processedpublic void signalIDProcessed(java.lang.String id)
id
- the id of the formatting object which was just finishedpublic boolean alreadyResolvedID(java.lang.String id)
id
- the id to check
public void tryIDResolution(PageViewport pv)
pv
- page viewport whose ID refs to resolvepublic java.util.List getPageViewportsContainingID(java.lang.String id)
id
- the id to lookup
public FormattingResults getResults()
public void addUnresolvedIDRef(java.lang.String idref, Resolvable res)
idref
- the idref whose target id has not yet been locatedres
- the Resolvable object needing the idref to be resolvedpublic void startDocument() throws org.xml.sax.SAXException
startDocument
in class FOEventHandler
org.xml.sax.SAXException
- if there is an errorpublic void startPageSequence(PageSequence pageSequence)
startPageSequence
in class FOEventHandler
pageSequence
- is the pageSequence being startedFOEventHandler
public void endPageSequence(PageSequence pageSequence)
endPageSequence
in class FOEventHandler
pageSequence
- the page sequence endingpublic void notifyPageSequenceFinished(PageSequence pageSequence, int pageCount)
pageSequence
- the page-sequence just finishedpageCount
- The number of pages generated for the page-sequencepublic void endDocument() throws org.xml.sax.SAXException
endDocument
in class FOEventHandler
org.xml.sax.SAXException
- if there is some errorpublic java.lang.String generatePageViewportKey()
|
fop 0.93 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |