But there were other features, albeit smaller, that found a new home on this release which will be described here.
Client Properties
The first is the ability to set client properties on a node using the same notation as a regular property. As you may know, Swing components have the capacity to set/retrieve any custom property you need, often paired with Look&Feel tweaks. Previous to this addition you had to write something likeBasically you had to save a reference to the component and then set the value of the custom property, now you'll be able to do the following
Neat! in case the property's name requires a non-identifier character (like a dot (.)) just surround the whole key with quotes. If you need to set several client properties on the same component you can also use the following syntax
Much better if you ask me, all properties can now be handled consistently.
Noparent node
Sometimes you'll need to tweak a component using the node syntax, i.e, for quick properties update. The sad thing of the story is that most nodes will inject the component right away in the current hierarchy (which is exactly what you'd expected in a normal scenario). For those cases where you do not want the hierarchy updated use the noparent node, here is an example using SwingxtrasBuilderIf it weren't for this new node the rssIcon label would've been added to the parent vbox instead.
KeyStrokeAction shortcut
How many times have you registered an action on a JComponent that must be triggered by a KeyStroke? I can assure you the task gets tiresome by the third or fourth time, there should be a simpler way than thisWouldn't it be sweeter if the following were to be allowed instead?
Nice! of course keyStrokeAction will let you configure different values for condition: and actionKey: if you need others than the default ones.
Bash command auto-completion
You can take advantage of bash command auto-completion if you work on a UNIX based environment (or cygwin if you're stuck with Windows
The node features described here may eventually find their way into SwingBuilder proper, which proves that Griffon's codebase is a good testing ground for new builder features.
Keep on Groovying!