|
fop 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.fo.FONode
org.apache.fop.fo.FObj
public abstract class FObj
Base class for representation of formatting objects and their processing. All standard formatting object classes extend this class.
Nested Class Summary | |
---|---|
class |
FObj.FObjIterator
Basic FONodeIterator implementation |
Nested classes/interfaces inherited from class org.apache.fop.fo.FONode |
---|
FONode.FONodeIterator, FONode.GatherContextInfoFunction |
Field Summary | |
---|---|
protected FONode |
firstChild
pointer to the descendant subtree |
Fields inherited from class org.apache.fop.fo.FONode |
---|
FO_URI, FOX_URI, locator, log, parent, siblings |
Constructor Summary | |
---|---|
FObj(FONode parent)
Create a new formatting object. |
Method Summary | |
---|---|
protected void |
addChildNode(FONode child)
Adds a node as a child of this node. |
protected static void |
addChildTo(FONode child,
FONode parent)
Used by RetrieveMarker during Marker-subtree cloning |
void |
addForeignAttribute(org.apache.xmlgraphics.util.QName attributeName,
java.lang.String value)
Adds a foreign attribute to this FObj. |
protected void |
addMarker(Marker marker)
Add the marker to this formatting object. |
void |
bind(PropertyList pList)
Bind property values from the property list to the FO node. |
void |
clearChildNodes()
Clears the list of child nodes. |
FONode |
clone(FONode parent,
boolean removeChildren)
Performs a shallow cloning operation, sets the clone's parent, and optionally cleans the list of child nodes |
protected PropertyList |
createPropertyList(PropertyList parent,
FOEventHandler foEventHandler)
Create a default property list for this element. |
protected int |
findAncestor(int ancestorID)
Convenience method for validity checking. |
FObj |
findNearestAncestorFObj()
Find the nearest parent, grandparent, etc. |
protected java.lang.String |
gatherContextInfo()
Gathers context information for the getContextInfo() method. |
boolean |
generatesReferenceAreas()
Check if this formatting object generates reference areas. |
FONode.FONodeIterator |
getChildNodes()
Return an iterator over all the child nodes of this node. |
FONode.FONodeIterator |
getChildNodes(FONode childNode)
Return an iterator over the object's childNodes starting at the passed-in node (= first call to iterator.next() will return childNode) |
protected java.lang.String |
getContextInfoAlt()
Returns a String containing as some context information about a node. |
java.util.List |
getExtensionAttachments()
|
java.util.Map |
getForeignAttributes()
|
java.lang.String |
getId()
|
java.util.Map |
getMarkers()
|
java.lang.String |
getNamespaceURI()
Returns the namespace URI for this node |
java.lang.String |
getNormalNamespacePrefix()
Returns the normally used namespace prefix for this node |
static PropertyMaker |
getPropertyMakerFor(int propId)
Returns the PropertyMaker for a given property ID. |
boolean |
hasChildren()
Indicates whether this formatting object has children. |
boolean |
hasExtensionAttachments()
|
boolean |
hasId()
|
boolean |
hasMarkers()
|
protected boolean |
isBlockItem(java.lang.String nsURI,
java.lang.String lName)
Convenience method for validity checking. |
protected boolean |
isBlockOrInlineItem(java.lang.String nsURI,
java.lang.String lName)
Convenience method for validity checking. |
protected boolean |
isInlineItem(java.lang.String nsURI,
java.lang.String lName)
Convenience method for validity checking. |
void |
processNode(java.lang.String elementName,
org.xml.sax.Locator locator,
org.xml.sax.Attributes attlist,
PropertyList pList)
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. |
void |
removeChild(FONode child)
Removes a child node. |
protected void |
startOfNode()
Called after processNode() is called. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected FONode firstChild
Constructor Detail |
---|
public FObj(FONode parent)
parent
- the parent nodeMethod Detail |
---|
public FONode clone(FONode parent, boolean removeChildren) throws FOPException
clone
in class FONode
parent
- the intended parent of the cloneremoveChildren
- if true, clean the list of child nodes
FOPException
- if there's a problem while cloning the nodepublic static PropertyMaker getPropertyMakerFor(int propId)
propId
- the property ID
public void processNode(java.lang.String elementName, org.xml.sax.Locator locator, org.xml.sax.Attributes attlist, PropertyList pList) 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.pList
- the property list of the parent node
FOPException
- for errors or inconsistencies in the attributesprotected PropertyList createPropertyList(PropertyList parent, FOEventHandler foEventHandler) throws FOPException
createPropertyList
in class FONode
parent
- the closest parent propertylist.foEventHandler
- The FOEventHandler where the PropertyListMaker
instance can be found.
FOPException
- if there's a problem during processingpublic void bind(PropertyList pList) throws FOPException
bind
in class FONode
pList
- the PropertyList where the properties can be found.
FOPException
- if there is a problem binding the valuesprotected void startOfNode() throws FOPException
startOfNode
in class FONode
FOPException
- FOP Exceptionprotected void addChildNode(FONode child) throws FOPException
addChildNode
in class FONode
child
- child node to be added to the childNodes of this node
FOPException
- if there's a problem during processingprotected static void addChildTo(FONode child, FONode parent) throws FOPException
child
- the (cloned) child nodeparent
- the (cloned) parent node
FOPException
- when the child could not be added to the parentpublic void removeChild(FONode child)
removeChild
in class FONode
child
- child node to be removedpublic FObj findNearestAncestorFObj()
public boolean generatesReferenceAreas()
public FONode.FONodeIterator getChildNodes()
getChildNodes
in class FONode
public boolean hasChildren()
public FONode.FONodeIterator getChildNodes(FONode childNode)
getChildNodes
in class FONode
childNode
- First node in the iterator
protected void addMarker(Marker marker)
marker
- Marker to add.public boolean hasMarkers()
public java.util.Map getMarkers()
protected java.lang.String getContextInfoAlt()
getContextInfoAlt
in class FONode
protected java.lang.String gatherContextInfo()
gatherContextInfo
in class FONode
protected boolean isBlockItem(java.lang.String nsURI, java.lang.String lName)
nsURI
- namespace URI of incoming nodelName
- local name (i.e., no prefix) of incoming node
protected boolean isInlineItem(java.lang.String nsURI, java.lang.String lName)
nsURI
- namespace URI of incoming nodelName
- local name (i.e., no prefix) of incoming node
protected boolean isBlockOrInlineItem(java.lang.String nsURI, java.lang.String lName)
nsURI
- namespace URI of incoming nodelName
- local name (i.e., no prefix) of incoming node
protected int findAncestor(int ancestorID)
ancestorID
- ID of node name to check for (e.g., FO_ROOT)
public void clearChildNodes()
public java.lang.String getId()
public boolean hasId()
public java.lang.String getNamespaceURI()
getNamespaceURI
in class FONode
public java.lang.String getNormalNamespacePrefix()
getNormalNamespacePrefix
in class FONode
public java.util.List getExtensionAttachments()
public boolean hasExtensionAttachments()
public void addForeignAttribute(org.apache.xmlgraphics.util.QName attributeName, java.lang.String value)
attributeName
- the attribute name as a QName instancevalue
- the attribute valuepublic java.util.Map getForeignAttributes()
public java.lang.String toString()
toString
in class java.lang.Object
|
fop 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |