On Aug 23, 2006, at 17:44, Patrick Paul wrote:

<snip />

Why not keep getNextKnuthElements() wich does the line breaking depending on a boolean switch ? Then depending on wether the element list already exists, the (modified) collectKnuthElements() method is called.

FTM, such a boolean switch would probably be the wisest move. Not changing too much at once.

This is my perspective for the auto-table layout, since I am implementing a new LayoutManager method called determineMinMaxTextWidths() which returns an object containing the two values needed to calculate optimum column widths. These values will go up the hierarchy up to the TableLM where the optimal column widths will be determined. So no need to return the actual element lists, right ?

Correct. To determine the minimum column-widths, you don't actually need the element lists themselves, only the width of widest piece of unbreakable content in the list.

As a nit, the suggested name determineMinMaxTextWidths() is maybe a bit misleading, since it is not merely text we're dealing with (could also be images... => determineMinMaxContentWidth()?)



Reply via email to