Advanced animations on core Swing components – part III
July 10th, 2007 | 4 Comments »This is the third part in the ongoing series about advanced animations on core Swing component 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
This part is going to show rollover and selection background and foreground animations under a mixed dark-light theme. A few weeks ago I have added a few experimental skins to Substance, and two of these (Nebula and Nebula Brick Wall) use the colors from the upcoming Nimbus look and feel. The design of Nimbus is interesting in that it uses dark highlight color schemes on trees, tables, lists and menus:

This presents an interesting problem once animations will be added – you have to fade not only the background (from white to dark blue), but also the foreground (from black to white). Here is how these animations look like under the Nebula skin in the latest 4.0dev drop of Substance. The first video shows rollover animations on menus and menu items (under the default speed setting):
The second video shows rollover and selection animations on a tree (note that both background and foreground colors are animating):
The third video shows rollover and selection animations on a list:
The last video shows rollover and selection animations on a table (and its header). Note how the settings (foreground / background) of a custom cell renderer are respected during the animation sequences:
So, you’re welcome to grab the latest binary drops of version 4.0dev and try the new and improved Nebula and Nebula Brick Wall skins.
Related posts:
- Advanced animations on core Swing components – part IV This is the fourth part in the ongoing series about advanced animations on core Swing...
- Advanced animations on core Swing components – part II The first part showed the animations added (among the rest) on menus, sliders, tables and...
- Advanced animations on core Swing components – part V This is the fifth part in the ongoing series about advanced animations on core Swing...
- Advanced animations on core Swing components – part I Animations are most probably one of the main ingredients of a modern UI. This applies...
Is there an easy way to switch off the tree highlighting the *whole* line, up to the rightmost limit? I scanned the source, but cannot get a real clue to disable it just for the tree… maybe even only for once specific tree only? That would be nice…
Keep up your nice work… :-)
Patric
Patric – this is by design and can not be switched off. You can remove all the rollover effects on trees by having your cell renderer return true from isOpaque.
Thanks
Kirill
Hi krill,
Great animations …but i think there are always cases where we need to develop custom animation. maybe u can start a trail of lessons on how to develop custom animation using swing.
Pavan – i think there are some good tutorials out there for making custom animations, and the upcoming Chet / Romain book contains a chapter specifically devoted to this area.
Thanks
Kirill