8.4. Splash Screen
The splash screen is the first visible part of Hyperbola. Figure 8-9 shows the Splash Screen section of the Branding page in the product editor. Eclipse expects the splash screen to be called splash.bmp, so all you need to do is identify the plug-in that contains the file. You can get Hyperbola's splash screen from the sample code for this chapter. Note that if you leave this field blank, the splash screen is assumed to be in the same plug-in as the product. We recommend making an explicit choice here for completeness.

Note
Currently, the Eclipse launcher can only display splash screens that are saved as BMP images, the standard bit-mapped graphics format used on Windows. Although BMPs are a Windows standard, they can be saved and read on any platform.
|
If you need to have locale-specific splash screens or message catalogs, then you have to put the relevant files into a locale-based directory structure, as shown in Figure 8-10. Under the nl directory, there is a structure that mimics the structure of Java locale strings. For example, the splash screen for the English locales is in the directory nl/en. The directories under nl/en contain data for English locale variations. Note that the root of the plug-in still contains splash.bmp and plugin.properties files. These are used when matching locale-specific files cannot be found.

The nl directory structure can be carved off and shipped separately in one or more fragments. When fragments are installed, their resources and code are seamlessly merged with those of their host plug-in. See Section 26.3, "Fragments," for more details. Using this approach, the nl file structure in Figure 8-10, is simply moved to a set of fragments.
The locale-specific files in the structure are automatically searched when looking for translated strings. For example, many of the values in a plugin.xml are displayed in the UI and should be translated to support multiple locales. To enable this, %variables are used instead of the real text. The variable names correspond to keys in a plugin.properties file. The values in the file are translated for each locale and shipped separately in fragments. The text for the About dialog discussed later in this chapter is a good example of text that should be translated.
|
Now when you run Hyperbola, the splash screen appears. Hyperbola is a modest sized application and it comes up very quickly on average machines. So quickly in fact that there is barely time to read the splash screen. However, if the machine is slower, bogged down, or Hyperbola is installed on a network drive, the startup time may be longer. Without a splash screen, users may begin to wonder what, if anything, is happening. Including a splash screen helps set user expectations and gives your product a somewhat more polished feel.
 |