Component development in the flex 4 Architecture

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.