xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter B. West" <pbw...@powerup.com.au>
Subject Re: Tree class
Date Mon, 30 Jul 2001 13:06:06 GMT

A little progress on the Tree class.  I have added a copySubTree method 
to Node to allow for the copying of a subtree to another place in the tree.
void copySubTree(Node subtree, int index)

The subtree is copied as a child of this at the specified index position.

This version works fairly directly, so attempts to copy a subtree as a 
child of itself or as a child of any of its descendants throw a 
TreeException.  The whole operation is synchronized on the containing Tree.

Of course, contrary to what I said before, the same subtree cannot occur 
in more than one place in a tree, unless you want to sacrifice parent 
links, which rather defeats the purpose.

I will be looking at the setup of the FO and Area trees to see how much 
is involved in levering Tree in there.

Peter B. West  pbwest@powerup.com.au  http://powerup.com.au/~pbwest
"Lord, to whom shall we go?"

View raw message