Why doesn’t Panel extend LayoutContainer?
As I’m doing some writing for the Flex for Dummies book I was digging into the source code for Panel and the other containers. I was writing about how Panel allows you to set the layout
property to either absolute
, vertical
, or horizontal
, just like LayoutContainer (or Application, which extends LayoutContainer). My initial thought was that Panel probably just extends LayoutContainer and that’s where we get the layout
property from. But then digging in I saw that both LayoutContainer and Panel independently implement the layout
property (in basically a cut and paste exact same way). Unless I’m missing something there’s no reason why Panel shouldn’t just extend LayoutContainer. (BTW, for a recent writeup of the LayoutContainer class see Ben Clinkinbeard’s post here).
If you look at the setter for the layout
property it’s almost identical in both Panel and LayoutContainer. And take a look in measure()
and updateDisplayList()
and you’ll see the same calls to layoutObject.measure()
and layoutObject.updateDisplayList()
.
8:26 AM
|
Labels:
Flex LayoutContainer,
Flex Samples
|
This entry was posted on 8:26 AM
and is filed under
Flex LayoutContainer
,
Flex Samples
.
You can follow any responses to this entry through
the RSS 2.0 feed.
You can leave a response,
or trackback from your own site.
0 comments:
Post a Comment