Error processing request TrivialPageBuilder

de.dante.extex.typesetter.pageBuilder.trivial
Class TrivialPageBuilder

java.lang.Object
  extended byde.dante.extex.typesetter.pageBuilder.trivial.TrivialPageBuilder
All Implemented Interfaces:
PageBuilder

public class TrivialPageBuilder
extends java.lang.Object
implements PageBuilder

This is a first reference implementation of a page builder.

Version:
$Revision: 1.19 $
Author:
Gerd Neugebauer

Constructor Summary
TrivialPageBuilder()
          Creates a new object.
 
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 driver.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrivialPageBuilder

public TrivialPageBuilder()
Creates a new object.

Method Detail

close

public void close()
           throws TypesetterException
Description copied from interface: PageBuilder
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.

Specified by:
close in interface PageBuilder
Throws:
TypesetterException - in case of an error
See Also:
PageBuilder.close()

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 shipouts might come afterwards.

Specified by:
flush in interface PageBuilder
Parameters:
nodes - the nodes to send
typesetter - the typesetter
Throws:
TypesetterException - in case of an error
See Also:
PageBuilder.flush( de.dante.extex.typesetter.type.NodeList, de.dante.extex.typesetter.Typesetter)

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.

Specified by:
inspectAndBuild in interface PageBuilder
Parameters:
nodes - the nodes to send
typesetter - the typesetter
Throws:
TypesetterException - in case of an error
See Also:
PageBuilder.inspectAndBuild( de.dante.extex.typesetter.type.node.VerticalListNode, de.dante.extex.typesetter.Typesetter)

setBackend

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

Specified by:
setBackend in interface PageBuilder
Parameters:
backend - the new document writer to use
See Also:
Typesetter.setBackend( de.dante.extex.backend.BackendDriver)

setContext

public void setContext(Context context)
Description copied from interface: PageBuilder
Setter for the interpreter context

Specified by:
setContext in interface PageBuilder
Parameters:
context - the interpreter context
See Also:
PageBuilder.setContext( de.dante.extex.interpreter.context.Context)

setOptions

public void setOptions(TypesetterOptions options)
Setter for options.

Specified by:
setOptions in interface PageBuilder
Parameters:
options - the options to set
See Also:
PageBuilder.setOptions( de.dante.extex.typesetter.TypesetterOptions)

setOutputRoutine

public void setOutputRoutine(OutputRoutine output)
Description copied from interface: PageBuilder
Setter for the output routine.

Specified by:
setOutputRoutine in interface PageBuilder
Parameters:
output - the output routine
See Also:
de.dante.extex.typesetter.pageBuilder.PageBuilder#setOutputRoutine( de.dante.extex.typesetter.OutputRoutine)

setPageFactory

public void setPageFactory(PageFactory factory)
Description copied from interface: PageBuilder
Setter for the page factory.

Specified by:
setPageFactory in interface PageBuilder
Parameters:
factory - the page factory
See Also:
PageBuilder.setPageFactory( de.dante.extex.typesetter.type.page.PageFactory)

shipout

public void shipout(NodeList nodes,
                    Typesetter typesetter)
             throws TypesetterException
Description copied from interface: PageBuilder
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.

Specified by:
shipout in interface PageBuilder
Parameters:
nodes - the nodes to send
typesetter - the typesetter
Throws:
TypesetterException - in case of an error
See Also:
PageBuilder.shipout( de.dante.extex.typesetter.type.NodeList, de.dante.extex.typesetter.Typesetter)