Adobe FLEX 2 - CREATING AND EXTENDING COMPONENTS Manual page 148

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

Advertisement

You usually create a component as a subclass of an existing class. For example, to create a
component that is based on the Button control, you create a subclass of the
mx.controls.Button class. To make your own component, you create a subclass of the
mx.core.UIComponent class.
About overriding protected UIComponent methods
All Flex visual components are subclasses of the
components inherit the methods, properties, events, styles, and effects defined by the
UIComponent class.
To create an advanced visual component, you must implement a class constructor. Also, you
optionally override one or more of the following protected methods of the UIComponent
class:
UIComponent
method
commitProperties()
createChildren()
layoutChrome()
measure()
updateDisplayList()
148
Creating Advanced Visual Components in ActionScript
Description
Commits any changes to component properties, either to make the
changes occur at the same time, or to ensure that properties are set in
a specific order.
For more information, see
method" on page
158.
Creates any child components of the component. For example, the
ComboBox control contains a TextInput control and a Button control
as child components.
For more information, see
on page
157.
Defines the border area around the container for subclasses of the
Container class.
For more information, see
on page
166.
Sets the default size and default minimum size of the component.
For more information, see
on page
162.
Sizes and positions the children of the component on the screen based
on all previous property and style settings, and draws any skins or
graphic elements used by the component. The parent container for the
component determines the size of the component itself.
For more information, see
method" on page
166.
UIComponent
class. Therefore, visual
"Implementing the commitProperties()
"Implementing the createChildren() method"
"Implementing the layoutChrome() method"
"Implementing the measure() method"
"Implementing the updateDisplayList()

Advertisement

Table of Contents
loading

Table of Contents