de.dante.extex.typesetter.pageBuilder
Interface PageBuilder

All Known Implementing Classes:
PageBuilderImpl, TrivialPageBuilder

public interface PageBuilder

This interface describes the capabilities of a page builder.

Version:
$Revision: 1.17 $
Author:
Gerd Neugebauer

Method Summary
 void close()
          Close the page builder.
 void flush(NodeList nodes, Typesetter typesetter)
          This method is used when the page builder has received its last nodes.
 void inspectAndBuild(VerticalListNode nodes, Typesetter typesetter)
          This is the entry point for the page builder.
 void setBackend(BackendDriver backend)
          Setter for the back-end.
 void setContext(Context context)
          Setter for the interpreter context
 void setOptions(TypesetterOptions options)
          Setter for options.
 void setOutputRoutine(OutputRoutine output)
          Setter for the output routine.
 void setPageFactory(PageFactory factory)
          Setter for the page factory.
 void shipout(NodeList nodes, Typesetter typesetter)
          This method is used when the page builder has received its last nodes.
 

Method Detail

close

public void close()
           throws TypesetterException
Close the page builder. Any material left should be processed now since it can not be expected that the page builder is invoked later in any way.

Throws:
TypesetterException - in case of an error

flush

public void flush(NodeList nodes,
                  Typesetter typesetter)
           throws TypesetterException
This method is used when the page builder has received its last nodes. It indicates that now the pages should be written out.

Nevertheless some ship-outs might come afterwards.

Parameters:
nodes - the nodes to send
typesetter - the typesetter
Throws:
TypesetterException - in case of an error

shipout

public void shipout(NodeList nodes,
                    Typesetter typesetter)
             throws TypesetterException
This method is used when the page builder has received its last nodes. It indicates that now the pages should be written out.

Nevertheless some ship-outs might come afterwards.

Parameters:
nodes - the nodes to send
typesetter - the typesetter
Throws:
TypesetterException - in case of an error

inspectAndBuild

public void inspectAndBuild(VerticalListNode nodes,
                            Typesetter typesetter)
                     throws TypesetterException
This is the entry point for the page builder. Here it receives a complete node list to be sent to the output writer. It can be assumed that all values for width, height, and depth of the node lists are properly filled. The nodes might be sent partially or in total. The nodes sent to the document writer are removed from the NodeList.

Parameters:
nodes - the nodes to send
typesetter - the typesetter
Throws:
TypesetterException - in case of an error

setBackend

public void setBackend(BackendDriver backend)
Setter for the back-end. This has to be provided before the page builder can be active.

Parameters:
backend - the new document writer to use

setContext

public void setContext(Context context)
                throws TypesetterException
Setter for the interpreter context

Parameters:
context - the interpreter context
Throws:
TypesetterException - in case of an error

setOptions

public void setOptions(TypesetterOptions options)
Setter for options.

Parameters:
options - the options to set

setOutputRoutine

public void setOutputRoutine(OutputRoutine output)
Setter for the output routine.

Parameters:
output - the output routine

setPageFactory

public void setPageFactory(PageFactory factory)
Setter for the page factory.

Parameters:
factory - the page factory