Griffon GUI Builder Options
Recently I experimented with Griffon with a view to replacing a Swing application created in Eclipse Visual Builder. Having got my head around Groovy and Grails already, I can say that it was fun. However not being much of a Swing programmer, the main problem I had was building a layout. I mean when you come from a non-Swing background, how are you supposed to build a layout for anything more complicated that the 3-widget panels that are in all the examples on the internet?
So I asked the mailing list: When the layout is at least of medium complexity, is Griffon a realistic option for a new Swing developer and developers who are very accustomed to using a WYSIWYG? How does one get going? Are any WYSIWYGs in the works?
Here come the answers:
AlbeilleForm Integration
"You might want to check out the AbeilleForm forms. It is an Open source WYSIWYG builder. Griffon has a plugin to help integrate the Abeille Forms into griffon. I have include a couple of links that should help."
- https://abeille.dev.java.net/
- http://jshingler.blogspot.com/2009/06/ann-abeilleform-builder-01-griffon.html
- http://griffon.codehaus.org/AbeilleformBuilder+Plugin
- http://griffon.codehaus.org/AbeilleFormBuilder
- Jim Shingler
Mattise with Griffon
"You could also use Matisse. As Danno recently noted in a tweet: 'Buid the visual in NetBeans with Matisse, then griffon generate-view-script <class name> to wire stuff up.'
"Personally I do all my layouts by hand using MigLayout which a easy to use rows and cols LayoutManager that lets you tweak the individual cells. This SwingX Painter demo (pre-Griffon so excuse the fact that the directories are different) is based on demo done in Matisse.
"It is a complex layout but readable. You might also notice that I made a slight nod to oldschool HTML by using panels like tables to position elements."
- James Williams
"Is there a Matisse-Griffon Integration Tutorial?"
- asked Lee.
"Not that I am aware of. One should be written. It's not terribly difficult but would requre screenshots and patter to make good.
"Go to matisse, create a view and save it as some name, like org.example.MatissePanel
"in the command line:
griffon create-mvc-group org.example.GriffonMVCGroupgriffon create-view-script org.example.MatissePanel org.example.GriffonMVCGroupView- ( or
griffon create-view-script org.example.MatissePanel -view=org.example.GriffonMVCGroupView)
"Then you have the view script with references to the Matisse class and such, kinda like this except we have a noparent { } element wrapping it. In fact the WeatherWidget sample in 0.2 uses matise for the preferences panel.
"if you just call 'griffon create-view-script <FooClass>' then the view will be <FooClass>View"
- Danno Ferrin
And that, my dear reader is that.
Parting Thoughts on Griffon
Griffon is an exciting development in Swing-land. Java doesn't seem to be doing much at all with Swing and the advent of JavaFX just added more fears to the blogosphere that Java might one day totally move away from it. There don't appear to be many Swing tooling projects currently being developed by enthusiastic teams.
In that landscape Griffon is a breath of fresh air - plenty of momentum, vision, and enthusiasm. The concept is also fairly cutting edge considering the recent "Rails-like framework" popularity. These guys are even writing a book. I believe that if they keep up the momentum which they have with this project then they will increasingly gain users and most likely reach a point where Griffon becomes a compelling option even for previously non-Swing developers. So well done so far to the team, and keep going!Griff
Add new comment