Starting today i am discontinuing support for Substance NetBeans module, including fixing bugs and synchronizing the module with Substance core libraries.
The development of this module was greatly facilitated in the beginning by Tim Boudreau, but unfortunately was met with less than lukewarm support from the NetBeans team (see comments on issue 66335 and issue 67463). A little over a year ago this module has been broken by the changes scheduled to appear in NetBeans 6.0, but those changes had been rolled back a month later, making the module usable once again. However, the core NetBeans code has not evolved to make it more friendly to third-party look-and-feels, and the development of Substance module has not been as productive and fulfilling as it could have been (as indeed was the case with SwingX).
Today marks the last day that this module is supported by me. It has been removed from the NetBeans plugin portal, and last sync with the core Substance library has been uploaded to the Documents & Files section of the java.net project. If you are interested in taking over the maintenance and development of this project on java.net, feel free to contact me at kirillcool [.at.] yahoo [@at@] com.
The demo applications for the Flamingo JRibbon component make heavy use of the SVG icons to make sure that the icons can be scaled without losing visual details. While Flamingo provides Batik-based implementation of the ResizableIcon interface, this has proven to place a noticeable burden on CPU during the application startup phase. One of the ways to address this performance issue is to use the SVG-Java2D transcoder that is part of Flamingo core distribution.
There’s nothing like eating your own dog food, and while trying to use the transcoded Java2D class to replace the runtime SVG decoding i found that it was lacking some of the basic functionality. The most glaring one was lack of API to query the default bounds of the SVG image. This is now exposed in the Java2D class with two static methods – getOrigWidth and getOrigHeight.
The second enhancement to the org.jvnet.flamingo.svg.SvgTranscoder class is the new setJavaToImplementResizableIconInterface(boolean) method. If you call this method prior to calling the transcode(), the resulting class will implement the org.jvnet.flamingo.common.icon.ResizableIcon interface, making it ready to be used instead of the org.jvnet.flamingo.svg.SvgBatikResizableIcon class. This comes handy since the heavy transcoding is done offline, and the size of the compiled class is comparable with the size of the compressed SVG file (especially if you turn the debugging info off). You can see the difference yourself by running the ribbon demo below – once the application frame is shown, all the icons are immediately visible and you can start interacting with it.

To change the package name of the generated Java2D class, call the setJavaPackageName(String) method prior to transcode() call. The last addition is the sample test.svg.SvgBatchConverter class that shows how to run the SVG-Java2D conversion in batch mode on all SVG files in a given folder.
Using the offline transcoding has another advantage – you don’t need to bundle the Batik jars that are around 3-4MB heavy. One point left to your consideration is the issue of the license of the original SVG images and its implications on the transcoded Java2D classes.
The last entry on Flamingo component suite talked about addition of contextual task groups, dynamic changes to in-ribbon galleries and reworked documentation. Over the past couple of weeks i have been working on the ribbon application title bar and formulating the future plans for the component itself.
The application title bar is a ribbon-specific feature that allows putting extra ribbon content on the title pane of the frame. In Office 2007 the application title bar contains the quick access toolbar and the headers of contextual task groups. Flamingo’s counterpart of quick access toolbar is the taskbar and up until now it has been placed to the left of the task toggle buttons. In addition, the contextual task group headers were not shown at all.
Putting content on the title pane requires close cooperation with the look-and-feel implementation, and as such is only available under Substance look-and-feel (interested developers are welcome to take a look at the code to see how this can be extended to other third-party LAFs that support decorated mode). Here are a few screenshots that show the new functionality in action.
The first screenshot shows the ribbon component with the taskbar automatically placed on the left hand side of the title pane. The taskbar has a few command buttons, one of them with a popup menu (click for the full size view):

The next screenshot shows the ribbon component with two visible contextual task groups. Note how the group headers are painted on the title pane and force the title text to be clipped:

