This doesn't seem appropriate--the business logic to
determine whether or not a layout manager is needed
for a particular FO should be within that FO object,
where it reads its own private variables--in whatever
manner it is internally constucted--and makes its own
determination.

Otherwise (1) you're forcing the logic below to be
repeated in everyone else's subclasses of the Maker
method, also (2) it forces the internal state of each
FO (endIndex, startIndex) to be public, furthermore,
you're forever constraining all implementations of
FOText objects to have these method variables. 
Someone could completely wish to redo FOText, and not
have a startIndex and endIndex indicators.  With this
design, this is no longer possible.

Why not retain the addLayoutManager() method within
each FO, but just have it call this mapping function
to determine which LayoutManager object to create? 
Why did you consider it better to strip out the
addLayoutMangers() from the FO's?

Glen

--- [EMAIL PROTECTED] wrote:

+    public static class FOTextLayoutManagerMaker
extends Maker {
  +        public void make(FONode node, List lms) {
  +            FOText foText = (FOText) node;
  +            if (foText.endIndex - foText.startIndex
> 0) {
  +                lms.add(new
TextLayoutManager(foText));
  +            }
  +        }
  +    }

Reply via email to