Advanced animations on core Swing components – part V

September 19th, 2007

This is the fifth part in the ongoing series about advanced animations on core Swing components built-in to the latest binary drops of Substance look-and-feel.

  • The first part showed rollover and selection background animations on menus, sliders, tables and table headers
  • The second part showed rollover foreground animations on menus under a skin that uses dark background fill on menubars
  • The third part showed rollover and selection background and foreground animations under a mixed dark-light theme
  • The fourth part showed animations on the Magma skin that mixes dark and light color schemes for both background and foreground colors.

Was there anything missing from the animations under Magma? Quite a few important visuals of core Swing components, namely icons. Behind the scenes, the current look-and-feel is responsible for creating icons for different parts of core Swing components:

  1. Title pane icons (close, maximize, minimize, restore) under decorated mode
  2. Arrow icons of combobox buttons
  3. Arrow icons of scrollbar buttons
  4. Arrow icons of spinner buttons
  5. Arrow icons of nested menus

Up until now, these icons did not participate in the rollover, selection, press and arm animations. The latest 4.1dev drop of Substance (code-named Lima) provides support for these animations out of the box. While you might not notice these under most Substance skins, some of them stand out a little.

The first example shows the title pane button icons under the Business Black Steel skin. It is different from other skins in that it uses a dark theme for title panes and menu bars. In default state, the title pane button icons are painted in white. In active (rollover, press) state, they are painted in black on metallic steel background. Here is a video that shows the animation sequence under slower animation setting:



Here is how the title pane button icons animations look like under the Magma skin (under the default animation setting):


And here is how the Magma animations look like on combobox button arrow icons:


The same animation sequence is implemented on scroll bar buttons, spinner buttons and nested menus. You can play with the Substance test application, especially with Business Black Steel, Nebula and Magma skins.