Luan O’Carroll of Xoetrope has been very active lately working on bug fixes and enhancements to the Xoetrope Color Wheel. It’s a Swing component that allows choosing colors in a very nice and visually appealing way, and it can be used in JColorChooser or as a part of larger UI (see video links below).
The latest additions available in the XUI itself as well as in the development version of Substance 4.1 add mouse-wheel support for the color wheel and the brightness / saturation sliders. This screencast shows the new features in action, and this screencast shows how the color wheel can be used in a larger UI.
In short, you can use the mouse wheel on the color wheel itself to play with the hue, and on the sliders to play with the brightness and saturation of the selected color. In addition, holding the Control key while wheeling over the sliders will apply the brightness / saturation on the color wheel itself. Here is how the color wheel looks like in default mode:
Here is how it looks like with decreased brightness:
And here is how it looks like with decreased saturation:
If you want to reuse this component in your code (like the Colorspace of Teppefall), make sure that you read and follow the terms of XUI license (identical to Mozilla Public License) in XUI.license of Substance distribution.
GroupLayout was introduced in the middle of 2005 and later was added to JDK 6.0. It is the default layout manager used by NetBeans UI editor (code-named Matisse), and while the code using the GroupLayout tends to be very verbose and unreadable, the visual results are very pleasing as compared to other core Swing layout managers. For applications that require JDK 5.0, the swing-layout project provides JDK 5.0-compliant implementation.
This layout manager has introduced a concept of baseline that allows aligning components according to the perceived text baseline, instead of lining the components on the top border. This is especially relevant for form-based UIs that have grid-like arrangement of controls. In such UIs, you usually have labels in the first column followed by text fields, check boxes, combos and other controls in the subsequent columns. Here is an example:
As you can see, the alignment is far from perfect. The labels are incorrectly aligned with the text field, the combo and the password field. In addition, the labels are not spaced evenly. The implementation of GroupLayout includes hard-coded computation of baseline offsets for all core Swing components for the major core look-and-feels (Metal, Windows, Aqua and GTK). Here is how the same UI looks under Windows look-and-feel on Vista:
As you can see, the rows are aligned according to the text baseline, and the labels are equally spaced.
While this functionality is available out of the box for the core LAFs that were mentioned above and LAFs that extend those, there are three notable missing LAFs: Basic, Motif and Synth. Here is how the same UI looks under Motif:
What about the other two groups? There are a few third-party look-and-feels that extend either BasicLookAndFeel or SynthLookAndFeel. These include Alloy, Skin, Substance, Napkin, Liquid and Synthetica. Here are a few screenshots of these LAFs (Liquid, Napkin and Synthetica):
Following the request made by one of Substance users, the latest drop of Substance 4.1dev (code-named Lima) includes the new Substance Baselin plugin (that was refactored from the Substance NetBeans module). Once you add the substance-baseline.jar to your classpath, it will add the correct baseline alignment for applications that use GroupLayout from the swing-layout project under JDK 5.0.
Here are the before and after screenshots under Substance:
The license for this plugin is LGPL (the same as for the swing-layout.jar itself).
An astute reader would notice that the current implementation of JDK 5.0-compliant GroupLayout doesn’t provide builtin support for Synth-based LAFs. It would be interesting to see how Nimbus is going to address this issue, especially with the plans to backport it to JDK 5.0.
This week is witnessing a more-than-usual level of activity in the look-and-feel department. In addition to my own announcement on the release 4.0 of Substance, there are a few other items.
The first is the announcement from Fred Lavigne (creator of the Skin look-and-feel) on the updates made to the Javootoo site. The new design is much better, and the navigation bar has been reworked as well. Not to mention that the screenshots and the blurbs on the various libraries have been updated to match the latest respective versions. Here’s how Substance page looks like:
The second announcement comes from Wolfgang Zitzelsberger of Javasoft on the new version of Synthetica look-and-feel. In addition to bugfixes and new client properties, it features a new WhiteVision theme (which uses color combination similar to the Substance Creme skin):
As with all the latest animated themes, this is available under commercial license only.
As a side item, Davide Raccagni has announced a minor release 1.1.1 of his A03 look-and-feel that comes with a version compatible with JDK 5.0. And if you wondered what is the meaning behind the name, go to that link for the explanation.
Update: just as i thought we were done for the week, Jasper posted an entry on Nimbus work in progress:
Here’s a simple demo of a library that i’ve been working on over the past few months. I’m going to talk more about it over the next few entries, but for now enjoy the teaser:
In the meantime, you can view the original application graciously contributed by Paul Falstad (warning – opens a popup window with an applet) and two videos on YouTube that demonstrate how this functionality can be used (video 1 and video 2).