Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to use SWING component in RCP(Embedding swing compoennts inside RCP)
How to use SWING component in RCP [message #544213] Fri, 02 July 2010 03:22 Go to next message
Alessandro Caproni is currently offline Alessandro Caproni
Messages: 21
Registered: July 2009
Junior Member
I am wandering which is the best way to integrate swing components inside an RCP.
What I need to do for instance, is to show in a view a dynamic graph created from a stream of values using a swing library like JChart2D.
For that I need to instantiate a swing container in my view at least.
Which is the best solution to this problem?

As an alternative, I wander if there is a library like JChart2D for SWT.

Thank you.


Alessandro Caproni
European Southern Observatory (http://www.eso.org)
Re: How to use SWING component in RCP [message #544231 is a reply to message #544213] Fri, 02 July 2010 05:51 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
On 02.07.2010 05:22, Alessandro Caproni wrote:
> I am wandering which is the best way to integrate swing components
> inside an RCP.
> What I need to do for instance, is to show in a view a dynamic graph
> created from a stream of values using a swing library like JChart2D. For
> that I need to instantiate a swing container in my view at least.
> Which is the best solution to this problem?

You might want to start with the SWT_AWT bridge, see also the article

http://www.eclipse.org/articles/article.php?file=Article-Swi ng-SWT-Integration/index.html

In more advanced use-cases it is generally recommended to use
the Albireo bridge:

http://www.eclipse.org/albireo/

You may also have a look at

http://swik.net/swt/AWT,+Swing+and+Java2D+Integration

> As an alternative, I wander if there is a library like JChart2D for SWT.
> Thank you.

We have quite good experience with JFreeChart

http://www.jfree.org/jfreechart/

but I don't know whether this covers your requirements. It might also
be worth to use the charts support provided by the Birt project, see e.g.

http://www.eclipse.org/articles/article.php?file=Article-BIR TChartEngine/index.html

HTH & Greetings from Bremen,

Daniel Krügler
Re: How to use SWING component in RCP [message #544398 is a reply to message #544213] Fri, 02 July 2010 14:46 Go to previous messageGo to next message
Alessandro Caproni is currently offline Alessandro Caproni
Messages: 21
Registered: July 2009
Junior Member
Thank for your help Daniel.
I will investigate the usage of the SWT_AWT bridge and albireo.

I knew about JFreeChart that is probably the most widely used chart library in java. After a short investigation we preferred JChart2D because it is lighter when managing a large stream of values in real time.

I have just found SWTChart that could be used avoiding the need of embedding AWT/SWING into SWT. It could be worst to givi it a shot.


Alessandro Caproni
European Southern Observatory (http://www.eso.org)
Re: How to use SWING component in RCP [message #645866 is a reply to message #544398] Mon, 20 December 2010 20:56 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 4
Registered: December 2010
Junior Member
I see that your topic is very similar to my problem and thought maybe you could help out.
I have a swing form I created in netbeans and would like to port it to an eclipse plugin. Is there any way to create a container to hold it as is?
Thanks
Re: How to use SWING component in RCP [message #648802 is a reply to message #645866] Fri, 14 January 2011 14:43 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
On 2010-12-20 21:56, avner_barr@yahoo.com wrote:
> I see that your topic is very similar to my problem and thought maybe
> you could help out.
> I have a swing form I created in netbeans and would like to port it to
> an eclipse plugin. Is there any way to create a container to hold it as is?
> Thanks

I recommend to google for the Albireo project which provides an
excellent SWT control wrapper for Swing classes.

HTH & Greetings from Bremen,

Daniel Krügler
Re: How to use SWING component in RCP [message #651621 is a reply to message #648802] Mon, 31 January 2011 22:41 Go to previous messageGo to next message
Tom Morris is currently offline Tom Morris
Messages: 89
Registered: July 2009
Member
Now that Eclipse has abandoned the Albireo project are there any updated recommendations? What should projects which foolishly depended on this code migrate to?

Tom
Re: How to use SWING component in RCP [message #651735 is a reply to message #651621] Tue, 01 February 2011 13:02 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 01/31/2011 05:41 PM, Tom Morris wrote:
> Now that Eclipse has abandoned the Albireo project are there any updated
> recommendations? What should projects which foolishly depended on this
> code migrate to?

If you don't need new functionality, then you're probably fine. But you
have full access to the code from that project if you only need to tweak
it. If you need more than that, you would probably go back to the
SWT_AWT bridge.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: How to use SWING component in RCP [message #727363 is a reply to message #544398] Wed, 21 September 2011 05:18 Go to previous message
raghavendra  is currently offline raghavendra
Messages: 2
Registered: September 2011
Junior Member
Hello Caproni

we are also planning to use jchart2d for run time charting.
Were you able to use it successfully? if so which one you used SWT_AWT bridge or albireo?

Please do share your experience on jchart2d and on bridges, sure it will save a lot of time for me

regards
Raghu

[Updated on: Wed, 21 September 2011 05:22]

Report message to a moderator

Previous Topic:Change the loading Workbench Message
Next Topic:Progress Monitor in headless RCP
Goto Forum:
  


Current Time: Wed Sep 17 01:42:04 GMT 2014

Powered by FUDForum. Page generated in 0.02798 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software