Adobe FLEX 2 - CREATING AND EXTENDING COMPONENTS Manual page 154

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

Advertisement

For example, you can implement a custom Button control that uses a new mechanism for
defining its default size. In that case, you only need to override the
example, see
"Implementing the measure() method" on page
Or, you might implement a new subclass of the VBox container. Your new subclass uses all of
the existing sizing logic of the VBox class, but changes the layout logic of the class to lay out
the container children from the bottom of the container to the top, rather than from the top
down. In this case, you only need to override the
example, see
"Implementing the updateDisplayList() method" on page
About interfaces
Flex uses interfaces to divide the basic functionality of components into discrete elements so
that they can be implemented piece by piece. For example, to make your component
focusable, it must implement the IFocusable interface; to let it participate in the layout
process, it must implement ILayoutClient interface.
To simplify the use of interfaces, the UIComponent class implements all of the interfaces
defined in the following table, except for the IFocusManagerComponent and
IToolTipManagerClient interfaces. However, many subclasses of UIComponent implement
the IFocusManagerComponent and IToolTipManagerClient interfaces.
Therefore, if you create a subclass of the class or subclass of UIComponent, you do not have
to implement these interfaces. But, if you create a component that is not a subclass of
UIComponent, and you want to use that component in Flex, you might have to implement
one or more of these interfaces.
For Flex 2, Adobe recommends that all of your components extend the UIComponent
class or a class that extends UIComponent.
154
Creating Advanced Visual Components in ActionScript
measure()
162.
updateDisplayList()
method. For an
method. For an
166.

Advertisement

Table of Contents
loading

Table of Contents