 |
First release of JSR 296
Posted by joshy on January 30, 2007 at 04:08 PM | Comments (5)
Hans just announced the first prototype implementation of JSR 296, the Swing Application Framework. I'm very excited about this because it will make Swing applications a lot easier to build and more maintainable. I'm even more excited because we will have top notch support for JSR 296 in NetBeans 6.0. I know this because I'm one of the developers working on it.
Our current work in NetBeans isn't very usable yet, but I thought I'd give you a few screenshots to let you see how it's developing.
Using JSR 296 you can create actions from plain methods by using the @Action annotation. Once you have done this NetBeans can search through your application to find all actions and then let you edit them.
There are three ways to work with Actions. First, you can select from a list of known actions in the property sheet (Fig 1)

Fig 1: the Action Property Editor in the property sheet
Second you can press the '...' button to open the full Action Property Editor dialog.(Fig 2)
 Fig 2: the Action Property Editor Dialog
And finally you can use the global action list to see all actions and edit them. (Fig 3)
 Fig 3: the Global Action List
Coming soon, more Swing Labs updates!
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
Sounds cool. I worked alot in this area. A good tool can be a true winner.
Posted by: herkules on January 31, 2007 at 12:20 PM
-
Nice! cool tool!
Posted by: greenido on January 31, 2007 at 04:31 PM
-
Will I be able to get it to dynamically load internationalised names and tooltips from resource bundles at runtime? And how do I enter an accelerator in to that text field?
Posted by: benloud on January 31, 2007 at 05:51 PM
-
Hey Josh, just a quick thanks for your Magnifying Glass code (I also snagged the Screenshot capture). I can guarantee they are going to good use (and what do you know, it will be open source).
Posted by: aronsmith on February 02, 2007 at 06:40 PM
-
benloud The app framework will automatically load bundles at runtime from the right locale. In Netbeans you can set your current locale and NB will store these action settings in the right place (the same with non-action properties like the text of a label). You can then switch your Locale in Netbeans and then go back and change the strings. Alternatively, since NB will store all of the resource bundles in known standard locations, you can just start stuffing your own properties files in the right places or use some other translation tool that outputs properties files. This would be good if you wanted to hand translation off to someone who isn't one of your programmers (which is likely a good idea).
benloud, the accelerator text field accepts the same syntax as the javax.swing.KeyStroke class. Something like 'meta shift A' would give you 'Command Shift A' on the Mac. In the future this text field will probably be replaced by something more intuitive than that syntax. Perhaps letting you simply press the desired key and then modify it with some checkboxes. Keep in mind, all of this is in flux and we will really want your input once we merge back to HEAD and get more outside testers. We look forward to your contributions!
aronsmmith: I'm glad to see you liked them. You should post links to demos or screenshots of what you end up doing with them. Thanks!
Posted by: joshy on February 03, 2007 at 08:57 AM
|