Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Eclipse 4 / SWT-JFace / JavaFX(How to develop an E4 application, combining SWT/JFace and JavaFX)
Eclipse 4 / SWT-JFace / JavaFX [message #1219343] Tue, 03 December 2013 13:16 Go to next message
Joseph Gagnon is currently offline Joseph GagnonFriend
Messages: 58
Registered: June 2013
Member
I've recently been investigating and experimenting with developing an Eclipse 4 application using JavaFX as the rendering engine. So far it has gone fairly well - I just started looking at E4 about a month ago. Now, I'm at a point where I'd like to mix JavaFX with SWT/JFace. The reason for this is that JavaFX does not currently have any notion of a dialog and I think I will need to use a JFace dialog to provide the dialog functionality and (hopefully) still use JavaFX to provide the dialog UI "content".

The trouble is: I can't figure out how to meld the two technologies together. I'm using eclipse Kepler along with e(fx)clipse. I followed a tutorial by Lars Vogel on developing an E4 RCP application and other tutorials on the e(fx)clipse site to incorporate JavaFX into E4. The target platform that I set up does not have any SWT or JFace libraries and I can't figure out how to get them and put them in. Should I go about it a different way?

I'm open to any suggestions as to how to solve these issues. I'd prefer to continue using E4 as the platform and JavaFX as the renderer. Any alternative approaches would be welcomed at this point.

Re: Eclipse 4 / SWT-JFace / JavaFX [message #1219345 is a reply to message #1219343] Tue, 03 December 2013 13:28 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5465
Registered: July 2009
Senior Member
You are not able embed SWT in JavaFX, only the other way is possible!

Having said that:
a) We BestSolution.at have an experimental port of SWT running on
JavaFX - see
http://tomsondev.bestsolution.at/2013/12/03/introducing-swt-on-fx/
b) Are really the JFace-Dialogs are the blocker? There are plenty of
external projects who provide JavaFX-Dialogs (including e(fx)clipse!)

If you have questions about JavaFX dialogs I'm happy to answer them at
the e(fx)clipse newsgroup.

Tom

On 03.12.13 14:16, Joseph Gagnon wrote:
> I've recently been investigating and experimenting with developing an
> Eclipse 4 application using JavaFX as the rendering engine. So far it
> has gone fairly well - I just started looking at E4 about a month ago.
> Now, I'm at a point where I'd like to mix JavaFX with SWT/JFace. The
> reason for this is that JavaFX does not currently have any notion of a
> dialog and I think I will need to use a JFace dialog to provide the
> dialog functionality and (hopefully) still use JavaFX to provide the
> dialog UI "content".
>
> The trouble is: I can't figure out how to meld the two technologies
> together. I'm using eclipse Kepler along with e(fx)clipse. I followed a
> tutorial by Lars Vogel on developing an E4 RCP application and other
> tutorials on the e(fx)clipse site to incorporate JavaFX into E4. The
> target platform that I set up does not have any SWT or JFace libraries
> and I can't figure out how to get them and put them in. Should I go
> about it a different way?
>
> I'm open to any suggestions as to how to solve these issues. I'd prefer
> to continue using E4 as the platform and JavaFX as the renderer. Any
> alternative approaches would be welcomed at this point.
>
>
Re: Eclipse 4 / SWT-JFace / JavaFX [message #1219349 is a reply to message #1219345] Tue, 03 December 2013 13:42 Go to previous messageGo to next message
Joseph Gagnon is currently offline Joseph GagnonFriend
Messages: 58
Registered: June 2013
Member
Tom,

> You are not able embed SWT in JavaFX, only the other way is possible!

I must have worded it poorly. I'm not trying to embed SWT in JavaFX, but the reverse in order to have the SWT/JFace dialog behavior with the dialog's UI rendered via JavaFX. However, this may be moot considering the next item.

> b) Are really the JFace-Dialogs are the blocker? There are plenty of
external projects who provide JavaFX-Dialogs (including e(fx)clipse!)

Yes, this is the blocker for me at this point. I need to be able to display modal dialogs and I can't figure out how to do it with JavaFX. I tried to find examples where someone had implemented a dialog with JavaFX, but found very little that was helpful. I didn't think it could be done (without a little help from other technologies such as JFace). If you could point me to sources where this is being done, that would help considerably.
Re: Eclipse 4 / SWT-JFace / JavaFX [message #1219352 is a reply to message #1219349] Tue, 03 December 2013 13:46 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5465
Registered: July 2009
Senior Member
On 03.12.13 14:42, Joseph Gagnon wrote:
> Tom,
>
>> You are not able embed SWT in JavaFX, only the other way is possible!
>
> I must have worded it poorly. I'm not trying to embed SWT in JavaFX, but
> the reverse in order to have the SWT/JFace dialog behavior with the
> dialog's UI rendered via JavaFX. However, this may be moot considering
> the next item.

The problem is that then there 2 toolkits attached to the same event
loop. IIRC when you embed JavaFX in SWT, SWT has to be the one started
first which is not the case if you are launching an e4-fx application
where JavaFX comes first!

>
>> b) Are really the JFace-Dialogs are the blocker? There are plenty of
> external projects who provide JavaFX-Dialogs (including e(fx)clipse!)
>
> Yes, this is the blocker for me at this point. I need to be able to
> display modal dialogs and I can't figure out how to do it with JavaFX. I
> tried to find examples where someone had implemented a dialog with
> JavaFX, but found very little that was helpful. I didn't think it could
> be done (without a little help from other technologies such as JFace).
> If you could point me to sources where this is being done, that would
> help considerably.

This is dead simple even to implement yourself but nothing we should
bother this list with because it is JavaFX/e(fx)clipse related.

Tom
Previous Topic:No Separator option available under Model Fragment -> Add child
Next Topic:ToolItem with label and image
Goto Forum:
  


Current Time: Mon Nov 24 16:34:16 GMT 2014

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

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