- 浏览: 213560 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
zlbdexiaohao:
怎么去掉默认的图标,folderClosedIcon=&quo ...
FLEX 构建完美的带有CheckBox三状态的Tree控件 -
zlbdexiaohao:
看不懂看不懂
FLEX 构建完美的带有CheckBox三状态的Tree控件 -
FYIHDG:
[list][*][list][*][*][list][*][ ...
ImageIO读jpg的时候出现exception:bandOffsets.length is wr -
被剥削的程序员:
你好我在引用你的comboxtree解决问题的时候,发现点击父 ...
ComboBoxTree -
527184687:
[flash=200,200][url][img][list] ...
ext treePanel 更换图标 总结
customizations much more straightforward. Here is a table showing Flex 3 Halo components and their Flex 4 beta Spark counterparts: Flex 3 Halo Component Flex 4 beta Spark Component
mx.controls.Button spark.components.Button
mx.controls.ButtonBar spark.components.ButtonBar
mx.controls.CheckBox spark.components.CheckBox
mx.controls.ComboBox spark.components.DropDownList (w/o editability)
mx.controls.HorizontalList spark.components.List (with a HorizontalLayout)
mx.controls.HRule spark.primitives.Line
mx.controls.HScrollBar spark.components.HScrollBar
mx.controls.HSlider spark.components.HSlider
mx.controls.Image spark.primitives.BitmapImage
mx.controls.LinkBar spark.components.ButtonBar (with a custom skin)
mx.controls.LinkButton spark.components.Button (with a custom skin)
mx.controls.List spark.components.List
mx.controls.NumericStepper spark.components.NumericStepper
mx.controls.RadioButton spark.components.RadioButton
mx.controls.RadioButtonGroup spark.components.RadioButtonGroup
mx.controls.TextArea spark.components.TextArea
mx.controls.TextInput spark.components.TextInput
mx.controls.TileList spark.components.List (with a TileLayout)
mx.controls.ToggleButtonBar spark.components.ButtonBar
mx.controls.VideoDisplay spark.components.VideoPlayer
mx.controls.VRule spark.primitives.Line
mx.controls.VScrollBar spark.components.VScrollBar
mx.controls.VSlider spark.components.VSlider
mx.core.Application spark.components.Application
mx.core.Window spark.components.Window
mx.core.WindowedApplication spark.components.WindowedApplication
mx.containers.Canvas spark.components.Group
mx.containers.HBox spark.components.HGroup
mx.containers.Panel spark.components.Panel
mx.containers.Tile spark.components.Group (with a TileLayout)
mx.containers.VBox spark.components.VGroup
Adobe encourages you to use Halo components and containers along with Spark components. Because Adobe continues to build components atop the same base class (UIComponent), there should be full interoperability between Spark and Halo. Here is a table of the components and containers that do not currently have direct Spark equivalent classes.
Flex 3 classes with no direct Flex 4 beta counterpart
mx.controls.Alert
mx.controls.ColorPicker
mx.controls.DataGrid
mx.controls.DateChooser
mx.controls.DateField
mx.controls.Menu
mx.controls.MenuBar
mx.controls.PopUpButton
mx.controls.PopUpMenuButton
mx.controls.ProgressBar
mx.controls.RichTextEditor
mx.controls.TabBar
mx.controls.Tree
mx.containers.Accordion
mx.containers.ApplicationControlBar
mx.containers.ControlBar
mx.containers.DividedBox
mx.containers.Form
mx.containers.Grid
mx.containers.TabNavigator
mx.containers.TitleWindow
mx.containers.ViewStack
Changes in states syntax
Flex 4 beta has promoted the states functionality to a full MXML language feature. As a result, you will likely find states to be much more flexible and direct. The new states syntax is more inline, allowing state-specific changes to be specified in context. Here are the key differences in the Flex 4 beta syntax:
Only states are defined within the states array.
In the new states syntax, you cannot use de>AddChildde> and de>RemoveChildde>. Instead, you define a component's role in a particular state on the component itself using the de>includeInde> and de>excludeFromde> attributes.
In the following Flex 3 example, states are used to include a Button and remove a TextInput only when the de>currentStatede> of the document is de>submitStatede>. This approach can get very verbose with more complex states.
<mx:states> <mx:State name="submitState" basedOn=""> <mx:AddChild relativeTo="{loginForm}" > <mx:Button label="submit" bottom="10" right="10"/> </mx:AddChild> <mx:RemoveChild target="{firstTextInput}"/> </mx:State></mx:states> <mx:TextInput id="firstTextInput" /><mx:Canvas id="loginForm" />
Here is the simpler Flex 4 beta code using de>includeInde> and de>excludeFromde>.
<s:states> <s:State name="submitState" /></s:states><s:TextInput id="firstTextInput" excludeFrom="submitState" /><s:Group id="loginForm" > <s:Button label="submit" bottom="10" right="10" includeIn="submitState"/></s:Group>
de>SetPropertyde>, de>SetStylede>, and de>SetEventHandlerde> have been replaced by a new dot syntax, which allows you to qualify MXML attribute values with a specific state identifier.
In the following Flex 3 example, the code defines a property, style, and event for a Button in de>submitStatede>.
<mx:states> <mx:State name="submitState" basedOn=""> <mx:SetProperty target="{submitButton}" name="label" value="submit" /> <mx:SetStyle target="{submitButton}" name="textDecoration" value="underline"/> <mx:SetEventHandler target="{submitButton}" name="click" handler="trace('done');"/> </mx:State> <mx:State name="clearState" basedOn=""> <mx:SetProperty target="{submitButton}" name="label" value="clear" /> de><mx:SetEventHandler target="{submitButton}" name="click" de>handler="emptyDocument()" /> </mx:State></mx:states> <mx:Button id="submitButton" />
In Flex 4 beta, the code looks like this:
<s:states> <s:State name="submitState" /> <s:State name="clearState" /></s:states> <s:Button label.submitState="submit" textDecoration.submitState="underline" click.submitState="trace('done')" click.clearState="emptyDocument()" label.clearState="clear" textDecoration.clearState="none"/>
A component can no longer be in an undefined or null state. By default, the first declared state is the initial state of a component.
The new syntax is available when a document uses the MXML 2009 language namespace. You cannot mix the legacy syntax and the new states syntax. The old syntax is available only in the MXML 2006 namespace.
Additionally, each component now supports a set of states defined in its skin class, which makes it simpler to apply visual changes depending on the state of a component. For example, if you look at the skin for the Spark Button, you will find the following states defined:
<s:states> <s:State name="up" /> <s:State name="over" /> <s:State name="down" /> <s:State name="disabled" /></s:states>
The ButtonSkin class defines what happens visually to a Spark Button in each one of these states.
This is only a brief introduction to the new Flex 4 beta states syntax. Visit the Enhanced States Syntax Spec to find more details.
mx.controls.Button spark.components.Button
mx.controls.ButtonBar spark.components.ButtonBar
mx.controls.CheckBox spark.components.CheckBox
mx.controls.ComboBox spark.components.DropDownList (w/o editability)
mx.controls.HorizontalList spark.components.List (with a HorizontalLayout)
mx.controls.HRule spark.primitives.Line
mx.controls.HScrollBar spark.components.HScrollBar
mx.controls.HSlider spark.components.HSlider
mx.controls.Image spark.primitives.BitmapImage
mx.controls.LinkBar spark.components.ButtonBar (with a custom skin)
mx.controls.LinkButton spark.components.Button (with a custom skin)
mx.controls.List spark.components.List
mx.controls.NumericStepper spark.components.NumericStepper
mx.controls.RadioButton spark.components.RadioButton
mx.controls.RadioButtonGroup spark.components.RadioButtonGroup
mx.controls.TextArea spark.components.TextArea
mx.controls.TextInput spark.components.TextInput
mx.controls.TileList spark.components.List (with a TileLayout)
mx.controls.ToggleButtonBar spark.components.ButtonBar
mx.controls.VideoDisplay spark.components.VideoPlayer
mx.controls.VRule spark.primitives.Line
mx.controls.VScrollBar spark.components.VScrollBar
mx.controls.VSlider spark.components.VSlider
mx.core.Application spark.components.Application
mx.core.Window spark.components.Window
mx.core.WindowedApplication spark.components.WindowedApplication
mx.containers.Canvas spark.components.Group
mx.containers.HBox spark.components.HGroup
mx.containers.Panel spark.components.Panel
mx.containers.Tile spark.components.Group (with a TileLayout)
mx.containers.VBox spark.components.VGroup
Adobe encourages you to use Halo components and containers along with Spark components. Because Adobe continues to build components atop the same base class (UIComponent), there should be full interoperability between Spark and Halo. Here is a table of the components and containers that do not currently have direct Spark equivalent classes.
Flex 3 classes with no direct Flex 4 beta counterpart
mx.controls.Alert
mx.controls.ColorPicker
mx.controls.DataGrid
mx.controls.DateChooser
mx.controls.DateField
mx.controls.Menu
mx.controls.MenuBar
mx.controls.PopUpButton
mx.controls.PopUpMenuButton
mx.controls.ProgressBar
mx.controls.RichTextEditor
mx.controls.TabBar
mx.controls.Tree
mx.containers.Accordion
mx.containers.ApplicationControlBar
mx.containers.ControlBar
mx.containers.DividedBox
mx.containers.Form
mx.containers.Grid
mx.containers.TabNavigator
mx.containers.TitleWindow
mx.containers.ViewStack
Changes in states syntax
Flex 4 beta has promoted the states functionality to a full MXML language feature. As a result, you will likely find states to be much more flexible and direct. The new states syntax is more inline, allowing state-specific changes to be specified in context. Here are the key differences in the Flex 4 beta syntax:
Only states are defined within the states array.
In the new states syntax, you cannot use de>AddChildde> and de>RemoveChildde>. Instead, you define a component's role in a particular state on the component itself using the de>includeInde> and de>excludeFromde> attributes.
In the following Flex 3 example, states are used to include a Button and remove a TextInput only when the de>currentStatede> of the document is de>submitStatede>. This approach can get very verbose with more complex states.
<mx:states> <mx:State name="submitState" basedOn=""> <mx:AddChild relativeTo="{loginForm}" > <mx:Button label="submit" bottom="10" right="10"/> </mx:AddChild> <mx:RemoveChild target="{firstTextInput}"/> </mx:State></mx:states> <mx:TextInput id="firstTextInput" /><mx:Canvas id="loginForm" />
Here is the simpler Flex 4 beta code using de>includeInde> and de>excludeFromde>.
<s:states> <s:State name="submitState" /></s:states><s:TextInput id="firstTextInput" excludeFrom="submitState" /><s:Group id="loginForm" > <s:Button label="submit" bottom="10" right="10" includeIn="submitState"/></s:Group>
de>SetPropertyde>, de>SetStylede>, and de>SetEventHandlerde> have been replaced by a new dot syntax, which allows you to qualify MXML attribute values with a specific state identifier.
In the following Flex 3 example, the code defines a property, style, and event for a Button in de>submitStatede>.
<mx:states> <mx:State name="submitState" basedOn=""> <mx:SetProperty target="{submitButton}" name="label" value="submit" /> <mx:SetStyle target="{submitButton}" name="textDecoration" value="underline"/> <mx:SetEventHandler target="{submitButton}" name="click" handler="trace('done');"/> </mx:State> <mx:State name="clearState" basedOn=""> <mx:SetProperty target="{submitButton}" name="label" value="clear" /> de><mx:SetEventHandler target="{submitButton}" name="click" de>handler="emptyDocument()" /> </mx:State></mx:states> <mx:Button id="submitButton" />
In Flex 4 beta, the code looks like this:
<s:states> <s:State name="submitState" /> <s:State name="clearState" /></s:states> <s:Button label.submitState="submit" textDecoration.submitState="underline" click.submitState="trace('done')" click.clearState="emptyDocument()" label.clearState="clear" textDecoration.clearState="none"/>
A component can no longer be in an undefined or null state. By default, the first declared state is the initial state of a component.
The new syntax is available when a document uses the MXML 2009 language namespace. You cannot mix the legacy syntax and the new states syntax. The old syntax is available only in the MXML 2006 namespace.
Additionally, each component now supports a set of states defined in its skin class, which makes it simpler to apply visual changes depending on the state of a component. For example, if you look at the skin for the Spark Button, you will find the following states defined:
<s:states> <s:State name="up" /> <s:State name="over" /> <s:State name="down" /> <s:State name="disabled" /></s:states>
The ButtonSkin class defines what happens visually to a Spark Button in each one of these states.
This is only a brief introduction to the new Flex 4 beta states syntax. Visit the Enhanced States Syntax Spec to find more details.
发表评论
-
浏览器前进后退按钮切换状态
2010-06-03 16:22 1549Flex browser manager能够让用户通过浏览器的 ... -
Flex3 Module 模块化 应用程序 开发
2010-05-26 15:40 1231模块(Modules) 模块(Module)是创建大型Fle ... -
OUTERDOCUMENT
2010-05-26 14:38 2483scope 也更改了。我的意思是, 从 <mx:Comp ... -
FLEX module的使用
2010-05-26 14:12 1027用FLEX来开发应用难免不 ... -
flex 加载 swf
2010-01-13 13:24 1235<?xml version="1.0&qu ... -
flex下载文件
2010-01-10 10:14 1295<?xml version="1.0&qu ... -
flex最全的表单验证
2010-01-05 14:50 1180<?xml version="1.0&qu ... -
mxml中动态生成组件
2009-12-28 17:09 1436客户那边的API 返回值如下 <list> ... -
TabNavigator
2009-12-20 23:21 959<?xml version="1.0&qu ... -
flex 打开新页面 窗口最大化
2009-12-14 22:12 2345var args:String = "toolb ... -
Flex tree xml的数据源
2009-12-10 23:43 6708<?xml version="1.0&qu ... -
Flex中利用ContextMenu和ContextMenuItem类在DataGrid上创建一个自定义右键弹出菜单的例子
2009-12-10 22:49 3522<?xml version="1.0&qu ... -
flex datagrid分页排序失效
2009-12-09 22:04 1778分页改变了datagrid的数据源,数据源变了视图就跟着变了。 ... -
Flex 弹出窗口的例子
2009-12-09 00:44 1504TitleWindowApp.mxml <mx:Ap ... -
带CheckBox和级联操作的Tree
2009-12-08 23:28 2336CSDN上下载的,该Tree是采用XMLList 绑定数据的 ... -
FLEX 构建完美的带有CheckBox三状态的Tree控件
2009-12-08 23:02 7416CheckTree.as package ht.syste ... -
flex blazeds 异步加载tree
2009-12-06 14:48 1565<?xml version="1.0&qu ... -
flex 异步 tree
2009-12-06 14:33 2506例子一 <?xml version="1. ... -
FLEX数据类型和JAVA数据类型对应关系
2009-12-03 22:31 3032类型名 类型描述 Boolean 只有两个值:true 和fa ... -
BlaseDS+Spring 整合配置
2009-11-24 10:54 1255首先到spring网站下载两 ...
相关推荐
4. **Flex组件库**: Flex 3提供了丰富的预构建UI组件,如Button、Label、TextInput、Accordion、TabBar等,这些组件可以快速搭建用户界面,并能自定义样式和行为。 5. **数据绑定**: Flex支持数据绑定,这意味着UI...
3. **图表组件**:Flex提供了一系列图表组件,如线图、柱状图、饼图、雷达图等,可用于创建仪表盘的各种图形元素。例如,使用PieChart组件可以创建饼图,表示各个部分的相对比例;使用LineChart或AreaChart可以展示...
1. Flex组件库:包括按钮、标签、面板、表格等常见的UI元素,这些组件可以自定义样式和行为,满足不同设计需求。 2. Spark组件和MX组件:Spark组件是Flex 4引入的新一代组件,更加轻量级且易于定制;MX组件则是Flex ...
在Flex中,我们可以使用数据绑定技术将这些数据绑定到UI组件上,使得数据的变化能实时反映在视图上。数据集(ArrayCollection)是Flex中常用的用来存储和操作数据的类,适合于与组件进行数据绑定。 **3. 动画和效果...
Flex3 是Adobe Flex框架的第三个主要版本,它提供了一整套强大的工具和组件,用于创建丰富的互联网应用程序(RIA)。在Flex3中,界面布局是构建用户界面的关键部分,它决定了应用程序中各组件的排列、大小和对齐方式...
4. **Flex Component Framework**:组件库是Flex的核心部分,包含大量预定义的用户界面组件,如按钮、文本输入框、数据网格等。这些组件是可复用的,可以快速构建复杂的用户界面。 5. **Flex Builder**:Adobe Flex...
5. **Flex组件库** Flex内建了丰富的组件库,包括按钮、文本框、列表、图表等,这些组件可以帮助开发者快速构建UI。2003年版本的组件可能相对基础,但已经足够构建许多复杂的应用场景。 6. **数据绑定** Flex引入...
### Flex 4 组件的生命周期 #### 一、引言 在深入了解 Flex 4 组件的生命周期之前,我们首先需要了解什么是组件的生命周期以及为什么 Flex 组件需要一个生命周期。Flex 是一个用于构建高性能且功能丰富的 Web 应用...
Halo图表则是Flex 3时代的图表组件,虽然功能相对较少,但在某些情况下依然适用。 2. **饼图(Pie Chart)**:饼图是一种常用来表示数据比例的图形。在Flex中,可以通过`mx.charts.PieChart`或`s:PieChart`类来创建...
1. **状态管理**:每个Flex组件都有多个状态,如“normal”、“disabled”、“hovered”等。皮肤可以根据组件的状态改变其显示。 2. **Skin Parts**:皮肤部件是组件内部可视或不可视的部分,如按钮的背景、文本等。...
- **手动触发数据改变事件**:如果Flex组件是通过观察者模式监听数据变化的,可以通过手动触发相应的数据改变事件来通知Flex重新加载数据。 #### 四、案例分析 假设有一个Flex应用需要定期从服务器获取最新的用户...
总的来说,自定义Flex TitleWindow的最大最小化功能需要对Flex组件、事件处理以及布局管理有深入的理解。通过监听和响应用户交互,我们可以实现更符合项目需求的窗口操作功能。在实际开发中,应确保代码的可维护性和...
2. **Flex组件库**:Flex提供了一系列预定义的UI组件,如Button、ComboBox、TextArea等,它们是构建用户界面的基础。书籍将详细介绍这些组件的使用方法和自定义技巧。 3. **数据绑定**:Flex的数据绑定机制简化了UI...
3. **数据绑定**:利用Flex提供的数据绑定功能,使UI组件能够自动更新数据变化。 4. **调试与优化**:使用Flex Builder等工具进行调试,确保应用程序无误并进行性能优化。 5. **部署与维护**:发布应用程序并持续...
总的来说,Flex 提供了强大的工具和组件库,允许开发者创建具有丰富视觉效果和互动性的Web应用。通过熟练掌握 MXML、ActionScript 3.0、事件处理、数据绑定以及动画效果的使用,开发者可以构建出各种复杂的应用,...
IBM Flex System Enterprise Chassis是IBM Flex System系列中的一个核心组件,它提供了高度集成的平台,用于支持各种类型的计算节点和存储节点。该机箱的设计考虑到了灵活性和可扩展性,可以轻松地根据需要添加或...
Flex支持数据绑定,这意味着仪表盘的组件可以直接与后台数据源关联,实时反映数据变化。此外,仪表盘通常具有交互性,用户可以通过点击、拖动等操作来查看不同数据切片或调整设置。 7. **优化与性能**: 在开发...
4. **数据绑定**:Flex中的数据绑定机制可以让视图自动反映模型的变化,简化了代码,提高了代码的可维护性。 不过,由于描述中提到功能不强大,我们可以推测这个涂鸦板应用可能没有高级功能,如图层管理、特效添加...
本文将深入探讨Flex中的一个重要组件——ShareObject,也称为本地共享对象,它允许应用程序在用户计算机上存储数据,实现数据的持久化。 ShareObject是Flex提供的一种轻量级的数据存储解决方案,它类似于Web浏览器...