Building a simple Flex component.
构建一个简单的Flex组件。
Each Flex component could theoretically have its own controller.
理论上每个Flex组件都可以拥有自己的控制器。
The top left corner in myLabel's coordinate system is at (0,0)—which is always true for any Flex component.
myLabel的坐标系的左上角为 (0,0) ——Flex组件都是这样。
You can download the complete source for the custom Flex component described in this article from the download section.
您可以从下载小节获取本文描述的定制Flex组件的完整源代码。
Each time I watch a presentation on custom Flex component development, I think they keep getting clearer and more succinct.
每次观看客户化的Flex组件开发的展示时,我都感到这一切变得越来越棒了。
Spark offers designers and developers a seamless way to customize the visuals and behaviors of a Flex component in a much more direct and effortless manner.
借助于Spark,设计师和开发者可以更加直接和高效的方式无缝定制Flex组件的可视化元素与行为。
To see what components are included in Flex you can browse the Flex component Reference documentation, check out the Flex 2 component Explorer, or the Flex 2 Style Explorer.
要知道Flex包括了那些组件请参阅Flex组件参考文档,也请试一下Flex2组件浏览器和Flex 2样式浏览器。
Flex components that extend the Flex UIComponent base class allow you to set common styles as properties inline-in other words, within the MXML component declaration tag (see Listing 1).
扩展了FlexUIComponent基类的Flex组件允许作为内联属性设置常见样式—换言之,即在MXML组件声明标签内(参见清单1)。
So far you've learned about the benefits of using Flex and the use cases where it makes sense, how to manipulate and extend Flex components, and you've drilled down on its component life cycle.
到目前为止,您已经了解使用Flex的好处和一些用例,如何操作和扩展Flex组件,并且深入了解了Flex组件的生命周期。
Figure 4 shows you how Flex renders this component.
图4显示了Flex如何呈现这个组件。
For each component, we must consider the users' needs, decide on the UI elements to meet those needs, and take advantage of MXML in Flex to easily create the layout.
对于每一个组成部分,我们必须考虑到用户的需要,来决定UI元素,以满足这些需要,并充分利用Flex中的MXML来轻松地创建布局。
In this two-part series, we will demonstrate how we customized and extended the AdvancedDataGrid component provided in the Flex 3 data visualization package.
在这个分为两部分的系列文章中,我们将演示如何定制和扩展在Flex3数据可视化包中提供的AdvancedDataGrid组件。
Note that Flex doesn't add a component directly to this list; several intermediate steps occur before that happens.
注意,Flex没有向这个列表直接添加组件;在这发生之前需要经过几个中间步骤。
The first phase, commit, occurs when Flex adds a component to the main display list (hereafter referred to as "stage") using addChild() or one of its variants in the DisplayObject class.
第一个阶段是提交,该阶段在Flex使用addChild()或它在DisplayObject类中的变体之一向主显示列表(此后称为 “阶段”)添加组件时发生。
First, Flex validates all the properties of the component.
首先,Flex验证组件的所有属性。
The example shown in Listing 4 demonstrates how you might use an FXG skin as a custom component: This is the preferred method of implementation because the Flex compiler optimizes the FXG code.
清单4中的代码演示了如何将FXG皮肤用作自定义组件。这种方法是首选的实现方法,因为Flex编译器能够优化 FXG代码。
Flex offers a robust framework for component development and contains many off-the-shelf components already built-in for the developer's convenience.
Flex为组件开发提供一个健壮的框架,并且包含许多为开发人员提供便利的开箱即用组件。
Creating a simple component in Flex is remarkably easy.
用Flex创建简单的组件是很容易的。
Therefore, Flex picks up the local coordinates of a point near the bottom right corner of the component in question and applies "local to global" conversions to it.
因此,Flex挑选对应组件的右下角附近的点的局部坐标,然后对其应用“局部到全局”的转换。
Embedding a rich bitmap is fairly easy in Flex (by providing the backgroundImage property), and adding a component with vector drawing is even easier.
在Flex中嵌入一个丰富的位图是很容易的(通过提供backgroundImage property),添加一个带矢量图的组件就更容易了。
The code sample in Listing 1 demonstrates MXML markup for a Flex DataGrid component.
列表1中的代码示例演示了FlexDataGrid组件的MXML标记。
Andrew Shorten: Yes, unfortunately there were some components that we were unable to move to the Flex 4 component model in the time available.
AndrewShorten:是的,但遗憾的是,目前有些组件我们还不能迁移到Flex4组件模型上。
The official open-sourcing of the Flex SDK makes the Flex framework one of the most accessible ways to start doing custom UI component development, in my opinion.
依我看来,官方对FlexSDK的开源使得Flex框架成为客户化UI组件开发的首选。
I certainly hope that in the next 6 months, as Flex 4 becomes more mature, Flex developers (myself included) will really start to get their hands dirty with the new component set.
我当然希望在未来的6个月内,随着Flex4的不断成熟,Flex开发者(当然也包括我自己)可以真正使用这些新组件。
For example, Halo (Flex 3 component model) has a DataGrid, but there currently is no Gumbo (Flex 4 component model) version of the component.
比如说,Halo (Flex3组件模型)有DataGrid,但目前并没有对应的Gumbo (Flex4组件模型)版本。
When Flex dispatches the preinitialize event, the children of a component, including internal children, have not yet been created.
当Flex分发初始化事件,子组件,包括内部的子组件,都还没有被创建。
When Flex dispatches the preinitialize event, the children of a component, including internal children, have not yet been created.
当Flex分发初始化事件,子组件,包括内部的子组件,都还没有被创建。
应用推荐