Improving decoration area support for lists, trees and tables in Substance

April 18th, 2009

The decoration areas in Substance look-and-feel are, in my view, one of the more powerful features of the library and allow to programmatically implement even the most demanding visual designs in a well-structured way. The lifecycle of Swing UI delegates is not very well suited to using different foreground and background colors on components of the same type in different parts of the same window, and implementing this properly without affecting the performance is an interesting challenge.

The latest binary drops of Substance 5.2dev (code-named Quebec) provide much better support for renderer-based components, such as lists, tables and trees when these are placed in custom Substance decoration areas. To illustrate this, here is a screenshot of a sample application under Substance 5.1 Business Black Steel skin:

There are four different decoration areas, each having one enabled and one disabled list. The visuals are quite jarring – the contrast between even and odd rows (striping) is too high, and the foreground color of odd rows in the top-left enabled list is black (on black background). Here is how the same app looks under Substance 5.2dev:

The next screenshot shows a sample application with tables under Substance 5.1 Business Blue Steel skin:

In addition to the same problems as above, the table header area is not using the correct color schemes (for all areas except NONE). This is how the same app looks under Substance 5.2dev:

Finally, a sample application with trees under Substance 5.1 Nebula Brick Wall skin:

While it looks as expected, it’s only by looking at the skin definition that you can see it’s using wrong background colors for most of the areas – here is how it’s looking under Substance 5.2dev:

The development of the next 5.2 version of Substance (code-named Quebec) is wrapping up. You’re more than welcome to take the latest 5.2dev binary drops for a spin. The release candidate is planned for May 11, with the final release scheduled for May 25.