org.apache.fop.fo
Class FONode

java.lang.Object
  extended byorg.apache.fop.fo.FONode
Direct Known Subclasses:
FObj, FOText

public abstract class FONode
extends Object

base class for nodes in the formatting object tree Modified by Mark Lillywhite mark-fop@inomial.com. Made ArrayList a protected member. (/me things this should be a private member with an API for adding children; this woudl save a lot of memory because the ArrayList would not have to be instantiated unless the node had children).


Field Summary
protected  String areaClass
           
 int areasGenerated
           
static int BREAK_AFTER
          value of marker after break-after
protected  ArrayList children
           
protected  int forcedStartOffset
           
protected  int forcedWidth
           
protected  boolean isInTableCell
           
protected  LinkSet linkSet
           
protected  org.apache.avalon.framework.logger.Logger log
           
protected  int marker
          where the layout was up to.
protected  FObj parent
           
static int START
          value of marker before layout begins
 
Constructor Summary
protected FONode(FObj parent)
           
 
Method Summary
protected  void addChild(FONode child)
           
 void forceStartOffset(int offset)
           
 void forceWidth(int width)
           
 LinkSet getLinkSet()
           
 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.
 FObj getParent()
           
 Property getProperty(String name)
          lets outside sources access the property list first used by PageNumberCitation to find the "id" property returns null by default, overide this function when there is a property list
abstract  int layout(Area area)
           
 boolean mayPrecedeMarker()
           
 void removeAreas()
           
 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()
           
 void setLinkSet(LinkSet linkSet)
           
 void setLogger(org.apache.avalon.framework.logger.Logger logger)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected FObj parent

areaClass

protected String areaClass

children

protected ArrayList children

START

public static final int START
value of marker before layout begins

See Also:
Constant Field Values

BREAK_AFTER

public static final int BREAK_AFTER
value of marker after break-after

See Also:
Constant Field Values

marker

protected int marker
where the layout was up to. for FObjs it is the child number for FOText it is the character number


isInTableCell

protected boolean isInTableCell

forcedStartOffset

protected int forcedStartOffset

forcedWidth

protected int forcedWidth

linkSet

protected LinkSet linkSet

areasGenerated

public int areasGenerated

log

protected org.apache.avalon.framework.logger.Logger log
Constructor Detail

FONode

protected FONode(FObj parent)
Method Detail

setLogger

public void setLogger(org.apache.avalon.framework.logger.Logger logger)

setIsInTableCell

public void setIsInTableCell()

forceStartOffset

public void forceStartOffset(int offset)

forceWidth

public void forceWidth(int width)

resetMarker

public void resetMarker()

removeAreas

public void removeAreas()

addChild

protected void addChild(FONode child)

getParent

public FObj getParent()

setLinkSet

public void setLinkSet(LinkSet linkSet)

getLinkSet

public LinkSet getLinkSet()

layout

public abstract int layout(Area area)
                    throws FOPException
Throws:
FOPException

getProperty

public Property getProperty(String name)
lets outside sources access the property list first used by PageNumberCitation to find the "id" property returns null by default, overide this function when there is a property list

Parameters:
name - - the name of the desired property to obtain
Returns:
the property

getMarkerSnapshot

public 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. The snapshot records exactly where layout is at.

Parameters:
snapshot - a ArrayList of markers (Integer)
Returns:
the updated ArrayList of markers (Integers)

rollback

public 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.

Parameters:
snapshot - the ArrayList of saved markers (Integers)

mayPrecedeMarker

public boolean mayPrecedeMarker()


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