Geertjan is a DZone Zone Leader and has posted 468 posts at DZone. You can read more from them at their website. View Full User Profile

Getting Even Further with Spring RCP (2)

  • submit to reddit

JIDE Integration

Integration between Spring RCP and the JIDE Docking Framework is available from, by Jonny Wray. The example you can get from there, together with the related JARs (via sources in the form of Maven projects) is a Google Search application (no SOAP API Keys are available from Google anymore, so I couldn't try out the application's functionality, but that wasn't really the point):

I played around with the above sample and extrapolated some general principles, ending up with this simple result (look at the tabs at the bottom of the screenshot below):

Some general guidelines for those interested in this integration, i.e., these are the most important JIDE-Spring RCP tags I worked into my richclient-application-context.xml file:

<!--Here the "startingPageId" property is important: -->
<bean id="lifecycleAdvisor" class="simple.SimpleLifecycleAdvisor">
<property name="windowCommandBarDefinitions" value="ui/commands-context.xml" />
<property name="windowCommandManagerBeanName" value="windowCommandManager" />
<property name="menubarBeanName" value="menuBar" />
<property name="toolbarBeanName" value="toolBar" />
<property name="startingPageId" value="mainPage" />

<!--Here the we define the "startingPageId" bean: -->
<bean name="mainPage" class="com.jidesoft.spring.richclient.docking.JidePageDescriptor">
<property name="viewDescriptors">

<!--Here the we define each of the view beans: -->
<bean id="NewSpringView1" class="com.jidesoft.spring.richclient.docking.view.JideViewDescriptor">
<property name="viewClass" value="simple.NewSpringView1" />
<bean id="NewSpringView2" class="com.jidesoft.spring.richclient.docking.view.JideViewDescriptor">
<property name="viewClass" value="simple.NewSpringView2" />
<bean id="NewSpringView3" class="com.jidesoft.spring.richclient.docking.view.JideViewDescriptor">
<property name="viewClass" value="simple.NewSpringView3" />

<!--Here the we declare that we want to use the JIDE Application Page Factory: -->
<bean id="applicationPageFactory" class="com.jidesoft.spring.richclient.docking.JideApplicationPageFactory" />

<!--Here the we declare that we want to use the JIDE Application Window Factory: -->
<bean id="applicationWindowFactory" class="com.jidesoft.spring.richclient.docking.JideApplicationWindowFactory" >
<property name="saveLayoutOnClose" value="true" />
<property name="doubleClickAction" ref="com.jidesoft.docking.DockingManager.DOUBLE_CLICK_TO_MAXIMIZE" />
<property name="heavyweightComponentEnabled" value="true" />
<property name="showWorkspace" value="true" />
<property name="layoutVersion" value="2" />

<!--Some related obligatory beans: -->
<bean id="com.jidesoft.docking.DockingManager.DOUBLE_CLICK_NONE"

<bean id="com.jidesoft.docking.DockingManager.DOUBLE_CLICK_TO_FLOAT"

<bean id="com.jidesoft.docking.DockingManager.DOUBLE_CLICK_TO_MAXIMIZE"


Those are the absolute basics. The result is pretty cool and I think Jonny Wray has done a really great job. Take a look at all the properties that are available per view, for example:

However, it would simplify things, I think, if he'd make the JARs available on his site, together with the Maven projects that are already there, containing the sources.




Published at DZone with permission of its author, Geertjan Wielenga.


Peter Karussell replied on Tue, 2008/07/15 - 5:29pm

Hi Geertjan,

this was a great effort! To compare all the stuff.

I have some additional information:

  • There is one more 'important' docking framework: swing dockings! You can find some screenshots here and here (Swing-Docking requires jre1.6).
    Why is this an 'important' one? Because it will be integrated into SpringRC 1.0.1 and it is Apache 2.0 licensed (see this jira issue). And of course it looks good :-)
  • For MyDoggy we should thank the author Angelo De Caro for his work! What I didn't mentioned in my post: MyDoggy even supports perspectives (via groups) like in Eclipse. And the latest version of the integration does not require to create an empty xml file. And now the initial view (no layout.xml) should contain the views specified in the xml ...

    Hopefully my jira issue for the integration will be accepted.

  • Some raw comments for the MyDoggy-SpringRC-integration you can find here.

Jonny Wray replied on Wed, 2008/07/16 - 1:32am

Hi Geertjan,

thanks for a great article. The example of swaping out docking implementations via simple changes in the configuration code is a good one for highlighting the power of the Spring RCP approach.

Just to address a couple of points raised with the JIDE integration. Your point about making the jars available is well taken and I should do this. I initially held off until a stable release of SRCP was produced but now that's done I've no excuse.

Also, I realise the google web service example isn't the best one since they've stopped giving out keys and may well stop the service. Also, the use of JNDI embedded browser makes it a little hard to run. That was one of my motivations behind a revamp of my biobrowser application which also serves as an example of Spring RCP with JIDE. It is fully open source and is available from subversion or as a web start launch at the project page If anyone tries it note that the wiki has an 'Instructions' subpage which has an illustrated guide to its use, as it assumes a bit of domain knowledge otherwise.


Jonny Wray

Geertjan Wielenga replied on Thu, 2008/07/17 - 3:29am

Hi Peter and Jonny! Thanks so much for your support and the interesting additional comments. All this stuff is really interesting isn't it.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.