- 浏览: 95995 次
- 性别:
- 来自: 南京
最新评论
-
0dragon:
同求解啊
flex socket 与java通信碰到的问题 -
sunli0201:
好东西 赞一个
Flex仿苹果导航 -
kangkang203:
能替换不同地图更好
开源项目:中国地图Flash组件 -
yjq8116:
springgrph 有官方网址吗?
Flex Springgraph使用 -
chenfeiyueyue:
我也想要不同的省份设置不同的颜色,如果有县市级就更好了
开源项目:中国地图Flash组件
http://www.flexdeveloper.eu/forums/mxml/how-to-have-custom-edgerenderer-for-springgraph-roamer/
Welcome, Guest. Please login or register.
Did you miss your activation email?
07 Jun 2010, 13:21:22 UTC
Follow us on Twitter
flexdeveloper.eu Forum
Flex and ActionScript 3.0
Flex 3 Framework (Moderators: JMWhittaker, Jan K, thewarpedcoder, James)
How to have custom EdgeRenderer for springgraph.Roamer « previous next »
Pages: [1]
Author Topic: How to have custom EdgeRenderer for springgraph.Roamer (Read 1451 times)
bjg
Newbie FD
Posts: 25
How to have custom EdgeRenderer for springgraph.Roamer
« on: 08 Aug 2008, 05:06:59 UTC »
Hello All,
I am currently using com.adobe.flex.extras.controls.springgraph.Roamer class to display a spring graph. I am using an ItemRenderer (thats actually an mxml file) to render each Item (node) in the Roamer.
Now, I want to have names beside each of the edges and also arrows showing direction of the edges.
I tried with implementing the IEdgeRenderer interface to create an ActionScript class "MyEdgeRenderer", wrote the draw() method in it. Then I asigned the edgeRenderer property of Roamer with this class name.
Code:
<fc:Roamer id="roamer" backgroundColor="#ffffff"
lineColor="#333388" width="100%" x="0" height="100%" y="0"
itemRenderer="com.mypackage.renderers.MyItemView"
edgeRenderer="com.mypackage.renderers.MyEdgeRenderer"
autoFit="true"/>
But it gives a compile time error
Code:
Initializer for 'edgeRenderer': values of type com.adobe.flex.extras.controls.springgraph.IEdgeRenderer cannot be represented in text.
I tried to assign the MyEdgeRenderer to edgeRenderer property dynamically.
Code:
roamer.edgeRenderer = (IEdgeRenderer)(MyEdgeRenderer);
Then it throws a error during execution of the above code
Code:
TypeError: Error #1034: Type Coercion failed: cannot convert com.mypackage.renderers.::MyEdgeRenderer$ to com.adobe.flex.extras.controls.springgraph.IEdgeRenderer.
I am in urgent need of some help. Would greatly appreciate any input(s).
Thanks
bjg
Logged
thanks
BJG
"The most beautiful thing we can experience is the mysterious. It is the source of all true art and all science. He to whom this emotion is a stranger, who can no longer pause to wonder and stand rapt in awe, is as good as dead: his eyes are closed." - Albert Einstein
flexy
flexdeveloper.eu
Guru/Addict FD
Posts: 3,099
Recovering Coffee Addict & Adobe Expert
Re: How to have custom EdgeRenderer for springgraph.Roamer
« Reply #1 on: 09 Aug 2008, 09:58:46 UTC »
Does your EdgeRenderer implement IEdgeRenderer? It needs to be typed to this interface, or it's not going to work.
Logged
I'm a diver and a Flash Platform consultant!
You can follow me on Twitter if you like! - I find questions about Trees boring.
bjg
Newbie FD
Posts: 25
Re: How to have custom EdgeRenderer for springgraph.Roamer
« Reply #2 on: 11 Aug 2008, 06:29:26 UTC »
Hi,
I was getting wrong in assigning the the MyEdgeRenderer to edgeRenderer property dynamically.
I do it now like this... and it worked..
Code:
roamer.edgeRenderer = (IEdgeRenderer)(new myEdgeRenderer());
But, I am still unable to have Labels to edges (though I could draw the edges myself).
I am also able to draw the arrows, but they donot point to correct "to" as the fromView and toView parameters of the implemented draw() method of the IEdgeRenderer interface donot refer to the correct "from" and "to". This is perhaps because the Graph object (that acts as dataProvider for the Roamer) does not treat its edges as directional!
Any solution to these problems? I'm getting restless...
Regards
bjg
Logged
thanks
BJG
"The most beautiful thing we can experience is the mysterious. It is the source of all true art and all science. He to whom this emotion is a stranger, who can no longer pause to wonder and stand rapt in awe, is as good as dead: his eyes are closed." - Albert Einstein
Pages: [1]
« previous next »
Share this on: Twitter del.icio.us Digg
Jump to:
©2006-2010 Flexdeveloper.eu/Jodie O'Rourke. All rights reserved.
Adobe®, Adobe® Flash™, Adobe® AIR™ and Adobe® Flex™ are registered trademarks of Adobe Systems Incorporated in the United States and other countries. All rights reserved.
Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Welcome, Guest. Please login or register.
Did you miss your activation email?
07 Jun 2010, 13:21:22 UTC
Follow us on Twitter
flexdeveloper.eu Forum
Flex and ActionScript 3.0
Flex 3 Framework (Moderators: JMWhittaker, Jan K, thewarpedcoder, James)
How to have custom EdgeRenderer for springgraph.Roamer « previous next »
Pages: [1]
Author Topic: How to have custom EdgeRenderer for springgraph.Roamer (Read 1451 times)
bjg
Newbie FD
Posts: 25
How to have custom EdgeRenderer for springgraph.Roamer
« on: 08 Aug 2008, 05:06:59 UTC »
Hello All,
I am currently using com.adobe.flex.extras.controls.springgraph.Roamer class to display a spring graph. I am using an ItemRenderer (thats actually an mxml file) to render each Item (node) in the Roamer.
Now, I want to have names beside each of the edges and also arrows showing direction of the edges.
I tried with implementing the IEdgeRenderer interface to create an ActionScript class "MyEdgeRenderer", wrote the draw() method in it. Then I asigned the edgeRenderer property of Roamer with this class name.
Code:
<fc:Roamer id="roamer" backgroundColor="#ffffff"
lineColor="#333388" width="100%" x="0" height="100%" y="0"
itemRenderer="com.mypackage.renderers.MyItemView"
edgeRenderer="com.mypackage.renderers.MyEdgeRenderer"
autoFit="true"/>
But it gives a compile time error
Code:
Initializer for 'edgeRenderer': values of type com.adobe.flex.extras.controls.springgraph.IEdgeRenderer cannot be represented in text.
I tried to assign the MyEdgeRenderer to edgeRenderer property dynamically.
Code:
roamer.edgeRenderer = (IEdgeRenderer)(MyEdgeRenderer);
Then it throws a error during execution of the above code
Code:
TypeError: Error #1034: Type Coercion failed: cannot convert com.mypackage.renderers.::MyEdgeRenderer$ to com.adobe.flex.extras.controls.springgraph.IEdgeRenderer.
I am in urgent need of some help. Would greatly appreciate any input(s).
Thanks
bjg
Logged
thanks
BJG
"The most beautiful thing we can experience is the mysterious. It is the source of all true art and all science. He to whom this emotion is a stranger, who can no longer pause to wonder and stand rapt in awe, is as good as dead: his eyes are closed." - Albert Einstein
flexy
flexdeveloper.eu
Guru/Addict FD
Posts: 3,099
Recovering Coffee Addict & Adobe Expert
Re: How to have custom EdgeRenderer for springgraph.Roamer
« Reply #1 on: 09 Aug 2008, 09:58:46 UTC »
Does your EdgeRenderer implement IEdgeRenderer? It needs to be typed to this interface, or it's not going to work.
Logged
I'm a diver and a Flash Platform consultant!
You can follow me on Twitter if you like! - I find questions about Trees boring.
bjg
Newbie FD
Posts: 25
Re: How to have custom EdgeRenderer for springgraph.Roamer
« Reply #2 on: 11 Aug 2008, 06:29:26 UTC »
Hi,
I was getting wrong in assigning the the MyEdgeRenderer to edgeRenderer property dynamically.
I do it now like this... and it worked..
Code:
roamer.edgeRenderer = (IEdgeRenderer)(new myEdgeRenderer());
But, I am still unable to have Labels to edges (though I could draw the edges myself).
I am also able to draw the arrows, but they donot point to correct "to" as the fromView and toView parameters of the implemented draw() method of the IEdgeRenderer interface donot refer to the correct "from" and "to". This is perhaps because the Graph object (that acts as dataProvider for the Roamer) does not treat its edges as directional!
Any solution to these problems? I'm getting restless...
Regards
bjg
Logged
thanks
BJG
"The most beautiful thing we can experience is the mysterious. It is the source of all true art and all science. He to whom this emotion is a stranger, who can no longer pause to wonder and stand rapt in awe, is as good as dead: his eyes are closed." - Albert Einstein
Pages: [1]
« previous next »
Share this on: Twitter del.icio.us Digg
Jump to:
©2006-2010 Flexdeveloper.eu/Jodie O'Rourke. All rights reserved.
Adobe®, Adobe® Flash™, Adobe® AIR™ and Adobe® Flex™ are registered trademarks of Adobe Systems Incorporated in the United States and other countries. All rights reserved.
Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
发表评论
-
Flex报表制作
2012-03-07 10:21 1027报表展示工具:jasperReport 3.0 falsh V ... -
As3对象传值与传引用
2011-03-01 14:32 4029转自: http://blog.csdn.net/lap ... -
一起来学alchemy
2011-01-26 10:36 984一起来学alchemy。 http://insider ... -
Flex Component Kit for Flash CS3 安装方法及前提
2011-01-25 09:30 1126原文:http://labs.adobe.com/wiki ... -
Flex在匿名方法移除自身的侦听方法
2010-12-20 21:32 1226public static function removePo ... -
跳出嵌套循环
2010-12-20 11:17 1077A: for (i=0; i <32; i+ ... -
flex模块销毁机制
2010-12-17 17:14 1681有问题就要解决,系统中共有六个模块,1,2,3,4,5,6。一 ... -
AS3 库资源 很多非常有用的类库
2010-12-16 15:01 905引用自:http://www.jdhcn. ... -
Flex 开源数据可视化框架 Axiis
2010-12-09 09:29 1430Axiis 是一个数据可视化框架,于五月份使用MIT许可证 ... -
flex socket 与java通信碰到的问题
2010-11-25 13:58 1791其实就是粘包问题了。 老实讲,到现在还是没 ... -
Socket粘包问题
2010-11-22 10:18 2308这两天看csdn有一些关 ... -
as3遍历对象所有属性的方法
2010-11-10 15:41 3355as3遍历对象所有属性的方法(包含Flex) 1: Obj ... -
Module中使用cairngorm的问题
2010-11-01 13:46 1151Module中使用cairngorm的问题: 多次加载mod ... -
flex profile
2010-10-28 14:38 1803今天使用profile来检测了下系统的性能,发现好多低级 ... -
关于mx_internal
2010-10-27 09:16 807mx_internal: 字面翻译:内部的。 这种声明的属 ... -
loadModuleReady使用中发现的问题
2010-10-26 14:06 819private function loadModuleR ... -
可删除列的datagrid
2010-10-22 15:52 891单击列头即可删除 -
『FLEX』Java的pojo对象转成Flex的vo对象
2010-09-29 15:25 1388在使用openamf的类映射功能时,一般需要在as端也 ... -
Flex titleWindow resize
2010-09-29 08:44 1378Flex titleWindow resize -
EC2M
2010-09-28 17:05 865自己看吧,开源项目
相关推荐
自己研究的可以运行的springgraph例子,可以在edge上添加自己的组件和文字
一个n的flex组件(SpringGraph Flex Component) SpringGraph Flex Component 有几个demo,不多做解释,用了就知道强大了,关于如何使用,以后在慢慢写了。 <A href="http://mark-shepherd.com/thesaurus">...
总结来说,SpringGraph实例展示了如何使用该工具来构建和展示数据关系图,通过自定义节点和边、调整布局以及添加交互功能,我们可以创建出既美观又实用的图形化模型。这个过程涉及到了项目结构理解、源代码编写、...
例子可能展示了如何创建和自定义这些组件,以及如何将它们可视化在Flex界面上。 4. **数据绑定**:Flex与SpringGraph之间的数据同步是通过数据绑定完成的。这包括将服务器端的图模型数据映射到客户端的视图组件上,...
你可以自定义节点的外观,添加图标、文本标签等。 - **边(Edges)**: 边用于表示节点间的连接关系,可以设置线型、粗细、颜色等属性,甚至可以添加箭头表示方向。 - **布局(Layout)**: SpringGraph 提供了几种...
**SpringGraph拓扑组件API详解** SpringGraph是一个用于构建和操作复杂拓扑结构的Java库,它在Spring框架的基础上提供了一套强大的API,使得开发者能够方便地处理节点、边和图的各种操作。在这个主题中,我们将深入...
5. **自定义性**:用户能否自定义节点样式、边的形状和颜色,以及整体布局风格。 总的来说,这个简易节点连接器是一个将SpringGraph的复杂功能进行简化和定制后的产品,结合了Flex的强大UI设计能力,旨在提供一种...
对SpringGraph组件中的IEdgeRenderer接口进行重写,可以在edge上添加汉字说明做为标签
springGrap用于拓扑与流程图的绘制。
3. **自定义节点和边**:为了满足不同的需求,开发人员可能需要自定义节点的外观和行为,以及边的样式。Flex Spring Graph 可能提供丰富的API和接口,允许开发者根据项目需求定制节点和边的样式及行为。 4. **性能...
SrpingGranph 动态生成 拓扑图 非常酷的flex拓扑关系组件springgraph。-Topological relationships are very cool flex component springgraph.
在Flex项目中,通过集成SpringGraph库,开发者可以创建自定义的图形界面,实现更灵活的数据可视化。 1. 引入SpringGraph:在Flex项目中,首先需要将SpringGraph库引入,可以通过MXML或ActionScript代码添加库引用。...
- **自定义组件**:开发者可以使用自定义组件来扩展`itemRenderer`的功能。需要注意的是,对于`edgeRenderer`,所使用的组件必须继承自`IEdgeRenderer`接口。 #### 三、Birdeye(RaVis)的特点及应用场景 - **简介...
2. 自定义节点:通过继承TreeNode或TreeItemRenderer类,你可以自定义节点的外观和行为,比如添加图标、改变文字颜色等。 3. 事件处理:Tree组件会触发多种事件,如itemClick、itemOpen和itemClose,你可以监听这些...
同时,理解Flex的事件处理、数据绑定、行为和自定义组件机制,能形成对Flex的全面认知,具备实际项目开发能力。 进入提高阶段,可能会遇到Flex自带组件无法满足需求的情况。这时,可以查找开源组件或自行扩展。例如...
#### 四、SpringGraph Flex Component - **网址**:http://mark-shepherd.com/blog/springgraph-flex-component/ - **简介**:由Mark Shepherd开发的一款图形组件,主要用于展示节点之间的关系图。 - **特点**: -...
3. **SpringGraph Flex Component**: 这是一个用于绘制拓扑关系图的组件,适用于需要显示复杂网络结构的应用。 4. **Flex Visual Graph Library**: 另一个用于显示拓扑图形的类库,以其动态效果而受到赞誉,提供了...
3. **SpringGraph Flex Component**: 这是一个用于绘制拓扑关系图的组件,非常适合展示复杂的网络或数据结构。 4. **Flex Visual Graph Library**: 类似于SpringGraph,它也专注于拓扑图形展示,动态效果出色。 5....
24. **SpringGraph Flex Component**: 用于绘制弹簧网络图的Flex组件,适用于数据可视化。 25. **GoASAP**: AS3动画库,提供高效的动画控制和时间线管理。 26. **asaplibrary**: 另一个开源的AS3库,提供了更多...