Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
ADOBE FLEX 3 5 Creating and Extending Adobe Flex 3 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: UIComponent Container Button NumericStepper ComboBase Box Form ComboBox VBox Note: For a complete description of the class hierarchy, see the Adobe Flex Language Reference. 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. Customizing existing Flex components One reason for you to create a component is to customize an existing Flex component for your application requirements. This customization could be as simple as setting the label property of a Button control to Submit to create a custom button for all of your forms. You might also want to modify the behavior of a Flex component. For example, a VBox container lays out its children from the top of the container to the bottom in the order in which you define the children within the container. Instead, you might want to customize the VBox container to lay out its children from bottom to top. Another reason to customize a Flex component is to add logic or behavior to it. For example, you might want to modify the TextInput control so that it supports a key combination to delete all the text entered into the control. Or, you might want to modify a component so that it dispatches a new event type when a user carries out an action.