Eclipse RCP application without Eclipse GUI - java

I'm working on a swing application. I don't want to migrate it to SWT, but I'd like to use some benefits of Eclipse RCP application. Especially, I want to use the update technology to distribute application updates.
It would be great if you knew a tutorial on how to build an Eclipse RCP application that can start a custom GUI based on Swing.

Uhm... I don't think you'll be able to get there with the eclipse rcp...
There's a lot you'd have to adopt, including the whole OSGI structure for your app -- if you're unwilling to change your UI toolkit you've probably already got too much infrastructure in place to want to adopt that much of the RCP.
If it's just swing your married too for whatever reason, look into the netbeans rcp.
If it's just updating you want... there's more then 1 sparkle implementation for java.

Check this:
http://www.eclipse.org/articles/article.php?file=Article-Swing-SWT-Integration/index.html
However, I strongly advise against using them. You will end up with a lot of issues with platform independence. If you're just aiming at Windows, you might be fine.
I agree with lscoughlin, you're getting way too much overhead for that bit of functionality. You can always try to take the bits you need out of the Eclipse/Equinox project, thereby building a leaner solution. Be aware of licensing then. Looking at some parts of the code for inspiration can be helpful too, but it's a huge project.

Tough task... but you can try qwylt.
It is a framework based on Equinox (Eclipse OSGi implementation). Hopefully it will provide enough functionality for you.

Generally your request could be realized with the new Eclipse 4. In the new model all graphical output is done with so called Renderers which render the application model into the grapical output you see with your application. Lars Vogel has a Tutorial on those and Kai Tödter even did a brief article on different renderers in JavaFX 2.0, Swing & SWT Renderers for the Eclipse 4.x Application Platform.
He also did a basic SWING renderer which is available on https://github.com/toedter/e4-rendering I can however not tell on how stable this renderer is and to what extent it covers all application model elements provided by e4.

Related

what should I use eclipse rcp or eclipse scout?

i am planning to develop desktop application using java code, and wanted to use any ready
made framework and then i got know about eclipse RCP / eclipse scout but i am in doubt that which framework should i use whether eclipse rcp or eclipse scout ? could somebody suggest me please.
first of all I'd like to add another option: Eclipse Riena.
Eclipse Riena is comparable to Eclipse Scout as it is based on Eclipse RCP and provides some useful abstractions. You should have a look at it.
But to give you some help deciding which one to use:
If you are doing your first steps in Eclipse RCP, I would suggest that you first get your hands dirty with a little bit of plain Eclipse RCP. There is some complexity which will get back to you if just start with a higher level framework like Scout/Riena.
Depending on plans with your desktop application, this might already be good enough.
Scout/Riena do help you with more advanced topics like reuse/standardization, remoting, proven application architecture. But like most frameworks, you lose some flexibility.
What I especially like about Eclipse Riena:
Focus on easy to use GUI (will not fit for every project)
Abstraction over SWT/JFace (Ridgets) provides nice facility for controller tests, rendering the need for GUI tests to a minimum
Nice API to (dynamically ) structure and validate your application
Simplify remoting (no Java EE container dependencies on the client)
You can use parts of Riena independently. Say you can use the ridgets without adding the whole bunch of other perhaps not needed stuff.
What I like about Eclipse Scout
Strong focus on integration in Java EE environment
Wizards all over: Quite simple to create a first and second shot of your GUI
Supports swap of your GUI technology: You can move from SWT to Swing quite swiftly, though I wouldn't bet that is easy for a large application. ;)
HTH
Regards,
Holger
I can't comment/judge about your comments regarding Riena. However, I'd like to add some comments/clarifications regarding Scout
The fact that Scout comes with the Scout SDK tooling is a big help to beginners. This makes it ideal to get started with writing desktop applications. As the output of all the wizards is only Java code and some needed wiring in plugin.xml etc. it means that you're free to do Scout applications without using the Scout SDK (you can even have mixed teams working on the same code). This is possible as the Scout application model is just a bunch of Java classes.
Holger rightly mentions that you can swap the UI technology with Scout applications. This is possible as the programmers writes the model of the UI. For each supported UI technology (currently Swing, SWT, RAP (for web applications)) a specific plugin will actually draw the UI depending on the available UI model. This is a very clean separation of the UI technology and the application model. Therefore swapping works even for very large applications (Of course there are some exceptions to this rule: If your desktop application has some Microsoft Office integration part on the client side you will find it hard to support that in a web application).
Try some of the Scout tutorials and let us know what you think in the forum.
Best regards
Matthias

How can I create a single window application using NetBeans Platform

Is NetBeans platform for creating only rich client applications or we can also create single frame applications? There is a wizard for Swing Application Framework based application, but is this possible to create the same single frame application using NetBeans platform. If yes, then please guide me how can I create one. Thanks.
First of all NetBeans is a impressive, powerful but complex platform to build java gui applications.
The main problem of all development platforms is, that there are some trade offs to be made to unleash the real power of the platform.
It is hard to tell if NetBeans Platform is an overkill for your needs. But the introduction videos and tutorials are great instruments to get a feeling of the programming model and runtime environment. They helped me a lot at the beginning.
If you have concrete questions afterwards feel free to ask.
Netbeans Application quickstart guide

Netbeans JSR-296, Swing and JavaFX, what are we now meant to use?

