Hi team,

I started looking at the FOP source code in more detail last week, and from 
what I understand at this point I think it would make sense to integrate jfor 
as a "structure renderer" right after the FO Tree building stage.

At this point my idea would be to:

a) add a Visitor pattern mechanism to visit the FOTree independently of 
layout operations

b) split layout() methods in two, adding a method called "getProperties()" or 
something (see details below)

c) implement a Visitor that would generate RTF from the FOTree, calling 
getProperties() on the way

d) maybe having getProperties() do its work only once even if called multiple 
times, and calling it both before the Visit and at the start of layout()

Of course, this shouldn't be limited to jfor, the FOTreeVisitor should be 
reusable for other output formats. 

Does this sound like I'm on the right track?

- Bertrand

Appendix: layout() method discussion.
For what I've seen in the source code, some computations (property 
resolution, if I understand right) done in the layout() methods would need to 
be moved to a "pre-layout" stage: maybe breaking layout() in two.

Taking flow.Block as an example:
void layout()
{
  . . .stage 1): properties acquisition
  this.align = this.properties.get("text-align").getEnum();
  this.alignLast = this.properties.get("text-align-last").getEnum();
  this.breakAfter = this.properties.get("break-after").getEnum();
  . . .more property reading

  . . .stage 2): actual layout  
  int breakBeforeStatus = propMgr.checkBreakBefore(area);
  . . .
}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to