Episode 2
Posted on 16. Nov, 2009 by todd in Screen Cast
Show notes for Episode 2
You can watch it here or if you prefer, you can download a higher resolution version (quicktime).
Convention Over Configuration
http://en.wikipedia.org/wiki/Convention_over_configuration
Code Conventions for the Java Programming Language http://java.sun.com/docs/codeconv/
Installing Griffon
http://griffon.codehaus.org/Download
Java SE Installers (Windows/Linux) http://java.sun.com/javase/downloads/index.jsp
Threading
Event Dispatch Thread (EDT) http://en.wikipedia.org/wiki/Event_dispatching_thread
Swing Utilities http://java.sun.com/javase/6/docs/api/javax/swing/SwingUtilities.html
JBusy Component – http://code.google.com/p/jbusycomponent/
Episode2View.groovy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | import java.awt.BorderLayout actions { action(id: "executeAction", name: "Execute", mnemonic: "E", accelerator: shortcut("E"), closure: controller.executeDirectoryList) } application(title: 'Episode 2', size: [480, 320], // pack: true, //location:[50,50], locationByPlatform: true, iconImage: imageIcon('/griffon-icon-48x48.png').image, iconImages: [imageIcon('/griffon-icon-48x48.png').image, imageIcon('/griffon-icon-32x32.png').image, imageIcon('/griffon-icon-16x16.png').image] ) { tabbedPane() { busyComponent(name: "Tab 1", id: "c1", constraints: BorderLayout.CENTER, busy: bind {model.loading}) { busyModel(description:"Loading...") panel(name: "Tab 1") { borderLayout() scrollPane(constraints: CENTER) { textArea(id: "results") } hbox(constraints: SOUTH) { button(executeAction) } } } panel(name: "Tab 2") { } } } |
Episode2Model.groovy
1 2 3 4 5 | import groovy.beans.Bindable class Episode2Model { @Bindable Boolean loading } |
Episode2Controller.groovy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | class Episode2Controller { // these will be injected by Griffon def model def view void mvcGroupInit(Map args) { // this method is called after model and view are injected } def executeDirectoryList = {evt = null -> model.loading = true doOutside { try { def result = "ls -laR /Library/Documentation".execute().text edt { view.results.text = result } } finally { model.loading = false } } } |


Tweets that mention Episode 2 | Griffon Cast -- Topsy.com
16. Nov, 2009
[...] This post was mentioned on Twitter by vaclav_pech, ToddCostella. ToddCostella said: The second episode of the GriffonCast available at http://tinyurl.com/yf7hpte. Convention over configuration, installing and threading [...]
GriffonNoob
17. Nov, 2009
Again a great episode!
How about a small ‘real life’ application in the next screencast?
Raj
21. Nov, 2009
Great to see some screencasts on Griffon. Thanks for your efforts.
Some suggestions:
1) I just could not hear any audio. ( Even at max volume ). Just a faint whisper. ( Admittedly i have a pretty average set of speaker ) If you could record it at a higher volume, that would be great. It’s easy to reduce the volume if folks think it’s too high – but not the other way around.
2) If you could magnify the command-line inputs you give, it would help to see what’s going on. When you have a high-res monitor and you sit in front of it, things might look good – but it’s difficult to see what you are typing.
3) It would also be nice to see some simple but complete applications built. Could be some simple utility or tool.
On the whole, thanks for all the hard work you’ve put into these screencasts. I appreciate it.
Griffon Cast – Episode 2 | Software Development Videos
07. Dec, 2009
[...] Source code [...]
Griffon Cast – Episode 2 | Java™ Software Development Videos and Tutorials Directory
07. Dec, 2009
[...] Source code [...]
Fabian
22. Dec, 2009
Nice and useful introduction to griffon. The only catch is that the volume is way to low. I don’t have headphones with me and have a very hard time understanding you. But thanks for the time and effort you put into this!