SWT中漂亮图表的图书馆? [英] Libraries for pretty charts in SWT?

查看:149
本文介绍了SWT中漂亮图表的图书馆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道以下用于在SWT / Eclipse RCP应用程序中绘制图表的库:

I know the following libraries for drawing charts in an SWT/Eclipse RCP application:

  • Eclipse BIRT Chart Engine (Links to an article on how to use it)
  • JFreeChart

哪些其他图书馆可以用SWT绘制漂亮的图表?一般Java或图表毕竟,您可以随时显示图像...

Which other libraries are there for drawing pretty charts with SWT? Or charts in Java generally? After all, you can always display an image...

推荐答案

我没有使用BIRT或JGraph,但是我使用JFreeChart我的SWT应用程序。我已经找到在SWT中使用JFreeChart的最佳方法是通过复合AWT框架并使用JFreeChart的AWT功能。执行此操作的方法是创建一个复合

I have not used BIRT or JGraph, however I use JFreeChart in my SWT application. I have found the best way to use JFreeChart in SWT is by making a composite an AWT frame and using the AWT functionality for JFreeChart. The way to do this is by creating a composite

Composite comp = new Composite(parent, SWT.NONE | SWT.EMBEDDED);
Frame frame = SWT_AWT.new_Frame(comp);
JFreeChart chart = createChart();
ChartPanel chartPanel = new ChartPanel(chart);
frame.add(chartPanel);

有关跨不同平台实施的几个问题,以及SWT代码在穷人(在防守上,吉尔伯特先生不了解SWT,而且是针对AWT的)。我的两个最大的问题是AWT事件通过SWT爆发,有一些错误的事件被触发,由于包装AWT框架JFreeChart变得相当慢。

There are several problems in regards to implementations across different platforms as well as the SWT code in it is very poor (in its defense Mr. Gilbert does not know SWT well and it is made for AWT). My two biggest problems are as AWT events bubble up through SWT there are some erroneous events fired and due to wrapping the AWT frame JFreeChart becomes substantially slower.

@zvikico

将图表放入网页的想法可能不是一个好办法。首先是Eclipse处理在不同平台上集成Web浏览器的一些问题是不一致的。另外,从我对网络的几个图形包的理解,他们是服务器端需要该设置,还有许多公司,包括我的使用代理服务器,有时这会产生Eclipse Web浏览的问题。

The idea of putting the chart into a web page is probably not a great way to go. There are a few problems first being how Eclipse handles integrating the web browser on different platforms is inconsistent. Also from my understanding of a few graphing packages for the web they are server side requiring that setup, also many companies including mine use proxy servers and sometimes this creates issues with the Eclipse web browsing.

这篇关于SWT中漂亮图表的图书馆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