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

查看:294
本文介绍了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框架并使用AWT功能为JFreeChart。这样做的方法是创建一个复合

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网络浏览的问题。

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天全站免登陆