<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Griffon Cast &#187; todd</title>
	<atom:link href="http://www.griffoncast.com/author/todd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.griffoncast.com</link>
	<description>Screencasts for the Griffon project</description>
	<lastBuildDate>Mon, 16 Nov 2009 15:08:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Episode 2</title>
		<link>http://www.griffoncast.com/episode-2/</link>
		<comments>http://www.griffoncast.com/episode-2/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 15:07:12 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[Screen Cast]]></category>

		<guid isPermaLink="false">http://www.griffoncast.com/?p=15</guid>
		<description><![CDATA[In this second episode of the Griffon Screencast project, we explore Convention over Configuration, Installing Griffon on both Mac OS/X and Windows and finish up with a discussion about threading concepts.]]></description>
			<content:encoded><![CDATA[<h1>Show notes for Episode 2</h1>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7635811&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=7635811&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object></p>
<p>You can watch it here or if you prefer, you can <a href="http://www.griffoncast.com/files/gc-2-1512x946.mov">download</a> a higher resolution version (quicktime).</p>
<h2>Convention Over Configuration</h2>
<p><a href="http://en.wikipedia.org/wiki/Convention_over_configuration">http://en.wikipedia.org/wiki/Convention_over_configuration</a><br />
Code Conventions for the Java Programming Language <a href="http://java.sun.com/docs/codeconv/">http://java.sun.com/docs/codeconv/</a></p>
<h2>Installing Griffon</h2>
<p><a href="http://griffon.codehaus.org/Download">http://griffon.codehaus.org/Download</a><br />
Java SE Installers (Windows/Linux) <a href="http://java.sun.com/javase/downloads/index.jsp">http://java.sun.com/javase/downloads/index.jsp</a></p>
<h2>Threading</h2>
<p>Event Dispatch Thread (EDT) <a href="http://en.wikipedia.org/wiki/Event_dispatching_thread">http://en.wikipedia.org/wiki/Event_dispatching_thread</a><br />
Swing Utilities <a href="http://java.sun.com/javase/6/docs/api/javax/swing/SwingUtilities.html">http://java.sun.com/javase/6/docs/api/javax/swing/SwingUtilities.html</a><br />
JBusy Component &#8211; <a href="http://code.google.com/p/jbusycomponent/"> http://code.google.com/p/jbusycomponent/</a></p>
<h3>Episode2View.groovy</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>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
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.awt.BorderLayout</span>
&nbsp;
actions <span style="color: #009900;">&#123;</span>
  action<span style="color: #009900;">&#40;</span>id<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;executeAction&quot;</span>,
          name<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;Execute&quot;</span>,
          mnemonic<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;E&quot;</span>, accelerator<span style="color: #339933;">:</span> shortcut<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;E&quot;</span><span style="color: #009900;">&#41;</span>, closure<span style="color: #339933;">:</span> controller.<span style="color: #006633;">executeDirectoryList</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#125;</span>
application<span style="color: #009900;">&#40;</span>title<span style="color: #339933;">:</span> <span style="color: #0000ff;">'Episode 2'</span>,
        size<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">480</span>, <span style="color: #cc66cc;">320</span><span style="color: #009900;">&#93;</span>,
        <span style="color: #666666; font-style: italic;">// pack: true,</span>
        <span style="color: #666666; font-style: italic;">//location:[50,50],</span>
        locationByPlatform<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">true</span>,
        iconImage<span style="color: #339933;">:</span> imageIcon<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/griffon-icon-48x48.png'</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">image</span>,
        iconImages<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>imageIcon<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/griffon-icon-48x48.png'</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">image</span>,
                imageIcon<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/griffon-icon-32x32.png'</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">image</span>,
                imageIcon<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/griffon-icon-16x16.png'</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">image</span><span style="color: #009900;">&#93;</span>
<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  tabbedPane<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    busyComponent<span style="color: #009900;">&#40;</span>name<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;Tab 1&quot;</span>, id<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;c1&quot;</span>, constraints<span style="color: #339933;">:</span> <span style="color: #003399;">BorderLayout</span>.<span style="color: #006633;">CENTER</span>, busy<span style="color: #339933;">:</span> bind <span style="color: #009900;">&#123;</span>model.<span style="color: #006633;">loading</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      busyModel<span style="color: #009900;">&#40;</span>description<span style="color: #339933;">:</span><span style="color: #0000ff;">&quot;Loading...&quot;</span><span style="color: #009900;">&#41;</span>
      panel<span style="color: #009900;">&#40;</span>name<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;Tab 1&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        borderLayout<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
        scrollPane<span style="color: #009900;">&#40;</span>constraints<span style="color: #339933;">:</span> CENTER<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          textArea<span style="color: #009900;">&#40;</span>id<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;results&quot;</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#125;</span>
        hbox<span style="color: #009900;">&#40;</span>constraints<span style="color: #339933;">:</span> SOUTH<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          button<span style="color: #009900;">&#40;</span>executeAction<span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#125;</span>
      <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    panel<span style="color: #009900;">&#40;</span>name<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;Tab 2&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h3>Episode2Model.groovy</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">groovy.beans.Bindable</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Episode2Model <span style="color: #009900;">&#123;</span>
    @Bindable <span style="color: #003399;">Boolean</span> loading
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h3>Episode2Controller.groovy</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> Episode2Controller <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">// these will be injected by Griffon</span>
  def model
  def view
&nbsp;
  <span style="color: #000066; font-weight: bold;">void</span> mvcGroupInit<span style="color: #009900;">&#40;</span><span style="color: #003399;">Map</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// this method is called after model and view are injected</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
  def executeDirectoryList <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>evt <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">-&gt;</span>
    model.<span style="color: #006633;">loading</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">true</span>
    doOutside <span style="color: #009900;">&#123;</span>
      <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
        def result <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ls -laR /Library/Documentation&quot;</span>.<span style="color: #006633;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">text</span>
        edt <span style="color: #009900;">&#123;</span>
          view.<span style="color: #006633;">results</span>.<span style="color: #006633;">text</span> <span style="color: #339933;">=</span> result
        <span style="color: #009900;">&#125;</span>
      <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">finally</span> <span style="color: #009900;">&#123;</span>
        model.<span style="color: #006633;">loading</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span>
      <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.griffoncast.com/episode-2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
<enclosure url="http://www.griffoncast.com/files/gc-2-1512x946.mov" length="155954072" type="video/quicktime" />
		</item>
		<item>
		<title>Episode 1</title>
		<link>http://www.griffoncast.com/episode-1/</link>
		<comments>http://www.griffoncast.com/episode-1/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 14:39:41 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[Screen Cast]]></category>

		<guid isPermaLink="false">http://www.griffoncast.com/?p=3</guid>
		<description><![CDATA[The inaugural GriffonCast screen cast is available.]]></description>
			<content:encoded><![CDATA[<p>The inaugural GriffonCast screen cast is available. You can watch it here or if you prefer, you can <a href="http://www.griffoncast.com/files/GC1-1280x720.mov">download</a> a higher resolution version (quicktime).</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=6586435&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=6586435&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://vimeo.com/6586435"></a></p>
<p><a href="http://www.griffoncast.com/files/GroovyEdit.zip">Download</a> the example project we build in the screencast.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.griffoncast.com/episode-1/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
<enclosure url="http://www.griffoncast.com/files/GC1-1280x720.mov" length="287611492" type="video/quicktime" />
		</item>
	</channel>
</rss>
