Flex 4 architecture Components
Development
By Michael labriola
This is some general comments that are being discussed by the lab.
Consider the components of flex 4 as an atomic component of the system:
• Highly reusable
• No external dependency
• Everything can be passed to them
• Participate in the lifecycle of FLEX (defined by uicomponent)
• Know how big it is and make a good layout
Reusable components in as3 are written as m
XML
Components, which cannot be extended as child classes. mxml components should be considered leaf nodes.
In Flex 3, you use flex's uicomponent. skinnablecomponent is used in flex4. addchild () is used in Flex 3, and addelement is used in flex 4.
In Flex, the parent class controls the subclass size. It is set using the measure () method, for example, measuredheight, measuredwidth, measuredminheight, and measuredminwidth.
When updatedisplaylist (unscaledwidth, unscaledheight) is used, you may need to add a scroll bar when your content cannot be installed in the given space. This applies to setactualsize (width, height ).
In the commitproperties () class, continue to extend the previous method, that is, check the flag and component before the change.
Skinnablecomponent indicates the skin. use meta-data to define skinpart. when the skin is set as part of the class, it is called partadded. the igraphicelement and ivisualelement interfaces are usually used to ensure that the skin does what it wants.