You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Glen Mazza <gm...@apache.org> on 2005/06/07 06:18:50 UTC
Remove LayoutManager.initialize() method?
Team,
Anyone have a problem if I remove the initialize() method from the
LayoutManager interface (and assorted related code from
AbstractLayoutManager), by having the eight LM's currently using it
initialize themselves internally instead?
Currently, for those 8 LM's using external initialization (i.e.,
LM.initialize()), it is done immediately after the ParentLM is set for
the LM in AbstractLayoutManager.addChildLM(). So, at a minimum, I think
I can equivalently do this by having each class call initialize() within
an overridden setParent() implementation. However, for most of the
eight it appears I can just call initialize() from the class'
constructor without needing a setParent() override.
This change will not prohibit specific LM's with unique requirements
from having a public initialize() method, if ever needed, it would just
require that a specific class variable be used instead of the generic
LayoutManager interface variable (i.e., for WidgetLayoutManager wlm,
call wlm.initialize() instead of LM.initialize().)
Thanks,
Glen
Re: Remove LayoutManager.initialize() method?
Posted by Simon Pepping <sp...@leverkruid.nl>.
On Tue, Jun 07, 2005 at 12:18:50AM -0400, Glen Mazza wrote:
> Team,
>
> Anyone have a problem if I remove the initialize() method from the
> LayoutManager interface (and assorted related code from
> AbstractLayoutManager), by having the eight LM's currently using it
> initialize themselves internally instead?
>
> Currently, for those 8 LM's using external initialization (i.e.,
> LM.initialize()), it is done immediately after the ParentLM is set for
> the LM in AbstractLayoutManager.addChildLM(). So, at a minimum, I think
> I can equivalently do this by having each class call initialize() within
> an overridden setParent() implementation. However, for most of the
> eight it appears I can just call initialize() from the class'
> constructor without needing a setParent() override.
I seem to recall that initialization in LMs was not very
consistent. If you can unify the required initializations, it would be
nice.
Regards, Simon
> This change will not prohibit specific LM's with unique requirements
> from having a public initialize() method, if ever needed, it would just
> require that a specific class variable be used instead of the generic
> LayoutManager interface variable (i.e., for WidgetLayoutManager wlm,
> call wlm.initialize() instead of LM.initialize().)
>
> Thanks,
> Glen
>
--
Simon Pepping
home page: http://www.leverkruid.nl