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.
Here are some Swing links that you might have missed during this week:
- Jon Lipsky is back from a two-year long blogging hiatus and he writes about extending the RelativeLayout from James Elliott’s 2002 article.
- Santhosh Kumar is back as well (he’s not been blogging about Swing since last August), and this time he brings the auto-snap split pane divider. The solution is very simple, but i’m not sure of the usability of this particular feature. In the past, i always found the different auto-snap behaviors (such as windows in desktop managers or connectors in Visio) to stand in my way most of the time, leading me to fight with the UI. On the other hand, auto-snap in sliders is quite a useful features to restrict the input domain to a small discrete subset.
- JavaSwing.net continues its series of tutorials on Swing text components, and this time they write an introduction to working with JFormattedTextField component.
- Gregg Bolinger has an implementation of application wide hotkeys. It uses a custom EventQueue that inspects all KeyEvents and consumes those keystrokes that it sees as the custom hotkey launchers. If you decide to follow this route, be sure to read Hans Muller‘s post on the mailing list of AppFramework project from last October:
The downside is that I’ve spoken with the AWT technical lead and he’s suggested that using EventQueue.push() is deadlock-prone. That is, the area of code that deals with EventQueues is quite complex and there may be unknown bugs that could cause deadlocks.
- And finally, Ken Orr tracks an interesting problem of providing different visuals for controls in active and inactive windows. His solutions include checking Window.isFocused in various painting methods (such as JPanel.getBorder and JLabel.getForeground) and tracking the changes to “Frame.active” client property.
Here are some Swing links that you might have missed during this week:
- Bruce Eckel wonders if anyone really cares about desktop Java, and the responses are mixed. Any established technology has its shortcomings, and it would be short-sighted to assume that the same question will not be asked in five-ten years about Flex. In the meantime, those have have invested in learning Swing produce good-looking and responsive applications.
- Karl Tauber has announced release 4.0 of the JFormDesigner tool for designing Swing user interfaces. New in this version are support for GroupLayout, FormLayout 1.2, improved conversion of IntelliJ forms and more.
- JavaPosse has talked about multi-threading in UI toolkits, and there’s a follow-up discussion on this subject in the Google group of the show.
- Eskil Blomfeldt reports that Qt Jambi AWT bridge has been rewritten to provide better support for window activation and whitespace around embedded components. It sounds that this project faces much the same issues as Albireo (that aims to provide the bridge between Swing and SWT). The Qt Jambi AWT bridge has still some unresolved issues with keyboard focus – something that has been addressed in Albireo.
- Alex Ruiz has announced the first beta for release 1.0 of FEST Swing, a library that provides a fluent interface for functional Swing UI testing.
- JavaSwing.net has a number of useful tutorials on using the JTextField and related classes, including the introduction to DocumentFilter to enforce upper limit on the number of characters, auto-conversion to upper case, number-only content and e-mail content. For more background on using regular expressions in e-mail verification see this article.
- Clemens Eisserer has committed the first changeset for the XRender pipeline under the OpenJDK innovators’ challenge program.
- And finally, Alexander Potochkin writes about the internal implementation of JXLayer‘s event interception on subcomponents in a non-intrusive manner using the InputContext class.
Here are some Swing links that you might have missed during this week:
- Clemens Eisserer continues working on the XRender pipeline for Java2D, and has a few screenshots showing the progress of this project. Part 1, part 2 and part 3 show different test applications under this pipeline.
- A message from Richard Bair on the mailing list of AppFramework (reference implementation of JSR 296) announces that Alex Potochkin has taken over the ownership of this project. The time indeed has arrived – the last source commit was in October 2007, and while Alex hasn’t posted any message on the mailing list / his blog, i would assume that he is taking his time making himself familiar with the project itself and the JCP / JSR process in general.
- Alex himself continues writing about the JXLayer project and talks about the internal painting implementation in his latest entry. Jing Ge has a follow up entry in which he builds a complete validation module using BeansBinding, JXLayer and Hibernate Validator.
- Xavier Young has a short introduction for using the EaSynth look-and-feel.
- Ethan Nicholas introduces the JavaCSS project that aims to provide CSS support for styling Swing and JavaFX components. While the amount of comments on this entry indicates a significant level of interest in this project, it would be interesting to see how well will it be able to cope with the expectations implied by using the “CSS” in its name. As mentioned by Ben Galbraith in his JavaOne 2006 session, Swing and HTML are sufficiently different in that you can not take the existing “pure” CSS directives and apply them on Swing components. In addition, implementing the layout constructs of CSS may require changing the existing application layout managers. Throw the look-and-feel layer into the mix (don’t forget that the look-and-feel is responsible for computing the inner metrics of Swing components, such as margings, padding, gaps, etc), and you get quite an interesting challenge.
- Ken Orr writes about unified toolbar buttons in his quest to emulate the appearance of native Mac applications. Surprisingly, this entry features a rather questionable advice on using the SwingUtilities2 class. Not sure about the Apple VM, but this is a strict no-no for even Sun VMs. Not only this class is in an internal sun package, it has also changed location between JDK 5.0 and JDK 6.0. What’s the alternative for SwingUtilities2.drawStringUnderlineCharAt? Call BasicGraphicsUtils.drawStringUnderlineCharAt and install the desktop rendering hints before that.
- This is most probably will be a part of the next weekly JDK 7 build. Bug 6725214 on forward-porting the new D3D rendering pipeline from 6u10 has been marked as Fix delivered. For the brave souls wishing to venture into the implementation details, follow this Mercurial changeset. No word yet on porting the support for shaped and translucent windows and which package that might end up in.
- Jacek Furmankiewicz continues working on the Java SwingBuilder project, and this time he writes about adding an SWT-style API for creating menus.
- And finally, Richard Kennard adds component wiring based on Commons JEXL to his MetaWidget project, aiming at those environments that don’t have expression languages built into the language (such as Swing).