The first volume of Substance sightings was published last August and featured four Swing media-oriented applications. The purpose of this series is to highlight the capabilities that Substance look-and-feel brings to Swing applications, and the second volume showcases three open-source audio players with Substance-powered UI.

The first audio player is aTunes (hosted on Sourceforge as well), and it takes advantage of a few Substance APIs. Here is a sample screenshot of aTunes under the dark Raven skin (click to see full-screen image):

And here is another aTunes screenshot under the Business Black Steel skin. Note that both screens use vertically rotated tabs (in the top left corner) and the status bar component from SwingX component suite rendered by the Substance SwingX plugin:

The final aTunes screenshot shows the UI under Arabic locale. Note how Substance handles the right-to-left orientation of title pane buttons, menus, sliders, table headers and tabs:

The second player is Jajuk (which is also hosted on Sourceforge). Here is a screenshot of Jajuk in action – note how it uses an image-based watermark:

Unlike aTunes, Jajuk uses a few custom components that are not painted by Substance (the title bars of inner docked views and some of the buttons).

The last one is Xtreme Media Player (also hosted on Sourceforge). Unlike aTunes and Jajuk, Xtreme MP uses a custom Substance skin to create a unique look for the application. Here is a screenshot of XtremeMP in action:

This application uses SwingX and the matching Substance SwingX plugin as well (for the status bar). In addition to a custom Substance skin, it also takes advantage of the Substance button shaper functionality, setting custom button shapers on the control panel buttons:

Once the application defines the contour of each button, Substance takes care of the rest, including mouse hit detection and proper animation sequences.

If you haven’t tried Substance in your application, you’re more than welcome to do so. The current stable release is 4.3, and the next 5.0 version is available in early development drops.

Roadmap for Substance 5

April 22nd, 2008

With release 4.3 of Substance look-and-feel available last Monday (and a few patch releases to address bugs since then), it is time to think about the next release. Substance is now three years old and it has seen fourteen releases since it was started in April of 2005. Most of the minor releases did not introduce binary incompatibilities, and the last two major releases (3.0 and 4.0) touched the public APIs in ways that should have affected only a small portion of users. However, due to my very heavy commitment to make Substance the library of choice to create modern user interfaces (and resulting short release cycles), sometimes i have made bad decisions on the features to include and the APIs to expose them.

Over the last year and a half the Substance codebase has become a complex thing to understand and maintain. Every new feature that has been added (especially the skins and decoration areas) made it ever more difficult to maintain backwards compatibility and still address the needs of designing modern UIs. This sometimes led to an awkward implementation and even more awkward public APIs (as anyone who dared to use a SubstanceComplexTheme would attest).

Even though i am the single developer on the project (but thanks to all those who sent bug fixes and graciously contributed portions of code), i found it increasingly harder to understand and extend existing functionality. And here i am not talking about working on the project every other weekend; i look at and work with the code pretty much every day. Something had to be done, and over the last eight months i have considered the two options that i had.

The first option would be to start a new project. Learn from all the mistakes that i’ve made, all the features that were added and not used, all the accidental complexities that grew exponentially and didn’t really mesh well together, all the nice-to-haves that added performance hit even when not used. In short, stop working on Substance (moving into maintenance bug-fix mode only) and start anew.

The second option would be to wait for the next major release and do all the things necessary for the long term health and viability of the project. To rework the cruft and the mess into an API that best reflects my understanding of creating modern UIs as i see it at this moment. To put myself into my users’ shoes and question every client property, VM flag and API method. To see how hard it is to customize the default behavior without reading the Javadocs and the documentation. To see how hard it is to create a custom skin after reading the source code of existing core skins. And most of all, to see what can be sacrificed in the short term to address the long-term problems.

The first drop of the next major release (code-named Substance 5) will be available for download tomorrow. Here is the list of major changes that have been made to the core library and its plugins.

  • Requires JDK 6.0. The only VM that is being used for tests is 6u10.
  • SubstanceLookAndFeel class is now abstract and does not have any public constructors. Use a core skin-based LAF, extend to set a custom skin or use static setSkin method.
  • Removed support for pluggable text rasterizers (substance-bramble plugin based on SWT). 6u10 addresses poor Segoe UI rendering on Vista.
  • Addressing performance. The first drop of 5.0 is 20% faster than release 4.3. This is work in progress.
  • Reworked notion of themes. Split the functionality of SubstanceTheme, SubstanceComplexTheme and SubstanceSkin into SubstanceColorScheme, SubstanceColorSchemeBundle and SubstanceSkin. Tweaked most of the core skins to take advantage of the new more flexible and straighforward APIs.
  • Removed most of the VM flags. The only two flags are for tracing memory allocation and heap status. Use skin / image watermark / configuration APIs.
  • Reconciled APIs that were added to address specific user requests and did not result in a consistent API. This should make making a custom skin / tweaking default Substance behavior easier and more straightforward.
  • New client property to provide per-window skinning. Can use different skins for different top-level windows.
  • Removed the client properties and APIs for setting themes and painters on per-component level. Use colorization client property and per-window skins for custom tweaking.
  • The new default mode does not add any extra UI elements (menu search, lock icons etc).
  • Removed performance-adverse functionality of custom overlay and composites. Was unintentionally broken since release 4.2 and intentionally unfixed in both 4.2 and 4.3. A single complaint shows that this functionality is of minuscule use.
  • Removed combobox auto-completion. Use SwingX, GlazedLists or JIDE.
  • Moved UI debug mode (additional context menu on title panes and scroll bars) to a substance-tools plugin
  • Consolidated existing theme pack, button shaper pack and watermark pack into substance-extras plugin
  • New SubstanceApi annotation marks public APIs (classes, constructors, methods)
  • Internal restructuring of the packages to make the codebase more organized.

Undoubtedly, the most important bullet in this list is moving to JDK 6.0 as the runtime requirement. This has not been a minor decision. I understand that for a great number of users this will mean that they will not upgrade to Substance 5. I am doing this for the long-term health of the project.

At this point, release 4.3 officially enters into the longterm bugfix mode. With older releases i only backported bug fixes during the first week after a stable release. Release 4.3 will continue to receive all but most complicated bug fixes to accommodate users that can not upgrade to Substance 5 (due to JDK requirements).

For more information on changes to the client properties, VM flags and APIs consult the first draft version of the API change overview document. The project documentation will be updated in the following weeks.

It gives me great pleasure to announce the official release for version 4.3 of Substance look-and-feel (code-named Nairobi). The list of new features includes:

It was on this day in 2005 that Substance project has been created. It is now three years old and to celebrate this occasion i have redesigned the main project page to be less cluttered and a little better organized. Hope that you like it, and if you have any comments, i will be more than interested to hear your opinion.

A few screenshots of the new functionality in Substance 4.3:

New decoration painters applied to the Flamingo ribbon component:

Highlight painters on table (note a single-line border separators):

Colorized visuals of disabled selected buttons:

A button with 72 pixel font:

Click on the button below to launch a signed WebStart application that shows the available Substance features.

The sources and binaries are available on the project site and the CVS repository.

The release candidate for version 4.3 of Substance look-and-feel (code-named Nairobi) is available. The list of new features includes:

Target date for release is April 14. Only defects will be fixed until this date.