public abstract class XMLObj extends FONode implements ContentHandlerFactory.ObjectBuiltListener
FONode.FONodeIterator, FONode.GatherContextInfoFunction
Modifier and Type | Field and Description |
---|---|
protected org.w3c.dom.Document |
doc
DOM document containing this node
|
protected org.w3c.dom.Element |
element
DOM element representing this node
|
protected java.lang.String |
name
Name of the node
|
Modifier and Type | Method and Description |
---|---|
protected void |
addChildNode(FONode child)
Adds a node as a child of this node.
|
void |
addElement(org.w3c.dom.Document doc,
org.w3c.dom.Element parent)
Add an element to the DOM document
|
void |
buildTopLevel(org.w3c.dom.Document doc,
org.w3c.dom.Element svgRoot)
Add the top-level element to the DOM document
|
protected void |
characters(char[] data,
int start,
int length,
PropertyList pList,
org.xml.sax.Locator locator)
Adds characters.
|
org.w3c.dom.Document |
createBasicDocument()
Create an empty DOM document
|
java.awt.geom.Point2D |
getDimension(java.awt.geom.Point2D view)
Returns the dimensions of the generated area in pts.
|
org.w3c.dom.Document |
getDOMDocument() |
Length |
getIntrinsicAlignmentAdjust()
Retrieve the intrinsic alignment-adjust of the child element.
|
java.lang.String |
getLocalName()
Returns the local name (i.e.
|
void |
notifyObjectBuilt(java.lang.Object obj)
Notifies the listener when the object is fully built.
|
void |
processNode(java.lang.String elementName,
org.xml.sax.Locator locator,
org.xml.sax.Attributes attlist,
PropertyList propertyList)
Initialize the node with its name, location information, and attributes
The attributes must be used immediately as the sax attributes
will be altered for the next element.
|
protected void |
validateChildNode(org.xml.sax.Locator loc,
java.lang.String nsURI,
java.lang.String localName)
Checks to make sure, during SAX processing of input document, that the
incoming node is valid for this (parent) node (e.g., checking to
see that
fo:table is not an immediate child of fo:root )
called from FOTreeBuilder.startElement(String, String, String, Attributes)
before constructing the child FObj . |
addCharacters, attachSiblings, bind, canHaveMarkers, charIterator, clone, clone, collectDelimitedTextRanges, collectDelimitedTextRanges, createPropertyList, decorateWithContextInfo, endOfNode, errorText, finalizeNode, gatherContextInfo, getBuilderContext, getChildNodes, getChildNodes, getContentHandlerFactory, getContextInfo, getContextInfoAlt, getExtensionAttachment, getFOEventHandler, getFOValidationEventProducer, getLocator, getLocatorString, getLogger, getName, getName, getNameId, getNamespaceURI, getNodePrefix, getNodeString, getNormalNamespacePrefix, getParent, getRoot, getUserAgent, inMarker, invalidChildError, invalidChildError, isBidiRangeBlockItem, isDelimitedTextRangeBoundary, missingChildElementError, missingChildElementError, missingPropertyError, nodesOutOfOrderError, nodesOutOfOrderError, removeChild, setLocator, setStructureTreeElement, startOfNode, tooManyNodesError, tooManyNodesError, tooManyNodesError, validateChildNode, warningText
protected org.w3c.dom.Element element
protected org.w3c.dom.Document doc
protected java.lang.String name
protected void validateChildNode(org.xml.sax.Locator loc, java.lang.String nsURI, java.lang.String localName) throws ValidationException
fo:table
is not an immediate child of fo:root
)
called from FOTreeBuilder.startElement(String, String, String, Attributes)
before constructing the child FObj
.
validateChildNode
in class FONode
loc
- location in the FO source filensURI
- namespace of incoming nodelocalName
- name of the incoming node (without namespace prefix)ValidationException
- if incoming node not valid for parentpublic void processNode(java.lang.String elementName, org.xml.sax.Locator locator, org.xml.sax.Attributes attlist, PropertyList propertyList) throws FOPException
processNode
in class FONode
elementName
- element name (e.g., "fo:block")locator
- Locator object (ignored by default)attlist
- Collection of attributes passed to us from the parser.propertyList
- the property list of the parent nodeFOPException
- for errors or inconsistencies in the attributespublic org.w3c.dom.Document getDOMDocument()
public java.awt.geom.Point2D getDimension(java.awt.geom.Point2D view)
view
- Point2D instance to receive the dimensionspublic Length getIntrinsicAlignmentAdjust()
public java.lang.String getLocalName()
getLocalName
in class FONode
public void addElement(org.w3c.dom.Document doc, org.w3c.dom.Element parent)
doc
- DOM document to which to add an elementparent
- the parent element of the element that is being addedpublic void buildTopLevel(org.w3c.dom.Document doc, org.w3c.dom.Element svgRoot)
doc
- DOM documentsvgRoot
- non-XSL-FO element to be added as the root of this documentpublic org.w3c.dom.Document createBasicDocument()
protected void addChildNode(FONode child)
addChildNode
in class FONode
child
- child node to be added to the childNodes of this nodeprotected void characters(char[] data, int start, int length, PropertyList pList, org.xml.sax.Locator locator) throws FOPException
#PCDATA
content.characters
in class FONode
data
- array of characters containing text to be addedstart
- starting array element to addlength
- number of elements to addpList
- currently applicable PropertyListlocator
- location in the XSL-FO source file.FOPException
- if there's a problem during processingpublic void notifyObjectBuilt(java.lang.Object obj)
notifyObjectBuilt
in interface ContentHandlerFactory.ObjectBuiltListener
obj
- the newly built objectCopyright 1999-2012 The Apache Software Foundation. All Rights Reserved.