xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tibor Vyletel" <t...@centrum.sk>
Subject AreaFactory patch (once again ;-)
Date Thu, 04 Nov 2004 12:01:33 GMT
Hello fopsters,

so I have finished (and published in bugzilla) the patch which have aroused
quite a discussion around here.

Just a short description:
1) org.apache.fop.area.AreaFactory
- now contains specific create method for each (used) subclass of Area. The
generic Area create(FObj, LayoutManager) method was left in the interface
to, although its usage in client code is not recommended.
- ATM, all the create method have the same argument signature. I think, that
this is a place which can undergo changes in future (TextArea creation is a
good example). This will be dependent on the amount of work which might be
shifted from LMs to AreaFactories...

2) org.apache.fop.area.DefaultAreaFactory
- basic implementation; in most cases just default constructor of an area
subtype is called

3) FOUserAgent
- getAreaFactory()/setAreaFactory() method pair - same as in the example
sent before

4) AbstractLayoutManager
- I added convenience method getAreaFactory() to this class. So the actual
area creation in LMs is usually limited to:
    curBlockArea = getAreaFactory().createBlock(fobj, this);

5) Default constructors
- I changed several Area classes, too. In particular those which have not
had a default constructor, yet.

So, that's it. Thanks to those who have supported this refactoring. It's in
the bugzilla now, so it's up to you what you will do with it. Anyway, please
send me any comment you have. I don't say that this is a finished and
non-changeable piece of code (such things don't exists in SW development, do
they? ;) any further suggestions/correction i am going to implement.


Tibor Vyletel
ICQ# 79458455

View raw message