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().)


Reply via email to