Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java GUI 设计  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Re:如何在RCP的View or Editor 中使用JGraph? [Re:dahen]
dahen





发贴: 25
积分: 0
于 2005-06-02 16:33 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
非常感谢这位朋友的回复。

你说的没错。的确,在一个基于stand-alone SWT-Application的应用里面,用SWT_AWT 引入 JGraph是成功的。

但是,我现在是想将JGraph引入到基于RCP的应用中去。我上是这样做的,在ATestEditor extends EditorPart 的方法 createPartControl中,我的代码如下:

public void createPartControl(Composite parent)
{

Composite container = new Composite(parent, SWT.EMBEDDED);
container.setLayout(new FillLayout(SWT.VERTICAL));

final Frame frame = SWT_AWT.new_Frame(container);
frame.add(getScrollPane());
    
graph = new JGraph();//new DefaultGraphModel()
    scrollPane.add(graph);

// Control-drag should clone selection
graph.setCloneable(true);

// Enable edit without final RETURN keystroke
graph.setInvokesStopCellEditing(true);

// When over a cell, jump to its default port (we only have one, anyway)
graph.setJumpToDefaultPort(true);
}

但是,启动程序后,系统在打开一个editor实例时,提示如下错误信息:

Unhandled event loop exception
Reason:
org/jgraph/JGraph

这是为什么呢?

烦请楼上的朋友指教!
不胜感激。




话题树型展开
人气 标题 作者 字数 发贴时间
7188 如何在RCP的View or Editor 中使用JGraph? dahen 7 2005-06-01 17:12
6108 Re:如何在RCP的View or Editor 中使用JGraph? kite 15 2005-06-02 14:06
6272 Re:如何在RCP的View or Editor 中使用JGraph? dahen 1040 2005-06-02 16:33
6153 Re:如何在RCP的View or Editor 中使用JGraph? kite 86 2005-06-03 12:03
6283 Re:如何在RCP的View or Editor 中使用JGraph? dahen 2875 2005-06-03 13:25
6963 Re:如何在RCP的View or Editor 中使用JGraph? kite 296 2005-06-03 14:47
6216 Re:如何在RCP的View or Editor 中使用JGraph? dahen 205 2005-06-03 16:58
6198 Re:如何在RCP的View or Editor 中使用JGraph? cnfree 195 2005-06-03 22:28
6343 Re:如何在RCP的View or Editor 中使用JGraph? dahen 334 2005-06-06 08:40
6116 Re:如何在RCP的View or Editor 中使用JGraph? yipsilon 58 2005-06-04 13:56

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923