Jeremias Maerki wrote:
> Luca, I'd prefer if we wouldn't have to have this many casts to Block
> and BlockContainer all over the LM. Couldn't we just add methods like
> getBlockFO() and getBlockContainerFO() which do the cast? I can do this
> but I don't want to interfere with anything you might do in those LMs
> right now.
Right, they really are not very elegant!
I'll do as you suggest.
> BTW, would you do me a favor and add a more verbose explanation of
> LayoutManager.getChangedKnuthElements(). That is one method I still
> don't fully understand. What does "changed" mean in this context? Is
> "getChangedKnuthElements()" really the best method name for it?
Yes, it is used in order to "vertically justify" blocks (which could
involve change the number of lines created for some paragraphs); I'm going
to create a wiki page to explain the meaning of these extensions and how
they work, as you suggested some days ago.
In a few words, the elements returned by getNextKnuthElements don't
contain LineBreakPositions, as the exact quantity of lines is not yet
decided; after the first page breaking is performed and the number of
lines is decided, getChangedKnuthElements is called in order to receive
elements containing the LineBreakPositions which will be used in the
addAreas() phase.
I agree with you that maybe it is not the best name for it ...
I hope I'll succeed in being more clear in the wiki page, anyway don't
hesitate to ask for more information.
Regards
Luca