Blog
Introducing SWT on FX
In my last few presentations I've introduced what I named "SonF" which is short for SWT on FX.
What is it?
SWT on FX is an SWT implementation which instead of using the native widget it use JavaFX controls under the covers (similar to what SWT on Swing did some years ago).
What is the target?
The target is to get as compliant with SWT as possible, there are some parts of SWT that are hard get working right, e.g. spinning an event-loop is something you really only hack into the system, other parts like ownerdraw in tables/trees is maybe doable but is not yet explored. At the moment our target is to get on par with what RWT can do today.
What is the audience? Where is it positioned?
We think there are 3 potential users/usecases:
- You want move away from SWT in future but have a big legacy code base which uses SWT
- You want to publish your application through RAP
- You don't yet want to fully buy into JavaFX but SWT does not do the job for you anymore because of its limitations
We'd like to position it as a transformation/migration path for people who want move away slowly from SWT, it is not meant be an additional implementation so that people stick to it forever. SWT is quite done and does not introduce new concepts as it looks like.
What is the license? Is it EPL?
Sorry no it is not EPL? We have not yet defined the business model we'll use for it. Parts of the code are under EPL because they are directly copied from upstream SWT (e.g. all the listener definitions, ...) but most of the implementation have been implemented from scratch.
Where can I get it?
At the moment it is hosted in a private bitbucket-repository and we are not yet publishing binary builds. If you want to have a binary you could drop a mail to swtfx@bestsolution.at
Where do we go from here?
Like said above we don't know where to go. In our opinion people will have to move away from SWT in future but they want to take their legacy code with them. On the other hand we also doubt that companies will pay us license fees for our SWT-FX-Port. A though problem, right! We could start a kick-starter project but would enough people support it? We highly doubt that as well. In case your company thinks this makes sense and wants to contribute substantial get in touch with us through swtfx@bestsolution.at.
Samples
Below you see screen shots UIs defined in SWT and rendered through SonF
SWT-Button
One of the most basic controls 
SWT-Canvas
Having access to SWT-Canvas is important for many make controls like CTabFolder work 
Combo
One of the a bit more complex controls but still fairly easy. It also shows that we have e.g. support for color chooser. 
Table
One of the more complex controls, currently without support for owner draw 
Tree
Another more complex one is a tree. We don't yet support TreeColumns but this is not hard to add in the days to come 
e4 on FX with SWT-Content
The outerpart is rendered through e4 on JavaFX from e(fx)clipse whereas the real UI is copied 1:1 from the SWT-e4-Addressbook example. 