The last screenshot shows the same component with one of the contextual tasks selected:

Here is what you need to use this functionality in your application:
The last point brings me to the future plans for the ribbon component. This is still work in progress that is targetting the next release (4.0), but you can already try it under the latest 3.1dev branch. The JRibbonFrame is going to be the only way to have a ribbon in your frame. It extends the JFrame and enforces that a JRibbon component is always in the BorderLayout.NORTH position. Under the hood, it also allows third-party look-and-feels (such as Substance) to “relocate” the taskbar to the title pane and paint the contextual task group headers. Going forward, the JRibbon class will have package-protected constructor. This will be part of 4.0 release to ensure easier transition to the new approach.
The plans for release 4.0 include providing the missing functionality from the Office 2007 Command Bar, including:
- Application title bar for other look-and-feels. The taskbar and contextual task group headers will be placed there (except when the application is running under Substance or other look-and-feels that will provide support for placing them on the frame title pane).
- Main application menu button.
- Pluggable resizability policies.
- Minimizing the ribbon.
- Horizontal scrolling for content under small widths.
- Better support for placing core controls and button groups in ribbon bands.
- Key tips.
- Screen tips (AKA rich tooltips).
To try the new title bar functionality in action, click the WebStart button below and use the “Group” checkboxes in the bottom control panel to show / hide the contextual task groups.

икони
Here are some Swing links that you might have missed during the last three weeks:
- Gregg Bolinger extends the application-wide hotkeys with a lookup dialog, complete with wiring the events for navigating and canceling.
- Roman Kennke summarizes the Caciocavallo project that aimed to create portable GUI backends for OpenJDK graphics stack.
- Santhosh Kumar has an interesting solution for cross-LAF combobox with group separators. The solution involves putting the grouping logic inside the renderer, and one of the commenters wonders whether this logic should be part of the model or of the specific view.
- Piet Blok writes about the JXLayer project and his experiments with multiple layers and sharing UI instances.
- Alexander Potochkin has assumed the role of specification lead for reference implementation of JSR 295 (Swing Application Framework). He shares his thoughts, outlining the proposed changes and soliciting feedback on his blog, and has already submitted a few changes to the project source repository.
- Native font rasterization is one of the major features added to JDK 6u10 on Windows platforms, and has impressed Naiden Gochev that has screenshots of old rasterizer, SWT (native) rasterizer and NetBeans running under the new rasterizer. Too bad that the Windows look-and-feel only uses Segoe UI on the menus…
- Jasper Potts sums up the work he and Richard Bair have been doing on Nimbus look-and-feel. Perhaps the more disappointing part is that the highly-anticipated designer tool announced last September still can’t be made available to the public. The followup post has an example of skinning a slider under Nimbus. If you plan on customizing Nimbus with painters, note that the com.sun.java.swing.Painter interface is only available in JDK 6u10, so you might as well instantiate Nimbus with the fully qualified class name instead of iterating over available LAFs and querying their names.
- On the Synth-related note, Xavier Young has started a series of tutorials on configuring the EaSynth look-and-feel. The first part is on general button customization, and the second part is on arrow buttons, check boxes, radio buttons and toggle buttons.
- Yves Zoundi has announced release 0.0.3 of VFSJFileChooser component that extends the JFileChooser to browse remote file repositories such as FTP, SFTP, WEBDAV and more.
- Andres Almiray writes about Groovy new binding features, their applicability to SwingBuilder and the comparison with JavaFX binding.
- Christophe Le Besnerais continues his explorations on modern interfaces, aiming to recreate the look similar to that of OnWired web site in Swing.
- Michael Bar-Sinai proposes solutions for complex table cell rendering logic in his java.net article. In particular, he has a class-based and rule-based approaches for separating same-column rendering logic into more manageable code.
- Finally, Maxim Zakharenkov has released version 1.3 of SwingExplorer project. New in this release – NetBeans plugin and tracing component addition.