org.apache.fop.fo
Class XMLObj

java.lang.Object
  extended by org.apache.fop.fo.FONode
      extended by org.apache.fop.fo.FObj
          extended by org.apache.fop.fo.XMLObj
Direct Known Subclasses:
SVGObj, UnknownXMLObj, XMLElement

public abstract class XMLObj
extends FObj

Since SVG objects are not layed out then this class checks that this element is not being layed out inside some incorrect element.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.fop.fo.FObj
FObj.Maker
 
Field Summary
protected  Document doc
           
protected  Element element
           
protected static HashMap ns
           
protected  String tagName
           
 
Fields inherited from class org.apache.fop.fo.FObj
column, line, properties, propMgr, systemId
 
Fields inherited from class org.apache.fop.fo.FONode
areaClass, areasGenerated, BREAK_AFTER, children, forcedStartOffset, forcedWidth, isInTableCell, linkSet, log, marker, parent, START
 
Constructor Summary
XMLObj(FObj parent, PropertyList propertyList, String tag, String systemId, int line, int column)
           
 
Method Summary
protected  void addCharacters(char[] data, int start, int length)
          adds characters (does nothing here)
protected  void addChild(FONode child)
           
 void addGraphic(Document doc, Element parent)
           
 void buildTopLevel(Document doc, Element svgRoot)
           
 Document createBasicDocument()
           
 void forceStartOffset(int offset)
           
 void forceWidth(int width)
           
 ArrayList getMarkerSnapshot(ArrayList snapshot)
          At the start of a new span area layout may be partway through a nested FO, and balancing requires rollback to this known point.
abstract  String getNameSpace()
           
 int layout(Area area)
          layout this formatting object.
 void removeID(IDReferences idReferences)
          removes property id
 void resetMarker()
           
 void rollback(ArrayList snapshot)
          When balancing occurs, the flow layout() method restarts at the point specified by the current marker snapshot, which is retrieved and restored using this method.
 void setIsInTableCell()
          These method overrides prevent problems with the different types.
 void setLinkSet(LinkSet linkSet)
           
protected  void setWritingMode()
          Set writing mode for this FO.
 
Methods inherited from class org.apache.fop.fo.FObj
addMarker, end, generatesReferenceAreas, getContentWidth, getName, getProperty, makePropertyManager
 
Methods inherited from class org.apache.fop.fo.FONode
getLinkSet, getParent, mayPrecedeMarker, removeAreas, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tagName

protected String tagName

element

protected Element element

doc

protected Document doc

ns

protected static HashMap ns
Constructor Detail

XMLObj

public XMLObj(FObj parent,
              PropertyList propertyList,
              String tag,
              String systemId,
              int line,
              int column)
Parameters:
parent - the parent formatting object
propertyList - the explicit properties of this object
Method Detail

getNameSpace

public abstract String getNameSpace()

addGraphic

public void addGraphic(Document doc,
                       Element parent)

buildTopLevel

public void buildTopLevel(Document doc,
                          Element svgRoot)

createBasicDocument

public Document createBasicDocument()

addChild

protected void addChild(FONode child)
Overrides:
addChild in class FONode

addCharacters

protected void addCharacters(char[] data,
                             int start,
                             int length)
Description copied from class: FObj
adds characters (does nothing here)

Overrides:
addCharacters in class FObj
Parameters:
data - text
start - start position
length - length of the text

layout

public int layout(Area area)
           throws FOPException
layout this formatting object.

Overrides:
layout in class FObj
Parameters:
area - the area to layout the object into
Returns:
the status of the layout
Throws:
FOPException

removeID

public void removeID(IDReferences idReferences)
Description copied from class: FObj
removes property id

Overrides:
removeID in class FObj
Parameters:
idReferences - the id to remove

setIsInTableCell

public void setIsInTableCell()
These method overrides prevent problems with the different types.

Overrides:
setIsInTableCell in class FONode

forceStartOffset

public void forceStartOffset(int offset)
Overrides:
forceStartOffset in class FONode

forceWidth

public void forceWidth(int width)
Overrides:
forceWidth in class FONode

resetMarker

public void resetMarker()
Overrides:
resetMarker in class FONode

setLinkSet

public void setLinkSet(LinkSet linkSet)
Overrides:
setLinkSet in class FONode

getMarkerSnapshot

public ArrayList getMarkerSnapshot(ArrayList snapshot)
Description copied from class: FONode
At the start of a new span area layout may be partway through a nested FO, and balancing requires rollback to this known point. The snapshot records exactly where layout is at.

Overrides:
getMarkerSnapshot in class FONode
Parameters:
snapshot - a ArrayList of markers (Integer)
Returns:
the updated ArrayList of markers (Integers)

rollback

public void rollback(ArrayList snapshot)
Description copied from class: FONode
When balancing occurs, the flow layout() method restarts at the point specified by the current marker snapshot, which is retrieved and restored using this method.

Overrides:
rollback in class FONode
Parameters:
snapshot - the ArrayList of saved markers (Integers)

setWritingMode

protected void setWritingMode()
Description copied from class: FObj
Set writing mode for this FO. Find nearest ancestor, including self, which generates reference areas and use the value of its writing-mode property. If no such ancestor is found, use the value on the root FO.

Overrides:
setWritingMode in class FObj


Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.