About Us
iiley February 13th, 2007
AsWing Team:
iiley Chen (Email: iiley dot chen at gmail dot com)
Igor Sadovskiy (Email: igor[dot]sadovskiy[at]gmail[dot]com)
Hu Kuang
alva
Firdosh Tangri
Tomato
Bill Lee
Senkay
单恋一块铁
自尊
harry
ai829
小猪
猫粮
Oliver Salzburg
Currently active this quarter: Dev: iiley, 单恋一块铁, Oliver Salzburg; Doc: Hu Kuang, harry, ai829, 小猪, 猫粮
- Comments(99)
hello,
There are some erros in the “JButton and BorderLayout” Tutorial.
The even JButton.ON_PRESS doesn’t exist.
I’ve downloaded AsWing source via SVN, maybe the source was changing and the tutorial no.
Thanks
are you using AsWing A3? that is not same.
Currently there is no tutorials about AsWing A3, there’s a Test project at A3 svn, you can see some example usage there from its source code.
听说iiley是咱们国人,我就说中文了,呵呵!
我这几天刚发现你们做的这个好东西,真是非常惊喜,我觉得它对做FLASH RIA用处非常大,感谢你们的幸苦劳动。
我的问题是:在FLASH IDE环境中怎么用?和用一般的AS类库有什么区别?我在flash8 IDE中试了几次老报错(AS2.0版本的AsWing),说接口的数据类型不匹配,请iiley老大指点!
在Flash CS3中可以使用AsWing A3,使用方法为:在Flash CS3的AS设置中把AsWing A3的src加入类路径,然后就可以使用了(最好使用svn上面的最新版),0.8版本的BasicLookAndFeel.as有问题,不过照提示把漏掉的import加上去也就可以了。
AsWing A2不能在Flash IDE中使用,因为Flash 8 的编译器编译不了。
感谢iiley,希望你们越做越好!
谢谢,我们正在努力!;]
英语说的不咋的,能用中文我就先用中文说了
真的超感谢你们!!!这东西真的很不错,flex的框架也太重了,cs3的连tree都没,自己写没本事
good!excellent!great!
I have used adjs which all i know~
thanks~
Thanks M5, what’s “adjs”?
形容词的复数,呵呵,
再提个下意见要是那个做皮肤的能更方便的支持皮肤更换就好了,我的意思是就是可以容许很规范在几套皮肤之间切换,有点像flex里的动态载入css,他不是有个StyleManager,感觉他那个挺好用的,不过那样估计组件容量又上去了
你是说runtime skin switch?
yes,
还有今天我测试了一下,和flex的框架做了比较,感觉速度比flex的快,不过如果套很多组件的话都慢。但是生成的swf似乎也不小啊,有点小遗憾。
继续研究中。。。。
runtime skin switch 今天完成了支持,具体使用方法:
UIManager.setLookAndFeel(new YourNewLookAndFeel());
AsWingUtils.updateAllComponentUI();
M5,你能把你的比较结果发给我们吗?这样我们好对症下药。如果能提供你做的测试的详细数据方法,那最好了,这样我们好针对你的测试来做优化,或许AsWing还可以更快。 ;】
文件大小的话,我相信AsWing会比Flex小不少。你用完全部组件的情况也只会占用200多k,如果只用简单的几个组件,只需要100k左右。
谢谢你 我马上试runtimeskin
iiley大哥那么负责,我又忍不住重新认真的做了一下简单测试,我用flex组与AsWing做比较
flex:
PanelPlus(自己写的继承自panel,功能和Jframe差不多)包含label,textarea,tree
ASWing:
Jframe+JPanel包含Jlabel,Jtextarea,Jtree
输出swf的大小:
flex:278K,aswing:124K
aswing的输出大小明显好很多(先前错怪了,呵呵)
cpu使用率的测试:
我分别拖动了panelplus与Jframe(里面包含了上述组件)做来回,晃动通过观察任务管理器来记录cpu使用率
(cpu:intel T2500,ram:1.5G)
flex:5%-8%
aswing:22%-32%
这个aswing的表现就比较一般了,况且aswing还是没有拖动Jframe实体,只是拖动虚框而已,百分之二十几的占用率我有些不太理解,有些出乎意料
呵呵,测试比较粗糙,才用aswing没几天,希望对你们有帮助
加油!!
嗯,谢谢M5的测试,我回头测测看是什么原因以及有没有改进的空间。
hi, M5。我刚才测试了一下,感觉速度也不慢,可能在拖动窗口上的确比Flex占用资源多一些,如果把JFrame 设置为直接拖动frame.setDragDirectly(true);好像CPU占用会少一些,你再测测?
另外,拖动一个简单的窗口似乎不是很能说明组件的效率,因为速度都很快,可能很复杂的界面比较能说明问题。:) 况且这里还看不出瓶颈,我就先不做优化了(优化很容易引入新问题)。如果M5有兴趣希望做多些测试,如果发现AsWing比较重要的瓶颈,我会全力做改进。
恩 好的 支持你们~
刚刚试了一下,打开DragDirectly就是下来了,几乎和flex的一样
M5, 你从svn更新一下AsWing重新编译你的测试程序,关闭DragDirectly(之前你测试比较慢的情况)再测测,看看CPU占用是否有比原来好?
(教育网里更新aswing真是慢的让我想自杀)
变小了,比开着DragDirectly小一点,谢啦
你好,刚下载了这个AsWing AS3组件,想用里面的树控件,但不会用,加了如下代码:
AsWingManager.setRoot(this);
var tr:JTree = new JTree();
tr.x = 100;
tr.y = 100;
tr.width = 100;
tr.height = 500;
addChild(tr);
树倒是显示出来了,但收缩/打开节点非常慢,不知道怎么回事?
有没有使用JTree的例子呀?
顺便说一句,我是FLASH刚学。
例子请见Test项目,svn上可以获取最新的,也可从这里下载:
http://code.google.com/p/aswing/downloads/list
里面的第三个,就是例子,包含源代码。
例子中的ComSetSkin.as编译错误:
import org.aswing.skinbuilder.*;
0.9源包中没有skinbuilder这个目录的。
还有,这些例子要在cs3中编译,是不是需要建一个空的fla文件,然后关联到对应的document?
下载页面有SkinBuilderLAF下载。
CS3里面不能使用SkinBuilderLAF,需要FlexBuilder2.0.1。
如果只是使用AsWing,可以使用Flash CS3,直接在帧上面写代码创建组件即可。
不能,也没必要子类化成JButton。
Fla中直接绘制的Button就是SimpleButton了。
类型转换
var child:DefaultMutableTreeNode = _root.getFirstChild() as DefaultMutableTreeNode;
使用你自己的TreeCell,就可以做到。
对,就是是用JTREE的setCellFactory()方法吗,然后再写个类继承DefaultTreeCell类吗。
你可以在setTreeCellStatus方法或者setCellValue方法里面给cell所用的component设置图片资源,默认的是通过在JLabel上设置不同的Icon来实现的。
how can i use JRadioButton and JRadioButtonMenuItem together?
What does the “together” mean, kan?
If it means in a same panel, you can just append them to a same panel, if you mean same button group, just do some thing like this:
var group:ButtonGroup = new ButtonGroup();
group.append(yourRadioButton);
group.append(yourRadioButtonMenuItem);
Hello
i use ASWing 2.0 Framework with my Centrino 1.8 GHz PC and i have heavy performance problems with the following Components:
JComBoBox and JList on a JScrolPane:
The scrolling duration are to long and not smoothly (the Components contains 6 entrys on testing)
JTextFieldArea and JTextField:
The reaction duration on textinput are to long (i press a letter and it takes to long up to the time which appears in flash)
Give it any solution or tips for these Problems?
Thanks
Hi Lime,
We don’t have that problem, what FPS of your movie is?
Or can you send us a demo to review the issue?
Hello
the FPS!!!! Argh, i have set 1 FPS in my FD Projekt !!! I set it to 25 FPS and it works great!!!
Thank you
Hi,
Is there any documentation regarding skinning the AS3 components? An overview of the framework would be really great too, at least the base classes. The only thing stopping me using ASWing is the fear of not being able to extend and write my own bits when necessary. Love your work and can’t wait to start using.
Hi, you can have a look at SkinBuilderLAF and AoenSkin (they are included in the 1.0 package), generally, you just need to edit the graphics in Flash IDE for AoenSkin or Image Editor for SkinBuilderLAF to get different skin.
Hello
Probably stupid question, but how do I integrate the ASWing documentation so it available in Flash IDE?
Thanks a lot
hmm, i’v no idea, never tried it, maybe you can find some info from adobe site or google it. :)
You are a perfect guy!!~~~^_^
支持啊, 为中国人开发的牛框架自豪!
Hello again
how can i do by default the JScrollbar smaller then 16 px? I have change the value scrollBarWidth from 16 to 8 in the BasicScrollBarUI.as and the JButtons are reduce her size. With setPreferredSize() have i reduce the rest of it. My problem is the slide Control between the Buttons. He has every time the same size. I don’t know wehre set the parameter for it.
Please Help me
thx
Lime
Hi Lime, try to set different values for JScrollBar.setValues(newValue:int, newExtent:int, newMin:int, newMax:int).
The thumb size is width same to scrollBarWidth, the height is counted by extent and (max - min). (If it need a very small height, a min height will be used, so try to make it a big height, and tweak it)
Hi iiley,
i have no effects, sorry i forgot to say that i will change the height of the Horizontal ScrollBar on a JTabbedPane which contains a JTextArea. I have wrote the following code:
(j.getHorizontalScrollBar()).setValues(5,5,0,6);
The high is every time the same (i think 16px) and not 5px.
I see, you are using JScrollPane, not standalone JScrollBar. JScrollPane will automatically count the values for the scrollbars with the viewport(in your case it is the JTextArea).
So, you may cant change the thumb height manually here. It is counted with the text max scroll and text extent, the thumb height is used to indicate the scale/proportion of the (view lines / total lines).
The total lines is bigger, the thumb size is shorter…
Hi
hmm that’s bad, i have found a solution for java here:
http://forum.java.sun.com/thread.jspa?threadID=540782&messageID=2623974
I have make a trace of the UIManager defaults:
var t:Array=UIManager.getDefaults().keys();
for (var i:Number = 0; i
That java solution is just change the width, right?
If you want to change the width, it’s easy for AsWing too.
UIManager.getDefaults().put(”ScrollBar.barWidth”, 5);
You may need to update the last AsWing A3 version on svn.
I use the AS2 version, is it the same there?
I think width and hight are the same in java. In ASWing is the width set by default 16 px in the BasicScrollBarUI.as. When i set in the BasicScrollBarUI.as the var
scrollBarWidth = 16;
to 5 then are the Buttons size 5 width and height. This has unfortunately no effects of the slide control between the Buttons. He is every 16 high. The slider displays are inconsistent when it move.
When it works with the AS2 version, does not matter how it set the
UIManager.getDefaults().put(”ScrollBar.barWidth”, 5); line?
I put this line bevor i make a new TextArea on a ScrollPane and it has no effects :(.
Sorry about my bad english i hope you understand me.
Lime, AS2 version has no property of ”ScrollBar.barWidth”, but you modify BasicScrollBarUI.as is right, can you send me a screenshot of your inconsistent scrollbar? You can subscribe to our mail list here : https://lists.sourceforge.net/lists/listinfo/aswing-users
Hello
i have found a solution. I create a new class that’s extends from the BasicScrollBarUI.as. The constructor has a width parameter and after the super() line i set the var scrollBarWidth to my own value. Then i set my own UI with the new width value:
j.getHorizontalScrollBar().setUI(new OwnScrollBarUI(5));
It works great and it has no inconsistent.
thx for helping
Lime
Great done Lime. :)
Hello,
Trying to run a test with skinning so i can figure out how to do it.
Tried to use the ComSetSkin.as and tried just using SkinBuilderLAF.as but can’t seem to get it to work.
I keep getting errors about undfined methods or ‘cant fine org.aswing.skinbuilder’ etc.
Can you point me in the right direction so I can figure out how to use this.
I just want to use the default skin pngs for now. Just need to know how to implement it.
Thanks
Eric
Hi Eric, i remember you was using Flash CS3 to compile, right? If it is, you can’t use SkinbuilderLAF directly with Flash CS3, it need flex compiler because of the “Embed” sytax.
yes, I am using CS3 to compile.
i also tried Aeon.fla and got similar results.
Is there a “halo” style theme I can apply???
I got Aeon.fla to run.
Is there a way for me to use this as an external asset library.
ie: call UIManager.setLookAndFeel() that loads a swf as a parameter???, so i don’t have to bring in all the skin assets into the fla that is driving the application.
If so, can you give me an example?
Thanks.
I’m not very clear about Flash CS3 solution of splite application to serveral swfs, but i know if you use flex compiler, you can compile AsWing, SkinBuilderLAF, and YouLAF, and your application to 4 swf to be dll, and use a loader swf to load them by order, finally use reflection to start the application.
iiley,
Would love to be able to load the aeon.swf or aeon.as file to use as my skin for an application.
That way, my designers (who do not know much code) could have a visible fla file to design the look, and then I could just load or call the swf or .as file to act as my skin.
Yeah, it is able to do that, but i just know how to do that with FlexBuilder + Flash CS3 way… You need to exclude some classes in another swf when you compile it splited. (Suggest you choose FlexBuilder to code and compile, it is much better than Flash CS3)
Hi,
The method addTab is missing in the JTabbedPane.as code although its mentioned in the source code comments. You will need to add this to make the class plug compatible with JTabbedPane of Java and its also easier to then add Tabs.
Thanks for all the hard work.
RMG
Hi,
The JTabbedPane class is missing the addTab method. It is mentioned in the comments of the class but the implementation is actually missing.
Thanks for all the hard work.
RMG
Hi Roger,
addTab method is there it is named “appendTab” and defined in JTabbedPane’s supper class AbstractTabbedPane.
Cheers~~
this got picked up by the spamfilter, about the png encoder:
I’d like to try this and just installed Adobe Air Beta2 (for Mac). When I try to run your project (http://demo.aswing.org/AsPngEncoderTest.air ) it gives this error:
“This application requires a version of Adobe AIR which is no longer supported. Please contact the application author for an updated version.”
Can you help? Thank you.
I just uploaded a version for air beta2 now, here: http://code.google.com/p/aspngencoder/downloads/list
Help me please :) how can I load png icon for JButton? I need this png picture above button text. Thanks.
Hi Roland, you can do it like this:
yourJButton.setIcon(new LoadIcon(”path_to_png”, width, height));
yourJButton.setVerticalTextPosition(AsWingConstants.TOP);
你好iiley,我在使用JProgressBar时设置value,即调用JProgressBar.setValue(20),但是没有进度显示。我用的默认的min和max。
在网上查找相关资料也没发现有介绍的,特来请教你,谢谢!
用法没错,你能把代码贴多些出来看看吗?这样结合上下文找找原因。你订阅我们的邮件列表在邮件列表里帖吧,这样都可以帮助到你。
Hi,
I have a small question please.
Is it allowed to use AsWing A3 for commercial use?
Thanks,
Haitham
Hi Haitham,
Yes, of course, it allowed. :)
All I’m saying is that it is fantastic!
BU DE LIAO!!!!
有个问题,flex的框架里有个的preload 可以加载rsl的swc,并有一些相关的事件可以用,看了看flex的源码 不是太懂 ,aswing里有这类机制吗?
还有就是问一下能不能把aswing的rsl 持久保存在缓存中?该怎么作?
看了一些aswing的showcase,我估计可以,illey能讲一下怎么实现吗?
谢谢
研究了下 把swc里的swf加载进来 就ok了,但是怎么像flex3里面那玩样 跨域加载累,这貌似需要大家都已什么规范 才可以。。。不管了 问题算是解决了 跨域的事 反正暂时不用
阿静你的网站很棒!我是omega,看来有空要多来逛逛。
欢迎欢迎omege :)
你好,iiley, 我现在在用JTree,我想改变一下每一个页节点的图标,在这里也看到了解决方法,就是继承DefaultTreeCell,然后修改setTreeCellStatus方法,问题是,我应该怎样加载自己的图标那,
expanded_folder_icon = tree.getUI().getIcon(”Tree.folderExpandedIcon”);
这句代码我不是很明白,我应该怎样替换那,先谢谢了!
expanded_folder_icon = new YourIcon();就可以了
谢谢你了,还有两个问题要请教,
1, 我的ICON类是不是要继承 ICON接口. 对图片的格式有没有要求.
2, aswing的组件和flash自带的组件是不是有冲突,我在用JTree时,为了测试,把JTree和Flash自带的组件放在一起使用,JTree的展开就有问题.
我在这里回答了你的问题:
http://bbs.aswing.org/viewtopic.php?f=8&t=119
谢谢你了,还是有两个问题要问你
1, 我的Icon类是不是要继承ICON接口, 对图片的格式有没有要求.
2,aswing的组件是不是和Flash自带的组件有冲突,我在用JTree时,写了个测试,用到了JTree和Flash自带的Button组件,这时JTree的展开就有问题,但用aswing的JButton时JTree就没有问题,不知道是什么原因?
再次谢谢了
Ding我们到论坛讨论吧。
Hi iiley,
I’m amazed of the potential that aswing can provide to GUI production. Good job;-)
Perhaps you can help me how to get started:
I’m working on MAC OSX and Flash AS2. Also, I have downloaded your A2 zip-files.
How do I “install” aswing?
Is it a “program”?
What do I do about component?
How do I compile in Flash AS2?
Please give me a hint…
Regards
Ruggero
Hi, ruggero, AsWing A2 is just about a coup of as2 class files, so you can just simplely add them to your class-path.
非常感谢iiley做出这么好的东西,大大减少了我计划中的工作
I’m a novice to Flex, but I’m interested in Swing. The design for Swing is extensilbe and flexible. I like it very much, and like Flex too. I’m surprised when I found that you try to make a framework for Flex according to Swing.
But the design for swing is complex, and is not easy to get. I hope this framework won’t involve them.
When you get in, you’ll found AsWing is not as complex as Swing, it’s much more simpler. :)
I find that the most of components included in the showcase seem not be as wonderfull as what I want. The UI of components is plain.
In addition, I want to know whether there is a stable aswing version based on flex3 components.
Flex3 components is another UI framework, there’s is no aswing version based on flex3 components. AsWing is a indie UI framework.
Ok, thanks for your answer. I only know your framework a little. But I really want to involve aswing in my project(J2EE). Firstly, I need to know the main features about aswing. So can you recommend some preference about aswing for me? I will appreciate your help if you can.
Hi kenny, if you are familiar with Swing, you can read the api doc of aswing : http://doc.aswing.org/a3/
You’ll feel easy to get on, and for features, AsWing provide the most common components such as Buttons, Menus, Scrollers, List, Tree, Table and ColorChooser, you can see some showcase here : http://www.aswing.org/?page_id=7
Thank you very much! I will try to do according to what you said. And then I find that AsWing doesn’t contain some important features in Swing, such as PropertyListener and other complex and practical layout in some open source project for Swing (eg: TableLayout , FormLayout). On the other hand, I appreciate what you have done, such as the principle of of most component names based on Swing components.
Sometimes I need to know some details of AsWing and solve problems about AsWing, so can you tell me a good community where I can communicate with you conveniently? And then I will pay more attention to AsWing.
Kenny, we have a forum http://bbs.aswing.org
nice…
我代码老是报错误
1047: Parameter initializer unknown or is not a compile-time constant.
public function ColorDotIcon(size:int=20, color:ASColor=ASColor.RED){
由于编译器后期不再支持参数用缺省常量值,你只需要把
ColorDotIcon(size:int=20, color:ASColor=ASColor.RED)
改为
ColorDotIcon(size:int=20, color:ASColor=null)
然后再构造函数里判断一下是否是null即可。
[...] Thank you iiley Chen for help and support Thank you all for feedback. Any help, feedback, bug report or feature request [...]
is this project still active? there are lots more to be done — needs JDialog, etc.
Any working Look and Feel? OrangeLAF, BlueLAF, TenerLAF and ChromeLAF doesn’t work with revision 1103.
太好了!
现在FLEX已经开始各传统领域渗透,一些企业已经开始使用FLEX做企业级应用。
ASWING在这方面的贡献不可估量!
有一点小小建议:ASWING能否提供MDI功能?