Adobe FLEX 2 - CREATING AND EXTENDING COMPONENTS Manual page 156

Creating and extending flex 2 components
Hide thumbs Also See for FLEX 2 - CREATING AND EXTENDING COMPONENTS:
Table of Contents

Advertisement

"Basic component structure" on page 156
"Implementing the constructor" on page 157
"Implementing the createChildren() method" on page 157
"Implementing the commitProperties() method" on page 158
"Implementing the measure() method" on page 162
"Implementing the layoutChrome() method" on page 166
"Implementing the updateDisplayList() method" on page 166
Basic component structure
The following example shows the basic structure of a Flex component:
package myComponents
{
public class MyComponent extends UIComponent
{
....
}
}
You must define your ActionScript custom components within a package. The package
reflects the directory location of your component within the directory structure of your
application.
The class definition of your component must be prefixed by the
contains a class definition can have one, and only one, public class definition, although it can
have additional private class definitions.
156
Creating Advanced Visual Components in ActionScript
keyword. A file that
public

Advertisement

Table of Contents
loading

Table of Contents