Create a class that extends uicomponent.
创建一个类,扩展uicomponent。
This code creates a simple MyLabel class that extends UIComponent, so you can concentrate solely on the measurement phase.
这段代码创建了一个简单的扩展uicomponent的mylabel类,因此您仅需关注度量阶段。
Then extend from the base class UIComponent, and override the updateDisplayList() method to draw the custom vector drawing.
然后从基类UIComponent 扩展,并覆盖updateDisplayList()方法来绘制这个定制矢量图。
However, the real hero in this set of classes is the UIComponent class, which provides the basic framework you need to write custom components.
不过,这个类集合中的主角是uicomponent类,它为您提供编写定制组件所需的基础框架。
Listing 16 shows you how to extend from a UIComponent, override updateDisplayList , and create lines using the graphics object of the link component.
清单16显示了如何扩展UIComponent、覆盖updatedisplaylist并使用链接组件的graphics对象创建线条。
This is also the point at which half of the testing frameworks fail, because they don't actually allow you to add UIComponent to the display list for testing.
这里也是一半测试框架做不到的地方,因为它们实际上不允许把UIComponent增加到显示列表进行测试。
You can leverage this functionality by extending SkinnableComponent (shown in Listing 1) for controls instead of UIComponent, as you would when using the Halo library.
您可以通过扩展SkinnableComponent(如清单1所示)而不是UIComponent(这在使用halo库时使用)来进行控制,从而利用这个功能。
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)。
When you develop your own components you will subclass UIComponentBase, which extends UIComponent, and provides default implementations of the all of the abstract methods in UIComponent.
在开发自己的组件时,需要继承uicomponentbase,它扩展了UIComponent并提供了UIComponent中所有抽象方法的默认实现。
When you develop your own components you will subclass UIComponentBase, which extends UIComponent, and provides default implementations of the all of the abstract methods in UIComponent.
在开发自己的组件时,需要继承uicomponentbase,它扩展了UIComponent并提供了UIComponent中所有抽象方法的默认实现。
应用推荐