- 浏览: 1564675 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (673)
- Linux (3)
- android (302)
- php (12)
- struts2 (1)
- Flex积累 (88)
- Hibernate (8)
- MyEclipse (18)
- android备忘录 (209)
- Java备忘录 (53)
- spring (0)
- Flex备忘录 (30)
- JavaScript (10)
- Tomcat (11)
- Flex FrameWork (0)
- 设计模式学习 (4)
- 休闲娱乐 (4)
- Flex skin (1)
- Flex 组件 (2)
- 持久化相关 (2)
- DotNet相关 (5)
- Flex Style (1)
- Windows (11)
- Flex AIR (9)
- MySQL (1)
- mac OSX (29)
- eclipse (26)
- database (5)
- ARM (1)
- English (1)
- WebService (8)
- javabase64 (2)
- ruby (1)
- sqlite (5)
- ios (7)
- 无线应用 (1)
- Java (3)
- goagent (1)
- oc (1)
最新评论
-
Z_ying:
谢谢分享,上次也遇到过的,解决了,过了一段时间又忘记,幸亏看到 ...
FastJson 示例 及问题 -
wto8559:
这是什么错啊,我也遇到了.问下写一个servlet能解决什么问 ...
Exception in thread "HouseKeeper" java.lang.NullPointerException -
zxjlwt:
如何用php怎么弄了。http://surenpi.com
\U672a\U77e5\U9519\U8bef 字符还原 -
windseamless:
那怎么样才能屏蔽呢
java.lang.IllegalArgumentException: Window type can not be changed after the -
macleo:
Trinea 写道还是利用Fiddler抓包更方便,(1)无需 ...
android网络抓包相关
You insert metadata tags into your MXML and ActionScript files to provide information to the Adobe® Flex® compiler.
Metadata tags do not get compiled into executable code, but provide information to control how portions of your code
get compiled.
For more information about additional metadata tags that you use when creating an application, such as
the [Embed]metadata tag, see “Embedding assets” on page 1693.
About metadata tags
Metadata tags provide information to the compiler that describes how your components are used in an application.
For example, you might create a component that defines a new event. To make that event known to the Flex compiler
so that you can reference it in MXML, you insert the [Event] metadata tag into your component, as the following
ActionScript class definition shows:
[Event(name="enableChanged", type="flash.events.Event")]
class ModalText extends TextArea {
...
}
In this example, the [Event] metadata tag specifies the event name and the class that defines the type of the event
object dispatched by the event. After you identify the event to the compiler, you can reference it in MXML, as the
following example shows:
你插入元标签到你的MXML和AS文件是个Flex编译器提供信息用的.
元标签不会被编译进可执行的代码中,但是元标签提供的信息控制了编译器怎样编译代码..(官方资料,好像更准确,更权威点,水平有限...太麻烦了....需要的朋友自己去下好了...)
元标签在<fx:Metadata>和<fx:Script>的区别:
inserted before the generated class declaration, but text within <fx:Script> tag is inserted in the body of the
generated class declaration. Therefore, metadata tags like [Event] and [Effect] must go in an <fx:Metadata> tag,
but the [Bindable] and [Embed] metadata tags must go in an <fx:Script> tag.
元标签在<fx:Metadata> and <fx:Script>的关键区别在于:<fx:Metadata> 编译后插入到类申明前,而<fx:Script>内的元标签将会插入到类体里,所以,元标签[Event]和[Effect]最好放到<fx:Metadata>里,但是[Bindable][Embed]最好在<fx:Script>内..
Flex中元标签的说明:
[SkinPart]
Define a property of a component that corresponds to a skin part. For more
information, see “SkinPart metadata tag” on page 2384.
[SkinState]
Defines the view states that a component’s skin must support. For more
information, see “SkinState metadata tag” on page 2385.
[HostComponent]
Specifies the host component for a Spark skin class. For more information, see
“HostComponent metadata tag” on page 2380
[Effect]
Defines the MXML property name for the effect. For more information, see
“Effect metadata tag” on page 2379.
===============================================================================
HostComponent metadata tag
Use the [HostComponent] metadata tag to identify the host component of a Spark skin class. The [HostComponent]
metadata tag has the following syntax:
<Metadata>
[HostComponent(componentName)]
</Metadata>
For example:
<Metadata>
[HostComponent("spark.components.Button")]
</Metadata>
As a result of this metadata, Flex creates the property hostComponent on the skin class. You can then use this property
to access public members of the host component’s instance from within the skin. For example, in a Button skin, you
can access the Button’s style properties.
SkinPart metadata tag
Components can uses skins made up of skin parts. Use the [SkinPart] metadata tag to define a property of a
component that corresponds to a skin part. Users of the component do not set the skin part properties directly. The
component's skin sets the skin part properties.
Insert the [SkinPart] metadata tag before any property that corresponds to a skin part. The [SkinPart] metadata
tag has the following syntax:
[SkinPart(type="package.className", required="true_false")]
/**
* Optional ASDoc comment.
*/
Property definition
The type and required attributes are optional. The type attribute specifies the data type of the skin part, which
determines whether the part is static or dynamic. The default value of type is determined by the data type of the
property.
The required attribute specifies if the skin class must define the skin part. The default value of the required attribute
is false.
SkinPart metadata is inherited by subclasses of the component.
For more information, see “Spark Skinning” on page 1597.
Static skin parts
Static skin parts are created once by an instance of a component, and are defined as shown below: 2385 USING FLEX 4.5
Custom components
[SkinPart]
/**
* ASDoc comment for thumb.
*/
public var thumb:spark.components.Button;
The data type for static parts is the data type of the part property. In this example above, the type is Button. Therefore,
static skin parts typically omit the type attribute of the [SkinPart] metadata tag.
Dynamic skin parts
Some components create multiple instances of a skin part. For example, the Spark ButtonBar control can create any
number of buttons. Dynamic skin parts can be created multiple times by a component. The data type of a dynamic skin
part property is always IFactory, but the metadata tag can optionally define the data type of the skin part by using the
type property.
For example from the spark.components.ButtonBar class:
[SkinPart(required="false", type="mx.core.IVisualElement")]
/**
* A skin part that defines the first button.
*/
public var firstButton:IFactory;
Because the data type of the skin part is IFactory, it is a dynamic skin part. Each instance of the skin part is of type
mx.core.IVisualElement.
SkinState metadata tag
The [SkinState] metadata tag defines the view states that a component’s skin must support. The tag goes outside the
component’s class definition, and inside the package definition. The tag is inherited, but can be overridden in a
subclass.
The SkinState tag has the following ActionScript syntax:
[SkinState("stateName")]
The following example defines two skin states for a component:
package spark.components.supportCl asses
{
/**
* Optional ASDoc comment. */
[SkinState("n ormal")]
/**
* Optional ASDoc comment. */
[SkinState("disabled")]
public class MyClass {}
For more information, see “Spark Skinning” on page 1597.
下载:http://help.adobe.com/en_US/flex/using/flex_4.5_help.pdf
发表评论
-
Flex与Struts2整合相关
2011-08-12 00:14 12131.http://jusesgod.iteye.com/blo ... -
郁闷的查询
2011-08-03 10:19 866浪费了4个小时,只是少了一个“0” -
flex 中错误收集
2011-07-06 06:19 1059A pseudo attribute name is expe ... -
The current workspace was created by a previous version of flash builder 解决
2011-07-06 04:46 1251升级了sdk到4.5.1,每次打开总是 其实不理它,至少目前 ... -
在用Flex做项目的时候,一些小经验
2011-06-23 04:09 1299http://hi.baidu.com/interces ... -
Flex 资源收集
2011-06-23 02:20 1139http://www.adobe.com/cfusion/ex ... -
Flex printjob 相关资料收集
2011-06-18 21:36 11181.http://fengxiangpiao.iteye.co ... -
ActionScript 3 Reference 总是 retrieve data from...解决
2011-06-18 21:26 947actionscript api reference 总是 r ... -
Flex module 学习总结
2011-06-08 22:55 1239Adobe 写道 To see an example of ... -
关于flex添加音频的方法
2011-05-26 21:14 1996参考: http://bbs.airia.cn/th ... -
ActionScript组件开发
2011-05-26 10:33 1313http://sunshineyao.iteye.com/bl ... -
Flash Builder 4.5 and Flex sdk 4.5 (hero) release...
2011-05-25 11:33 1084Flex 4.5 介绍.... http://www.ado ... -
Flex ActionScript 建模工具和代码生成工具一览
2011-05-25 09:40 1765http://seantheflexguy.com/blog/ ... -
Flex数据交互方法 :httpservice, webservice, RemoteObject, socket
2011-05-24 22:12 1524http://hi.baidu.com/zhao_gw/blo ... -
终于在Google App Engine/Java(GAE/J)上成功部署运行Flex+BlazeDS
2011-05-24 15:58 2632http://www.iteye.com/topic/4283 ... -
Flex 4通过重写DataGridColumn和CheckBox类给DataGrid添加选择列-CheckBoxColumn(全)
2011-05-24 15:53 2311http://blog.yotuo.net/post/2009 ... -
Flex 之 郁闷 swc生成
2011-05-22 20:51 3738找了个组件....想方便日后使用...搞成swc..以后只要c ... -
Flex Time 组件相关
2011-05-21 23:28 571DateField 只能选日期,居然没有时间...日了... ... -
Cannot create class of type 'XXX'. Type 'XXX' not found.
2011-05-21 09:18 2657http://blog.csdn.net/ozzy_003/a ... -
Flex blog 收集
2011-05-20 21:27 10801.http://hi.baidu.com/luming198 ...
相关推荐
在Flex4中,自定义组件皮肤是提升应用视觉效果和用户体验的重要手段。下面将详细介绍如何在Flex4中自定义组件皮肤。 1. **组件皮肤的基本概念** - 组件皮肤是Flex中改变组件外观的一种方式,通过定义不同的皮肤,...
ActionScript组件是Flex4中自定义组件的主要方式,它提供了更高级别的抽象,使得组件开发更为高效和简洁。 描述中提到的"博文链接:https://schy-hqh.iteye.com/blog/1756582"可能是一个详细教程或者示例代码的来源...
在Flex4中,自定义组件皮肤是提升应用界面美观度和用户体验的重要手段。Flex4引入了全新的皮肤架构,使得开发者可以更加灵活地控制组件的外观和交互效果。本篇文章将围绕Flex4自定义组件皮肤进行深入讲解,并结合...
自定义组件可以通过在Flex项目的MXML文件中引用`<mx:SWFLoader>`或`<s:SWFObject>`标签来加载`searchField.swf`。此外,也可以将AS3代码引入项目,以便在运行时动态实例化组件。 5. **源码分析**: 对于`document...
2. **声明MXML元数据**:在ActionScript类中,使用`@MXComponent`元数据标签来声明这是一个Flex组件,并指定其MXML标签名。 3. **定义属性和样式**:为了使组件可配置,你需要定义公开的属性。这些属性可以通过MXML...
在Flex4中,自定义组件是一项重要的技能,它允许开发者根据特定需求创建具有独特功能和外观的用户界面元素。本话题聚焦于自定义一个通用的`ImageButton`组件,该组件结合了图像和按钮的功能,提供了更丰富的交互体验...
下面将详细解释Flex自定义组件、事件处理以及它们在实际应用中的作用。 一、Flex自定义组件 Flex自定义组件是指开发者根据项目需求,通过继承已有的Flex基类(如UIComponent或Canvas),并添加特定功能和样式来创建...
在Flex4中,选择树组件(Tree)是用户界面中常用的一种控件,它允许用户以层级结构展示数据,并进行选择操作。这个组件特别适合展现具有层次关系的数据,如文件系统、组织架构或者产品分类等。 在Flex4中,Tree组件...
在Flex4中,ActionBar可以通过创建自定义组件来实现。通常,我们会继承MX或Spark组件库中的现有组件,比如TitleWindow或SkinnableContainer,并重写或扩展其皮肤和行为。为了自定义ActionBar,我们需要关注以下几个...
在微信小程序开发中,自定义组件是提升用户体验和界面设计灵活性的重要工具。本文将深入探讨如何创建一个“标签式导航栏”自定义组件,包括如何实现样式定制、横向滚动以及隐藏滚动条,同时还会讲解如何监听item点击...
在Flex 4中,图表组件主要包含以下几种类型: 1. **LineChart**:线图,用于显示连续数据,常用于展示趋势变化。 2. **BarChart**:条形图,适合比较不同类别的数值。 3. **ColumnChart**:柱状图,与条形图类似,...
只需在标签库中引入自定义组件,然后在MXML布局中添加它。 6. **事件监听**:在Flex应用中,事件监听通常通过`addEventListener()`方法实现。你可以为自定义控件添加多个事件监听器,以处理不同类型的事件。事件...
自定义控件是Flex开发中的另一个关键点,它能够满足开发者对特定功能或外观的需求,而这些需求可能无法通过Flex提供的标准组件来实现。自定义控件通常通过继承已有的UIComponent或者更具体的基类,如Button或Canvas...
Flex4支持自定义组件样式,你可以通过CSS来改变分页组件的颜色、大小、图标等外观。 ```css Pagination { button-up-background-color: #F5F5F5; button-over-background-color: #E0E0E0; button-down-...
几经尝试发现是由于Flex控件在旋转后中文就不显示了,因此做了相应修改以支持中文,并添加了一些删除,增加子组件的方法,以方便编程式的使用。当然如果熟悉了Flex组件的生命周期,可以根据需求增添功能。 对于中文...
本篇文章将深入探讨Flex中的Time组件,了解其基本用法、功能特性以及如何自定义和扩展。 Time组件在Flex中属于MX组件库,它是MX Form组件家族的一部分,主要服务于数据输入场景。Time组件的设计目标是提供一个易于...
在Flex开发中,有时我们需要将用户界面或者特定的组件(如图表)保存为图像文件,以便用户可以离线查看或进一步处理。这个过程涉及到的技术主要包括组件渲染、图像处理和文件保存。下面我们将深入探讨如何在Flex中...
在本文中,我们将深入探讨Flex组件系统,包括其核心概念、组件的使用以及AllMenu.mxml文件可能涉及的内容。 Flex组件是构建用户界面的基本元素,它们是预定义的、可重用的代码单元,可以显示文本、图像、按钮、滑块...
在Flex 4中,最重要的一个改变就是引入了Spark组件模型,这是一套全新的组件体系,旨在提供更高效、可定制性更强的UI组件。Spark组件相比于早期的MX组件,更加轻量级,设计时更注重组件的外观与行为分离,使得开发者...