Posts Tagged ‘开源控件’

Posted by Kevin Luo at 20 December 2009

Category: Flex 迷你教程, 开源控件

Tags: , , ,

在项目中我们对DataGrid的要求是很高的,但很不幸的Flex 的DataGird的功能是很傻的,这就催生了AdvancedDatgrid, 它确实解决了很多DataGrid不能做的事,比如多级排序,单元格选择,树状显示数据,合并表头等,但是不知道为什么它确忘记了 “合并单元格”这么重要的事。好在牛人是很多的,于是出现了MecGrid, NecGrid这样不错的能解决单元格合并的DataGrid, 不过他们都各有缺点。

MecGrid: (http://www.mechansp.com/index.php)

1. 不支持itemrender。
2. 单元格选择时无法获知整行数据。
3. 不支持xxxFunction设置比如(labelFunction)
4. 设置很不方便。在column设置中大量使用 number作为参数,非常非常的不利于使用,在线文档对这个ResourceXML的设置也没有提到具体细节,这个很头痛.

总结: MecGrid的使用非常不方便,而且完全不支持复杂数据类型,虽然实现了很多功能但都是固定功能,扩展性不强。这让他局限在只能作为表格使用。
NEC Grid (http://www.necst.co.jp/product/ibiz/column/ibizblock/chap7.html)

nec

1. 不能改变行高。
2. 破换了itemrender的使用,我增加了一个ComboBox作为itemrender,但是他的显示完全不正常。如果itemrender的高度大于他的默认行高,显示会被切断。
3. 不支持单元格选择。

总结:这个DataGrid的使用非常方便,不过缺点也比较明显,尤其是对itemrender这条,要命的是他不能改变行高,但实际中我们的数据是很有可能换行的。另外他居然不支持单元格选择,作为一个AdvancedDatagird,单元格选择在很多时候是必要的。总的来说这个DataGrid用于对数据操作没有特殊要求的用户是不错的选择。

—————————-废话结束,教程开始的分割线—————————————

(more…)

Posted by Kevin Luo at 3 April 2009

Category: Library

Tags: , ,

Not to be outdone by MySpace announcing a deeper partnership with Microsoft yesterday, bringing Silverlight technology to its development platform and mobile application, Facebook and Adobe are today announcing a partnership and the release of fresh Flash client libraries to make it easier for developers to plug into the Facebook Platform inside their social applications built with Flash. (more…)

Posted by Kevin Luo at 9 March 2009

Category: 开源控件, 未分类

Tags: , , ,

朋友刚做好的QQ台球辅助外挂, 他的台球积分总是徘徊在-xxx分,有天终于爆发决定改变这种局面,身为专业人员当然要用专业的方法,于是这款Snooker Assistan外挂就此诞生。基于桌球碰撞理论用AIR开发了这款外挂,用上这个东西,新手的水平立马可以变成有1000场经验的中高手的水平。两天时间,朋友已以从以前的-300分刷0分了(不容易阿,终于不是负资产了)

(more…)

Posted by Kevin Luo at 3 March 2009

Category: 开源控件

Tags: , ,

几个月前看到的一组Flex特效,后来不小心把地址搞掉了,又忘了名字,今天突然又找到了,哈哈。 废话不多说,看看吧。

Efflex 是一组由 Stephen Downs (aka “Tink”)开发的 Flex特效。

efflex1 (more…)

Posted by Kevin Luo at 12 February 2009

Category: AIR 迷你教程

Tags: ,

实现DataGird行颜色的改变不难,网上也有很多类似的教程,不过有的太罗嗦,有的说的又太简单,我稍微折中了一下。

首先继承DataGrid做一点简单的扩展。扩展的目的是:

  1. 添加一个rowColorFunction,根据当前行的值设置行的颜色,用法与labelFunction一样。
  2. 覆写drawRowBackground, 让其能用rowColorFunction返回的颜色设置当前行。

附件的RowColorDataGrid.as 是国外一个家伙写的,我没改(实在没什么可改的了),只添加了注释帮助大家理解。

下面是一个简单的Demo, 将check box钩中的行高亮显示: (more…)

Posted by Kevin Luo at 2 January 2009

Category: 开源控件

Tags: ,

控件名称 (Component Name):iMagnifyingGlass.as

作用 (Description):控 件继承于Panel, 和普通panel使用方法相同,对放入其中的所有Image,当鼠标划过时有放大镜效果。 (iMagnifyingGlass extends from panel that can enlarge all passed in images when mouseover )

接口 (apis)

属性(Attributes):

multiple:Number -- 设置放大倍数,默认2倍 (Default value is 2)
glassHeight:Number — 设置镜片高度,默认150px (Magnifying glass height, default value is 150px)
glassWidth:Number — 设置镜片宽度, 默认150px (default value is 150px)
glassStyleName: Number — 设置镜片样式表 (set the style name of glass) (more…)

Posted by Kevin Luo at 2 January 2009

Category: 开源控件

Tags: , ,

控件名称 (Component Name):  iScrollBox.as
作用 (Description):对放入的控件实现iphone式的滚动条 (A panel with iphone scroll style)
接口 (apis):

var iphoneList:iScrollBox= newiScrollBox(displayObject, speed);  //创建iList对象时传入要实现滚动的对象,以及设定滚动速度。
iList.displayObj; //返回传入的对象

Demo: List, Image

List Demo

1. 以拖拽方式滚动list.(Drag to scroll the list)
2. 快速拖拽后放手,会根据拖拽的速度继续向拖拽方向滚动一段时间。慢慢滚动不会引发额外移动。(The list will scroll like iphone when you draging and release the mouse)
3. 滚动时点击item会停止滚动。(click item to stop scroll immediately) (more…)