I am starting to learn Java development (I used to develop in C++), I am using some older materials, however, I would also like to keep up to date with Java developments and recommendations.
I did some background research regarding Swing and JavaFX. I learnt that development on JavaFX script has stopped, however, version 2 of FX is in development so I am not sure what this will end up being as I thought the scripting as a major part of the standard.
When using Netbeans I discovered that further development on Swing is to stop and too is Netbeans support (JSR-296). Netbeans recommends moving to the Netbeans Platform API which I am reluctant to do because I want to learn Java as a true cross platform language and not be tied to any particulars.
This begs me to ask the question what is the preferred new approach to deveping GUIs in the Java world?
You will probably find the Wikipedia page about JSR-296 informative.
Swing is an API that lets you work with various graphical 'controls'. You can arrange them is any number of ways to create a GUI for your application.
The Swing Application Framework (JSR-296) was and effort to create an API that would create a 'standard' way of writing applications, that would use Swing to present the UI.
The NetBeans Platform is a different effort with similar goals to JSR-296... though it does encompass some other areas, like modularity. The NetBeans IDE is built on the NetBeans Platform. The NetBeans Platform uses the Swing API to present UI.
SWT is an API at a similar level of abstraction as Swing.
The Eclipse Rich Client Platform (Eclipse RCP) is another application framework. The RCP is based on SWT. The Eclipse IDE is based on the Eclipse RCP.
You should know that:
You do not need to use the NetBeans IDE to create an application based on the NetBeans Platform.
You do not need to use the Eclipse IDE to create an application based on the Eclipse RCP.
Swing (Java) or SWT (Eclipse) - both are very much alive.
JavaFX should be considered a failed distraction of Sun's (now Oracle's).

Swing, Eclipse RCP or which way to go?

I'm a developing primary Java webapplications at work. I would like to start creating a little java desktop app. It should be a simple CRUD app with database connection, 2 - 3 forms and a smart stats page. To be honest: I'm kinda lost in this topic. I've took some time to guide through swing but the tutorials are all old and most of the stuff seems to be very unhandy. Aren't there any swing frameworks or somethingelse?
Vogella gives a good introduction into Eclipse RCP development but this all seems too much for my use at home.
What I'm searching is a easy/light way to create a desktop app. Which options are available in this topic? Would be glad if someone could share some experiences with Swing or Eclipse RCP and if its worth to spend time into getting in of this.
Thanks
For a simple application like yours, Eclipse RCP is just overkill. Its a very high level framework. SWT is a good option. If you have any experience with Swing or SWT, I suggest you stick to it. You should also look into MiGLayout.
You might consider JavaFX. I haven't yet had time to try it myself, but I hear good things about the ease of use and capabilities.
Eclipse RCP is quite straightforward IMHO, you could always start with a Mail Template from the new Project Wizard. If youre looking for sth a little bit more lighweight you could try Spring Application Framework. e4 makes it considerably easier to develop RCP "on the fast lane". You could try this excellent Vogella tutorial
If you don't mind using Groovy try Griffon.
I am in the process of porting my Swing database application to the Netbeans RCP Platform.
The Netbeans RCP is similar to Eclipse RCP but it is fully based on Swing (Swing ships with the JRE/JDK , so it is more platform independent).
If you are a beginner to Swing, I would certainly recommend using the Netbeans RCP because it automatically solves a lot of beginner's problems and enforces good practices. It also has some powerful GUI elements (like Outline, option-button) which are not present in plain-Swing. The netbeans.org has ample video tutorials to get started.
Also, with the Netbeans RCP, you get some extra goodies which may come useful, like modular JavaHelp integration for online help in the client.
Also, Netbeans can generate easily deployable Webstart package or platform-dependent installers for deploying the desktop app (I recommend Webstart, that is the easiest way to distribute your application, only Java needs to be installed beforehand and that is usually doable even for the dumbest of users).

UI for a Desktop App

I have a desktop application . The functionality is complete, but user interface requires a lot of work. I am looking for UI tools.My current operating system is Windows and application is required to run on both Windows and Linux.
Can you guys recommend any?
The software is customized file management application for a specific client, with future plans of web integration.
Thanks in advance :)
Application Environment
Lang : java,
IDE : Eclipse 3.4,
Target Platforms : Windows Vista-OpenSuse 11
SWT is another option. The advantages are a look-and-feel closer to the native platform, and generally faster execution times. The main disadvantage is that you will have to have different distributions for different target platforms, as SWT depends on platform specific libraries.
With an eye toward the web integration, look at GWT. You write your interface in Java but it gets generated into Javascript and can thus be run in a browser. This may make your deployments easier. On the downside, you lose a bit of the rich client UI, but maybe you don't even need that. It all depends on how complex your UI is.
A word of advice: you mentioned future plans of web integration. Take special care to isolate what logic you can from the UI. Keep the UI as clean as possible, and then you may be able to use the same logic in the web UI either on the client or the server.
If you are just looking for a GUI designer you could check out Netbeans IDE which has a built-in Swing user-interface builder.
Alternatively you could build a front-end in JavaFX. There's not much tooling for FX yet but a new tool was recently previewed at JavaOne 09. Not sure when it's being released.
I've used Qt a few times and find it very good at this sort of thing -
Qt Home Page I'm not sure if it's exactly what you're looking for as your application is complete, however, but it may be worth a look.
Found an excellent fix,
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
SwingUtilities.updateComponentTreeUI(myform);
looks so cool in my vista and suse , its enough for now.
Thanks for everybody for helping out

Categories

Resources