org.apache.fop.apps
Class StreamRenderer

java.lang.Object
  extended byorg.apache.fop.apps.StreamRenderer

public class StreamRenderer
extends java.lang.Object

This class acts as a bridge between the XML:FO parser and the formatting/rendering classes. It will queue PageSequences up until all the IDs required by them are satisfied, at which time it will render the pages.

StreamRenderer is created by Driver and called from FOTreeBuilder when a PageSequence is created, and AreaTree when a Page is formatted.


Constructor Summary
StreamRenderer(java.io.OutputStream outputStream, Renderer renderer)
           
 
Method Summary
 void addExtension(ExtensionObj ext)
           
 PageSequence getCurrentPageSequence()
           
 java.util.ArrayList getCurrentPageSequenceMarkers()
           
 java.util.ArrayList getDocumentMarkers()
           
 IDReferences getIDReferences()
           
 FormattingResults getResults()
           
 void queuePage(Page page)
           
 void render(PageSequence pageSequence)
          Format the PageSequence.
 void setLogger(Logger logger)
           
 void startRenderer()
           
 void stopRenderer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamRenderer

public StreamRenderer(java.io.OutputStream outputStream,
                      Renderer renderer)
Method Detail

setLogger

public void setLogger(Logger logger)

getIDReferences

public IDReferences getIDReferences()

getResults

public FormattingResults getResults()

addExtension

public void addExtension(ExtensionObj ext)

startRenderer

public void startRenderer()
                   throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

stopRenderer

public void stopRenderer()
                  throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

render

public void render(PageSequence pageSequence)
            throws org.xml.sax.SAXException
Format the PageSequence. The PageSequence formats Pages and adds them to the AreaTree, which subsequently calls the StreamRenderer instance (this) again to render the page. At this time the page might be printed or it might be queued. A page might not be renderable immediately if the IDReferences are not all valid. In this case we defer the rendering until they are all valid.

Throws:
org.xml.sax.SAXException

queuePage

public void queuePage(Page page)
               throws FOPException,
                      java.io.IOException
Throws:
FOPException
java.io.IOException

getDocumentMarkers

public java.util.ArrayList getDocumentMarkers()

getCurrentPageSequence

public PageSequence getCurrentPageSequence()

getCurrentPageSequenceMarkers

public java.util.ArrayList getCurrentPageSequenceMarkers()


Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.