A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
kenzo
- Posts: 4
- Joined: Thu Feb 07, 2008 11:44 am
- Location: Toulouse
Post
by kenzo » Thu Feb 07, 2008 11:57 am
Hello,
I use JFreeChart with Swt. I would like to know where JFreeChart is now.
- Is it still at the experimental level?
- Will we have a version based only on Swt? Eg : a version that doesn't use the method
Code: Select all
SWT_AWT.new_Frame(Composite parent)
to place a chart in a swt window.
-
heprom
- Posts: 91
- Joined: Sat May 27, 2006 4:25 am
- Location: Paris
Post
by heprom » Sun Feb 10, 2008 9:03 am
Hi Kenzo,
It's not decided yet but I think the experimental SWT branch will be in the moved in the main tree in jfreechart 1.2.0.
Regarding your second question, it's not very clear to me what you're asking. The experimental code already do that (you do not need the method SWT_AWT.new_Frame).
It's quite stable now, but there are a few things I still need to work on. Unfortunately I haven't find the time yet principally because I've taken a new job a enlarged the family from 2 yo 3
Regards
-
kenzo
- Posts: 4
- Joined: Thu Feb 07, 2008 11:44 am
- Location: Toulouse
Post
by kenzo » Mon Feb 11, 2008 10:22 am
In fact, I use this code for add JFreeChart in a swt window:
Code: Select all
final Display display = new Display();
Shell shell = new Shell( display );
Composite composite = new Composite(shell);
Frame chartFrame = SWT_AWT.new_Frame(composite);
//The Chart that I implemented
JFreeChart chart = new JFreeChart(...);
ChartPanel chartPanel = new ChartPanel(chart);
chartFrame.add(chartPanel);
It's the solution I found on this forum and others websites...
Can you give me an example which use the experimental code plz?
-
dlucas
- Posts: 19
- Joined: Sat Dec 29, 2007 5:07 am
- Location: Boston (USA)
Post
by dlucas » Wed Feb 13, 2008 12:48 am
Don't use SWT_AWT unless you really want that method. You will find 4 demo programs for straight SWT usage in the 1.08 or above source.
Mine are located at this partial path after installing the source:
jfreechart-1.0.8a\swt\org\jfree\experimental\chart\swt\demo\*.java
What you are looking for can be found in SWTTimeSeriesDemo.java or one of the other 3 files. You have to use the ChartComposite method which takes a composite reference as an argument.
You will then be able to display any chart in any SWT composite including a shell.
Don
Best regards,
Don