## org.apache.fop.fo
Class FOTreeBuilder

    java.lang.Object
      |
      +--org.xml.sax.helpers.DefaultHandler
            |
            +--org.apache.fop.fo.FOTreeBuilder

public class FOTreeBuilder
extends org.xml.sax.helpers.DefaultHandler
implements TreeBuilder

SAX Handler that builds the formatting object tree.

Field Summary
`protected FObj` `currentFObj` current formatting object being handled
`protected java.util.Hashtable` `fobjTable` table mapping element names to the makers of objects representing formatting objects
`protected java.util.Hashtable` `propertylistTable` class that builds a property list for each formatting object
`protected FObj` `rootFObj` the root of the formatting object tree
`protected java.util.Hashtable` `unknownFOs` set of names of formatting objects encountered but unknown

Constructor Summary
`FOTreeBuilder()`

Method Summary
`void` `addElementPropertyList(java.lang.String namespaceURI, java.lang.String localName, java.util.Hashtable list)` add a mapping from element name to maker.
`void` `addMapping(java.lang.String namespaceURI, java.lang.String localName, FObj.Maker maker)` add a mapping from element name to maker.
`void` `addPropertyList(java.lang.String namespaceURI, java.util.Hashtable list)` add a mapping from element name to maker.
`void` `characters(char[] data, int start, int length)` SAX Handler for characters
`void` `endElement(java.lang.String uri, java.lang.String localName, java.lang.String rawName)` SAX Handler for the end of an element
`void` `format(AreaTree areaTree)` format this formatting object tree
`void` `startDocument()` SAX Handler for the start of the document
`void` `startElement(java.lang.String uri, java.lang.String localName, java.lang.String rawName, org.xml.sax.Attributes attlist)` SAX Handler for the start of an element

Methods inherited from class org.xml.sax.helpers.DefaultHandler
`endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### fobjTable

    protected java.util.Hashtable fobjTable

  table mapping element names to the makers of objects representing formatting objects

### propertylistTable

    protected java.util.Hashtable propertylistTable

  class that builds a property list for each formatting object

### currentFObj

    protected FObj currentFObj

  current formatting object being handled

### rootFObj

    protected FObj rootFObj

  the root of the formatting object tree

### unknownFOs

    protected java.util.Hashtable unknownFOs

  set of names of formatting objects encountered but unknown

Constructor Detail

### FOTreeBuilder

    public FOTreeBuilder()

Method Detail

### addMapping

    public void addMapping(java.lang.String namespaceURI,
                           java.lang.String localName,
                           FObj.Maker maker)

  add a mapping from element name to maker.
  Specified by:
    addMapping in interface TreeBuilder
  Parameters:
    `namespaceURI` - namespace URI of formatting object element
    `localName` - local name of formatting object element
    `maker` - Maker for class representing formatting object

### addPropertyList

    public void addPropertyList(java.lang.String namespaceURI,
                                java.util.Hashtable list)

  add a mapping from element name to maker.
  Specified by:
    addPropertyList in interface TreeBuilder
  Parameters:
    `namespaceURI` - namespace URI of formatting object element
    `localName` - local name of formatting object element
    `maker` - Maker for class representing formatting object

### addElementPropertyList

    public void addElementPropertyList(java.lang.String namespaceURI,
                                       java.lang.String localName,
                                       java.util.Hashtable list)

  add a mapping from element name to maker.
  Specified by:
    addElementPropertyList in interface TreeBuilder
  Parameters:
    `namespaceURI` - namespace URI of formatting object element
    `localName` - local name of formatting object element
    `maker` - Maker for class representing formatting object

### characters

    public void characters(char[] data,
                           int start,
                           int length)

  SAX Handler for characters
  Overrides:
    characters in class org.xml.sax.helpers.DefaultHandler

### endElement

    public void endElement(java.lang.String uri,
                           java.lang.String localName,
                           java.lang.String rawName)

  SAX Handler for the end of an element
  Overrides:
    endElement in class org.xml.sax.helpers.DefaultHandler

### startDocument

    public void startDocument()

  SAX Handler for the start of the document
  Overrides:
    startDocument in class org.xml.sax.helpers.DefaultHandler

### startElement

    public void startElement(java.lang.String uri,
                             java.lang.String localName,
                             java.lang.String rawName,
                             org.xml.sax.Attributes attlist)
                      throws org.xml.sax.SAXException

  SAX Handler for the start of an element
  Overrides:
    startElement in class org.xml.sax.helpers.DefaultHandler

### format

    public void format(AreaTree areaTree)
                throws FOPException

  format this formatting object tree
  Parameters:
    `areaTree` - the area tree to format into

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