Overview of Substance painters

November 3rd, 2007

As Substance look-and-feel nears the official release 4.1 (scheduled for November 12th), i’m working on the missing documentation. This entry talks about the painter layer in Substance.

Painter encapsulates a common painting logic. For example, in Substance, selected elements in lists, tables, trees and menus are painted with the same gradients. So, instead of replicating this code across different UI delegates, it is extracted into a common painter. In addition to code reuse, it:

  • Makes it easier to tweak an existing painting sequence.
  • Lets applications to specify a custom (branding) painter which is applied to all relevant controls.
  • Lets applications and third-party developers to provide consistent appearance of custom components without locking themselves to internal implementation details of Substance.

Currently, Substance uses three types of painters which are used on different types of controls and window areas. The core binary bundles a number of painter implementations which are available as externally supported APIs. In addition, Substance provides a plugin layer that allows applications to specify custom painter implementations which are used at runtime to paint existing core and third-party components.

Existing painter types

Currently, Substance uses three different types of painters. These are:

The vasy majority of Substance visuals are painted by using these three painter types (applying the current watermark if necessary). The links above provide more technical information on how to specify custom painters and how to use them to paint custom components and window areas. Applications that wish to provide consistent appearance under different Substance skins are strongly encouraged to use the current runtime painters, even if it results in tying the application code to Substance.

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

Some applications may need to follow the instructions in the migration guide. Target date for release is November 12. Only defects will be fixed until this date.

In addition to the core release candidate, the following Substance plugins and modules have been updated as well:

Special thanks for bug reporting and testing go to Mikael Grev, Vincent Trussart, Kamil Paral, Klaus Rheinwald and Jean-Francois Poilpret.

This is the third part of the series on new visuals for the JRibbon component under Substance look-and-feel, and it’s time to talk about one of my favorite features in Substance – animations. Those of you familiar with the Office 2007 might have noticed that while the in-ribbon galleries provide nice scrolling animations, other parts of the ribbon are not animated. Specifically, i’m talking about rollover effects on the ribbon buttons and tabs – the transitions between the default (flat) and the rollover (active) states are immediate.

Here is a small video that shows the JRibbon rollover transitions under the normal animation speed settings. The skin is the new Creme Coffee:



And here is a video of the same rollover transitions under the Office Blue 2007 skin:

Want to take it for a spin? You’ll need the latest binaries of Substance, Flamingo and Substance Flamingo plugin.

In the first part, i showed a few screenshots of the new look of the JRibbon component under Substance look-and-feel. Continuing the series, today i’m going to show an additional new feature that allows creating less intrusive UIs with the JRibbon.

Substance already has a client property that you can install on a specific component or globally on the UIManager. When the USE_THEMED_DEFAULT_ICONS property is set to Boolean.TRUE, the button icons of buttons in default state (not rolled over, not selected, not pressed) are colorized with the colors of the current theme. This works especially well under low-contrast skins such as Raven Graphite or Autumn, and now it is also supported on the JRibbon button components.

Here is a screenshot of the JRibbon component under the Raven Graphite skin when the USE_THEMED_DEFAULT_ICONS client property is not specified. As you can see, the icons are fully colored, which results in a slightly intrusive UI:

Here is the same UI when this property is set:

And here is the same UI when the mouse is hovering over the “Paste” button:

Here is the original full-color UI under the Autumn skin:

And the same UI with the property set:

And the same UI with the mouse hovering over the “Computer” icon:

Here is the original full-color UI under the Creme skin:

And the same UI with the property set:

And the same UI with the mouse hovering over the “Computer” icon:

Want to take it for a spin? You’ll need the latest binaries of Substance, Flamingo and Substance Flamingo plugin.