Skip to main content

Animating your lists, tables and trees - part II

Posted by kirillcool on October 20, 2006 at 10:31 PM PDT

The first part of this series introduced animation fades on lists, trees and tables in Swing applications running under the latest development version of Substance look-and-feel. The release candidate for version 3.1 (code-named Honolulu) is on October 30, and there is still room to add minor user-requested features. The users who download and try the development drops inevitably face defects, but they also have a great opportunity to comment and affect new features. One of the users (thanks, Raj) requested that the table rollover animation should highlight the entire row.

Now, this is not as straightforward as it sounds, since the JTable API provides two methods, setRowSelectionAllowed and setColumnSelectionAllowed. When both are set to either true or false, clicking a cell selects that cell. When the first is set to true and the second to false, clicking on a cell selects the entire row. When the first is set to false and the second to true, clicking on a cell selects the entire column.

The latest version of 3.1dev drop features the rollover animation effects that follow the same algorithm. Click on a play button below to view a short screencast that illustrates this feature.

Related Topics >>