About creating components
15
This example shows the following relationships among the components:
■
You define a main MXML file that contains the
<mx:Application>
tag.
■
In your main MXML file, you define an ActionScript block that uses the
<mx:Script>
tag. Inside the ActionScript block, you write ActionScript code, or include external logic
defined by an ActionScript file. Typically, you use this area to write small amounts of
ActionScript code. If you must write large amounts of ActionScript code, you should
include an external file.
■
The main MXML file uses MXML and ActionScript to reference components supplied
with Flex, and to reference your custom components.
■
Custom components can reference other custom components.
The Flex class hierarchy
Flex is implemented as an ActionScript class hierarchy. That class hierarchy contains
component classes, manager classes, data-service classes, and classes for all other Flex features.
The following example shows a portion of the class hierarchy for the Flex visual components,
such as controls and containers:
All visual components are derived from the
UIComponent
ActionScript class. Flex nonvisual
components are also implemented as a class hierarchy in ActionScript. The most commonly
used nonvisual classes are the Validator, Formatter, and Effect base classes.
You create custom components by extending the Flex class hierarchy using the MXML and
ActionScript languages. Components inherit the properties, methods, events, styles, and
effects of their superclasses.
NO
TE
For a complete description of the class hierarchy, see the
Adobe Flex 2 Language
Reference
.
Container
NumericStepper
Button
ComboBase
UIComponent
Form
VBox
Box
ComboBox
Содержание FLEX 2 - CREATING AND EXTENDING COMPONENTS
Страница 1: ...Creating and Extending Flex 2 Components Adobe Flex 2...
Страница 6: ...6 Contents...
Страница 10: ...10 About Flex Documentation...
Страница 12: ......
Страница 24: ...24 Creating Flex Components...
Страница 74: ...74 Compiling Components...
Страница 76: ......
Страница 118: ...118 Creating Advanced MXML Components...
Страница 120: ......
Страница 182: ...182 Creating Advanced Visual Components in ActionScript...
Страница 194: ...194 Creating Custom Style Properties...
Страница 204: ...204 Creating Template Components...
Страница 206: ......
Страница 216: ...216 Creating Custom Formatters...
Страница 254: ...254 Index...