org.apache.fop.apps
Class StreamRenderer

java.lang.Object
  |
  +--org.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)
           
 IDReferences getIDReferences()
           
 Page getNextPage(Page current, boolean isWithinPageSequence, boolean isFirstCall)
           
 Page getPreviousPage(Page current, boolean isWithinPageSequence, boolean isFirstCall)
           
 FormattingResults getResults()
           
 void queuePage(Page page)
           
 void render(PageSequence pageSequence)
          Format the PageSequence.
 void setLogger(org.apache.log.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(org.apache.log.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

stopRenderer

public void stopRenderer()
                  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.

queuePage

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

getNextPage

public Page getNextPage(Page current,
                        boolean isWithinPageSequence,
                        boolean isFirstCall)

getPreviousPage

public Page getPreviousPage(Page current,
                            boolean isWithinPageSequence,
                            boolean isFirstCall)


Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.