Getting Started with Spring RCP
Table of Contents
- Getting Started
- Creating a View
- Adding Customer Data
- Adding Docking Views
- Enabling Actions
- Adding Context Sensitivity
- Changing the Look & Feel
- Install the Spring RCP Tooling plugin into NetBeans IDE 6.1.
- In the New Project wizard (Ctrl-Shift-N), you will find a new project template:
- Complete the wizard and you have a project structure as follows:
A brief overview of the files that you see above (be aware that if you move "richclient-application-context.xml" or "messages.properties" to any other place, or if you rename either of them, you need to update the Spring Rich Client panel in the application's Project Properties dialog box):
File Explanation SimpleApp.java Provides the application's "main" method and launches the application
via the Spring RCP "ApplicationLauncher" class. That class loads the
application context XML file and the startup context XML file, where application-level concerns such as the splash screen, initialization sequences, and views are defined.
SimpleLifecycleAdvisor.java Provides lifecycle management for the application. This class is
registered in the application context XML file. It provides methods such
as "onWindowOpened" and "onCommandsCreated", so that you have
entry points to customize what happens when the application starts. (For example, you can adjust the application's size in the "onPreWindowOpen" method.)
richclient-application-context.xml Provides the application context XML file, which configures the Spring RCP
components and services.
richclient-startup-context.xml Provides the startup context XML file, which defines the splash screen, but could define anything that you want to have happen specifically at startup. images.properties Provides the image resource. It is registered in the application context
splash-screen.jpg Provides the splash screen image that is used in the startup context XML
commands-context.xml Provides the application's commands, organized within menu bars and toolbars, and the items within them. This file is declared in the application context XML file. messages.properties Provides the display texts in a centralized location. For example, texts for titles and descriptions are found here.
Note: The template also put most of the Spring RCP JARs on your application's classpath. Look in the Libraries node to see which ones are there. Potentially, more JARs could be included in the plugin as the complexity of the provided tooling increases.
- Run the application. You should see this: