org.apache.fop.fo.extensions.svg

Class SVGElement

Implemented Interfaces:
Cloneable, ContentHandlerFactory.ObjectBuiltListener, EventListener

public class SVGElement
extends SVGObj

class representing the SVG root element for constructing an svg document.

Nested Class Summary

static class
SVGElement.PDFUnitContext
This class is the default context for a particular element.

Nested classes/interfaces inherited from class org.apache.fop.fo.FONode

FONode.FONodeIterator

Field Summary

Fields inherited from class org.apache.fop.fo.XMLObj

doc, element, name

Fields inherited from class org.apache.fop.fo.FONode

FOX_URI, FO_URI, locator, log, parent, siblings

Constructor Summary

SVGElement(FONode parent)
Constructs an SVG object

Method Summary

ContentHandlerFactory
getContentHandlerFactory()
Point2D
getDimension(Point2D view)
Get the dimensions of this XML document.
static Point2D
getSize(int size, Element svgRoot, float ptmm)
Get the size of the SVG root element.
void
processNode(String elementName, Locator locator, Attributes attlist, PropertyList propertyList)

Methods inherited from class org.apache.fop.fo.extensions.svg.SVGObj

getNamespaceURI, getNormalNamespacePrefix

Methods inherited from class org.apache.fop.fo.XMLObj

addCharacters, addChildNode, addElement, buildTopLevel, createBasicDocument, getDOMDocument, getDimension, getIntrinsicAlignmentAdjust, getLocalName, notifyObjectBuilt, processNode, validateChildNode

Methods inherited from class org.apache.fop.fo.FONode

addCharacters, addChildNode, attachSiblings, attributeError, attributeWarning, bind, canHaveMarkers, charIterator, clone, clone, createPropertyList, decorateWithContextInfo, endOfNode, errorText, gatherContextInfo, getChildNodes, getChildNodes, getContentHandlerFactory, getContextInfo, getExtensionAttachment, getFOEventHandler, getLocalName, getLocator, getLocatorString, getLogger, getName, getName, getNameId, getNamespaceURI, getNodeString, getNormalNamespacePrefix, getParent, getRoot, getUserAgent, inMarker, invalidChildError, invalidChildError, missingChildElementError, missingPropertyError, nodesOutOfOrderError, processNode, removeChild, setLocator, startOfNode, tooManyNodesError, tooManyNodesError, validateChildNode, validateChildNode, warningText

Constructor Details

SVGElement

public SVGElement(FONode parent)
Constructs an SVG object
Parameters:
parent - the parent formatting object

Method Details

getContentHandlerFactory

public ContentHandlerFactory getContentHandlerFactory()
Overrides:
getContentHandlerFactory in interface FONode

getDimension

public Point2D getDimension(Point2D view)
Get the dimensions of this XML document.
Overrides:
getDimension in interface XMLObj
Parameters:
view - the viewport dimensions
Returns:
the dimensions of this SVG document

getSize

public static Point2D getSize(int size,
                              Element svgRoot,
                              float ptmm)
Get the size of the SVG root element.
Parameters:
size - the font size
svgRoot - the svg root element
ptmm - the pixel to millimeter conversion factor
Returns:
the size of the SVG document

processNode

public void processNode(String elementName,
                        Locator locator,
                        Attributes attlist,
                        PropertyList propertyList)
            throws FOPException
Overrides:
processNode in interface XMLObj

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.