gcsolaroli
5 Dec 2006, 2:18 PM
Hi all,
while studying the YUI-ext code to improve my tentative IBLayoutManager (http://www.clipperz.com/files/example/layout/index.html) I have found something strange into the LayoutRegion code.
In the LayoutRegion code there is 'hardcoded' references to regions named "north", "south", "east" and "west", and these are obviously the region names used for the BorderLayoutManager.
But having a "BorderLayoutManager" dependency in the "base" LayoutRegion class sounds wrong to me.
Another strange oddities is the lack of a BorderLayoutRegion class, leaving the four specific "perimetric" regions ([North | South | East | West ]LayoutRegion) all deriving from SplitLayoutRegion, and CenterLayoutRegion deriving straight from LayoutRegion.
To implement my LayoutManager, I need to create a new subclass of LayoutRegion, but the hard coded references to the border layout regions are a little disturbing.
Does this arrangement need some solid refactoring, or am I badly missing something?
while studying the YUI-ext code to improve my tentative IBLayoutManager (http://www.clipperz.com/files/example/layout/index.html) I have found something strange into the LayoutRegion code.
In the LayoutRegion code there is 'hardcoded' references to regions named "north", "south", "east" and "west", and these are obviously the region names used for the BorderLayoutManager.
But having a "BorderLayoutManager" dependency in the "base" LayoutRegion class sounds wrong to me.
Another strange oddities is the lack of a BorderLayoutRegion class, leaving the four specific "perimetric" regions ([North | South | East | West ]LayoutRegion) all deriving from SplitLayoutRegion, and CenterLayoutRegion deriving straight from LayoutRegion.
To implement my LayoutManager, I need to create a new subclass of LayoutRegion, but the hard coded references to the border layout regions are a little disturbing.
Does this arrangement need some solid refactoring, or am I badly missing something?