new ext container GridList on svn
iiley May 29th, 2008
Days ago Srdjan discussed with me about a wrap list container perfromance like window file explorer, fortunately i’v already write one for this6, but it is a poor component, with less functionities support. Soon later, another cool guy Johan mailed me to requested same component, i thought i should put this component into AsWing core now.
So, with improvement, the GridList now support multiple selection, with trackWidth/trackHeight functionity. See demo below(Try to select track width/track height check box and scale the frame to see how it performances):
It’s usage is similar to JList, you can define your own cell renderer for it, it use ListModel to provide data. But well still some functionities are missing, such as key board cell navigation/selection, share cell strategy etc. But however, it is usable for a windows file explorer style container now.
You can download its source/swc from svn now.
- Tutorials
- Comments(13)
This is great extension. It help me to make really great software.
I have one suggestion. Functions setSelectedIndices and getSelectedValues will be great improvement because component have multi selection mode.
yeah, however you can call gridList.getSelectionModel().someMethod to do that, but add those methods is a good idea, i’ll add them. Thanks for suggestion. :)
[...] MultipleAssetIcon and GridList. The GridList component maybe useful for some guys, see it’s example. MultipleAssetIcon is contributed by Srdjan, also GridList is his introduction. Thanks him very [...]
Dear iiley,
May i Speak to you with Chinese?
You said ,year.
OK!.
在GridList中的item是横着一排排下来的填充数据的,是否可以竖着来填充呢?
123
456
789
-》》》》》
147
258
369
就是这个样子呢?当然我知道可以通过修改vlm从一定程度上实现,但是我觉得不妥,当容器大小改变的时候,我这种方法肯定能够不好了。
希望你能指教。
谢谢。你重视的fans. kenjor
在实现的时候我估计会有人要求这个,本来计划实现一个参数来设置这个,可是为了简化接口,就没有直接提供。不过我预留了实现方式,你可以调用setHolderLayout(layout:GridListLayout)设置你自己的GridListLayout,你只需要继承GridListLayout,把里面的相关顺序改一下,即可(也就是layoutContainer里面的部分代码)。
谢谢你,还是你重视的fans 。kenjor。希望明天能实现
在GridList.as中
public function GridList(model:ListModel, cellFactory:GridListCellFactory=null, columns:int=0, rows:int=2){
super(createHolder(columns, rows));
//构造函数中,用到了createHoder()
而在
protected function createHolder(columns:int, rows:int):Container{
tileHolder = new GridCellHolder(this);
gridLayout = new GridListVLayout(rows, columns, 2, 2);
gridLayout.setTileWidth(getTileWidth());
gridLayout.setTileHeight(getTileHeight());
tileHolder.setLayout(gridLayout);
return tileHolder;
}
中,还是用的gridLayout = new GridListVLayout(rows, columns, 2, 2);
,这个地方会不会存在问题呢?
[...] AsWing AS3 version 1.4 was released on June 13th. The upgrade made the program more stable. The big additions to this version are a MultipleAssetIcon and a new GridList. The GridList component maybe useful for some programmers, you can see an example here. [...]
HEllo, i’m on the road again :) Is gridList indicated to obtain a kind of datagrid ? with titles and each cell differently renderable ? how r u iiley ? :)
well,maybe better a Jtable :)
how to get a cellrenderer for table or text multiline ?
Hi, hierro, i’m fine, glad to see you back to the road. :)
Yes, GridList indicated to obtain a kind of datagrid, differently renderable is possible.
Multiline text? You can use MultilineLabel to render. :)
thank u for the usefil tips.I ‘m using Subversion in my software Project
amazing tool
I will try ur tips to grid my data
keep up ur good work