<?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>Silveira Neto &#187; vídeo</title>
	<atom:link href="http://silveiraneto.net/tag/video/feed/" rel="self" type="application/rss+xml" />
	<link>http://silveiraneto.net</link>
	<description>the world is a pixel</description>
	<lastBuildDate>Sun, 08 Jan 2012 05:17:57 +0000</lastBuildDate>
	<language>pt-br</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>jam over jobim</title>
		<link>http://silveiraneto.net/2010/12/10/jamming-over-jobim/</link>
		<comments>http://silveiraneto.net/2010/12/10/jamming-over-jobim/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 20:42:00 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[black and white]]></category>
		<category><![CDATA[carlos kaplan]]></category>
		<category><![CDATA[room]]></category>
		<category><![CDATA[samba de uma nota só]]></category>
		<category><![CDATA[Silveira Neto]]></category>
		<category><![CDATA[tom jobim]]></category>
		<category><![CDATA[vídeo]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=3586</guid>
		<description><![CDATA[My friend Carlos Kaplan on keyboards and me on accustic guitar, jam session over &#8220;Samba de Uma Nota Só&#8221; by Tom Jobim. At my room in Maryland.]]></description>
			<content:encoded><![CDATA[<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/7hElQ6SfqoY?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/7hElQ6SfqoY?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p>My friend Carlos Kaplan on keyboards and me on accustic guitar, jam session over &#8220;Samba de Uma Nota Só&#8221; by Tom Jobim.<br />
At my room in Maryland.</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2010/12/10/jamming-over-jobim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Life = Risk</title>
		<link>http://silveiraneto.net/2010/04/12/life-risk/</link>
		<comments>http://silveiraneto.net/2010/04/12/life-risk/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 16:20:45 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[inspirational]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[risk]]></category>
		<category><![CDATA[vídeo]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=3309</guid>
		<description><![CDATA[A simple and beautiful video about the early failures, things and people that tries to put you down and we have to face before achieve what we really want. &#8220;If you never failed, you never lived&#8221;]]></description>
			<content:encoded><![CDATA[<p>A simple and beautiful video about the early failures, things and people that tries to put you down and we have to face  before achieve what we really want.</p>
<p><center><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/noDbA_R5x8A&#038;hl=pt_BR&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/noDbA_R5x8A&#038;hl=pt_BR&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></center></p>
<p>&#8220;If you never failed, you never lived&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2010/04/12/life-risk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Casa Brasil na TV</title>
		<link>http://silveiraneto.net/2009/03/05/casa-brasil-na-tv/</link>
		<comments>http://silveiraneto.net/2009/03/05/casa-brasil-na-tv/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 13:36:46 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[português]]></category>
		<category><![CDATA[bastidores]]></category>
		<category><![CDATA[Casa Brasil]]></category>
		<category><![CDATA[globo]]></category>
		<category><![CDATA[Making off]]></category>
		<category><![CDATA[TV]]></category>
		<category><![CDATA[TV CE]]></category>
		<category><![CDATA[vídeo]]></category>
		<category><![CDATA[Verdes Mares]]></category>
		<category><![CDATA[Vitória]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=2373</guid>
		<description><![CDATA[Esse é uma amostras dos bastidores do que rolou nas filmagens nessa terça-feira na Casa Brasil unidade Vila União. As filmagens são por mim e pela pequena Vitória de apenas 5 anos. =) A reportagem vai ao ar no canal da Globo, esse sábado ao meio dia. Não percam! Atualizado em 7 de Março: Algumas [...]]]></description>
			<content:encoded><![CDATA[<p>Esse é uma amostras dos bastidores do que rolou nas filmagens nessa terça-feira na Casa Brasil unidade Vila União. As filmagens são por mim e pela pequena Vitória de apenas 5 anos. =)</p>
<p style="text-align: center;"><object width="425" height="344" data="http://www.youtube.com/v/y7KHOr4lrxI&amp;hl=pt-br&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/y7KHOr4lrxI&amp;hl=pt-br&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
<p>A reportagem vai ao ar no canal da Globo, esse sábado ao meio dia. Não percam!</p>
<p><strong>Atualizado em 7 de Março:</strong></p>
<p>Algumas fotos dos bastidores da gravação.</p>
<p><a href="http://www.flickr.com/photos/silveiraneto/3328235634/" title="Reportagem by Silveira Neto, on Flickr"><img src="http://farm4.static.flickr.com/3336/3328235634_4f99c7e403_s.jpg" width="75" height="75" alt="Reportagem" /></a> <a href="http://www.flickr.com/photos/silveiraneto/3328231826/" title="Reportagem by Silveira Neto, on Flickr"><img src="http://farm4.static.flickr.com/3657/3328231826_efc9631c8a_s.jpg" width="75" height="75" alt="Reportagem" /></a> <a href="http://www.flickr.com/photos/silveiraneto/3327400351/" title="Reportagem by Silveira Neto, on Flickr"><img src="http://farm4.static.flickr.com/3551/3327400351_b51226e4f4_s.jpg" width="75" height="75" alt="Reportagem" /></a> <a href="http://www.flickr.com/photos/silveiraneto/3328231022/" title="Globo? by Silveira Neto, on Flickr"><img src="http://farm4.static.flickr.com/3362/3328231022_6727577c9a_t.jpg" width="100" height="75" alt="Globo?" /></a> <a href="http://www.flickr.com/photos/silveiraneto/3328232134/" title="Reportagem by Silveira Neto, on Flickr"><img src="http://farm4.static.flickr.com/3391/3328232134_acf96f15ee_s.jpg" width="75" height="75" alt="Reportagem" /></a> <a href="http://www.flickr.com/photos/silveiraneto/3327398565/" title="Reportagem by Silveira Neto, on Flickr"><img src="http://farm4.static.flickr.com/3298/3327398565_f8e47cfa5a_s.jpg" width="75" height="75" alt="Reportagem" /></a></p>
<p>Pra quem não assistiu na TV, eu gravei com a câmera, aqui está.</p>
<p style="text-align: center;"><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/c-mqgOWMI3k&#038;hl=pt-br&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/c-mqgOWMI3k&#038;hl=pt-br&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
<p><strong>Download:</strong> <a href="http://silveiraneto.net/downloads/cbvilauniaonatv.ogg">cbvilauniaonatv.ogg</a></p>
<p>Parabéns Alyne, Alexandra, Leonardo e todos, vocês foram ótimos!</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2009/03/05/casa-brasil-na-tv/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mechanical Watch Source Code</title>
		<link>http://silveiraneto.net/2009/01/17/mechanical-watch-source-code/</link>
		<comments>http://silveiraneto.net/2009/01/17/mechanical-watch-source-code/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 01:01:53 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[clock]]></category>
		<category><![CDATA[how things works]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[vídeo]]></category>
		<category><![CDATA[watch]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=2192</guid>
		<description><![CDATA[Video from produced in 1949 by Hamilton Watch Company explains how a mechanical clock works. Worth see.]]></description>
			<content:encoded><![CDATA[<p>Video from produced in 1949 by<span> <a title="Their website" href="http://www.hamiltonwatch.com/webapp/en-us/">Hamilton Watch Company</a> explains how a mechanical clock works. Worth see.</span></p>
<p style="text-align: center;"><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/OiCPu0SjEW4&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/OiCPu0SjEW4&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2009/01/17/mechanical-watch-source-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Shhh, HD running!</title>
		<link>http://silveiraneto.net/2009/01/02/shhh-hd-running/</link>
		<comments>http://silveiraneto.net/2009/01/02/shhh-hd-running/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 23:18:09 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[DTrace]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[IO]]></category>
		<category><![CDATA[Opensolaris]]></category>
		<category><![CDATA[shout]]></category>
		<category><![CDATA[vídeo]]></category>
		<category><![CDATA[yell]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=2052</guid>
		<description><![CDATA[Brendan Gregg made an unusual discovery, shouting a HD produces pikes of latency. We&#8217;ll see sound proof data centers now? Another point to solid-state drivers. I wonder if playing loud music near my computer makes IO slower.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-2053 aligncenter" title="kid shouting sun server" src="http://silveiraneto.net/wp-content/uploads/2009/01/kid_shouting_sun_server.jpg" alt="kid shouting sun server" width="333" height="293" /></p>
<p><a title="Brendan's Blog" href="http://blogs.sun.com/brendan/entry/unusual_disk_latency">Brendan Gregg made an unusual discovery</a>, shouting a HD produces pikes of latency. We&#8217;ll see sound proof data centers now? Another point to solid-state drivers.</p>
<p style="text-align: center;"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/tDacjrSCeq4&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/tDacjrSCeq4&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></object></p>
<p>I wonder if playing loud music near my computer makes IO slower.</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2009/01/02/shhh-hd-running/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gravatar with JavaFX</title>
		<link>http://silveiraneto.net/2008/12/21/gravatar-with-javafx/</link>
		<comments>http://silveiraneto.net/2008/12/21/gravatar-with-javafx/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 23:26:12 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Avatar]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[Gravatar]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[MD5]]></category>
		<category><![CDATA[MD5sum]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[vídeo]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=1974</guid>
		<description><![CDATA[Gravatar is easy way to put global recognized avatar images into any Internet application. Gravatar would stands for globally recognized avatar. Below,  the Java class that I got from the Gravatar Java reference. Here is a static class called md5 that applies a MD5Sum algorithm over a string. Is a little complex code but all [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://gravatar.com">Gravatar</a> is easy way to put global recognized avatar images into any Internet application. Gravatar would stands for <em>globally recognized avatar</em>.</p>
<p style="text-align: center;"><object width="656" height="320" data="http://www.youtube.com/v/VCJeqVkb4bw&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/VCJeqVkb4bw&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
<p>Below,  the Java class that I got from the <a title="Gravatar in Java" href="http://en.gravatar.com/site/implement/java">Gravatar Java reference</a>. Here is a static class called <em>md5</em> that applies a MD5Sum algorithm over a string. Is a little complex code but all behavior keeps encapsulated and who uses it don&#8217;t need to know how it works. Just gives a string and receives a encrypted string. Those two codes are also a good example of how calling Java classes inside a JavaFX code.</p>
<div class="wp_syntax">
<div class="code">
<pre class="java java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">gravatarexample</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.security.MessageDigest</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.UnsupportedEncodingException</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.security.NoSuchAlgorithmException</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MD5 <span style="color: #009900;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #003399;">String</span> toHex<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> message<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #003399;">MessageDigest</span> md <span style="color: #339933;">=</span> <span style="color: #003399;">MessageDigest</span>.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;MD5&quot;</span><span style="color: #009900;">&#41;</span>;
         <span style="color: #000066; font-weight: bold;">byte</span> array<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> md.<span style="color: #006633;">digest</span><span style="color: #009900;">&#40;</span>message.<span style="color: #006633;">getBytes</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;CP1252&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>;
         <span style="color: #003399;">StringBuffer</span> sb <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">StringBuffer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>;
         <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> 0; i <span style="color: #339933;">&amp;</span>lt; array.<span style="color: #006633;">length</span>; <span style="color: #339933;">++</span>i<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            sb.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Integer</span>.<span style="color: #006633;">toHexString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>array<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">&amp;</span>amp;0xFF<span style="color: #009900;">&#41;</span>|0x100<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>;
         <span style="color: #009900;">&#125;</span>
         <span style="color: #000000; font-weight: bold;">return</span> sb.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>;
      <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">NoSuchAlgorithmException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">UnsupportedEncodingException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #009900;">&#125;</span>
      <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">null</span>;
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<p>As a Java class in the same package, any JavaFX (or Java) code can call it without any problem. Just to keep the code more clear I&#8217;m importing it explicitly. Is this example I also create some Swing interface to give user the option to put his mail, adjust the image size and get a output direct link or html image tag.</p>
<div class="wp_syntax">
<div class="code">
<pre class="java java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">gravatarexample</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">gravatarexample.MD5</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.ext.swing.SwingButton</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.ext.swing.SwingSlider</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.ext.swing.SwingTextField</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.scene.image.Image</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.scene.image.ImageView</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.scene.layout.VBox</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.scene.Scene</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.stage.Stage</span>;
&nbsp;
var mail <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Email&quot;</span>;
var key <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span>;
&nbsp;
function gravatalize<span style="color: #009900;">&#40;</span>mail<span style="color: #339933;">:</span><span style="color: #003399;">String</span>, size<span style="color: #339933;">:</span> <span style="color: #003399;">Integer</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #003399;">String</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #0000ff;">&quot;http://www.gravatar.com/avatar/{MD5.toHex(mail)}?s={size}&quot;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
var inputtxt <span style="color: #339933;">=</span> SwingTextField <span style="color: #009900;">&#123;</span>
   columns<span style="color: #339933;">:</span> <span style="color: #cc66cc;">20</span>
   text<span style="color: #339933;">:</span> mail
<span style="color: #009900;">&#125;</span>
&nbsp;
var slider <span style="color: #339933;">=</span> SwingSlider <span style="color: #009900;">&#123;</span>
   minimum<span style="color: #339933;">:</span> <span style="color: #cc66cc;">10</span>
   maximum<span style="color: #339933;">:</span> <span style="color: #cc66cc;">128</span>
   value<span style="color: #339933;">:</span> <span style="color: #cc66cc;">100</span>
   vertical<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">false</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
var button <span style="color: #339933;">=</span> SwingButton <span style="color: #009900;">&#123;</span>
   text<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;Get Gravatar&quot;</span>
   action<span style="color: #339933;">:</span> function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      key <span style="color: #339933;">=</span> gravatalize<span style="color: #009900;">&#40;</span>inputtxt.<span style="color: #006633;">text</span>, slider.<span style="color: #006633;">value</span><span style="color: #009900;">&#41;</span>;
      directoutput.<span style="color: #006633;">text</span> <span style="color: #339933;">=</span> key;
      htmloutput.<span style="color: #006633;">text</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;img src=&quot;</span><span style="color: #009900;">&#123;</span>key<span style="color: #009900;">&#125;</span><span style="color: #0000ff;">&quot; alt=&quot;</span>\<span style="color: #339933;">&amp;</span>quot;gravatar\<span style="color: #339933;">&amp;</span>quot;<span style="color: #0000ff;">&quot; /&gt;&quot;</span>;
      photo.<span style="color: #006633;">image</span> <span style="color: #339933;">=</span> <span style="color: #003399;">Image</span> <span style="color: #009900;">&#123;</span>
         backgroundLoading<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">true</span>,
         url<span style="color: #339933;">:</span> key<span style="color: #009900;">&#125;</span>;
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
var photo<span style="color: #339933;">:</span>ImageView <span style="color: #339933;">=</span> ImageView <span style="color: #009900;">&#123;</span>
   image<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">null</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
var directoutput <span style="color: #339933;">=</span> SwingTextField <span style="color: #009900;">&#123;</span>
   columns<span style="color: #339933;">:</span> <span style="color: #cc66cc;">20</span>
   text<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;direct link image&quot;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
var htmloutput <span style="color: #339933;">=</span> SwingTextField <span style="color: #009900;">&#123;</span>
   columns<span style="color: #339933;">:</span> <span style="color: #cc66cc;">20</span>
   text<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;html tag image&quot;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
Stage <span style="color: #009900;">&#123;</span>
   title<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;Gravatar&quot;</span>
   width<span style="color: #339933;">:</span> <span style="color: #cc66cc;">300</span>
   height<span style="color: #339933;">:</span> <span style="color: #cc66cc;">340</span>
   scene<span style="color: #339933;">:</span> Scene <span style="color: #009900;">&#123;</span>
      content<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
         VBox <span style="color: #009900;">&#123;</span>
            spacing<span style="color: #339933;">:</span> <span style="color: #cc66cc;">10</span>
            content<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>inputtxt, slider, button, directoutput, htmloutput, photo<span style="color: #009900;">&#93;</span>
         <span style="color: #009900;">&#125;</span>,
      <span style="color: #009900;">&#93;</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<p>The string itself is assembled in the <em>gravatalize</em> function. You give a mail and it&#8217;s returns a Gravatar direct link to the image. There&#8217;s many cool ways to use together Gravatar and a JavaFX Internet application.</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2008/12/21/gravatar-with-javafx/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>JavaFX SDK 1.0 on Linux</title>
		<link>http://silveiraneto.net/2008/12/06/javafx-sdk-10-on-linux/</link>
		<comments>http://silveiraneto.net/2008/12/06/javafx-sdk-10-on-linux/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 07:15:35 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[jfx]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[openjfx]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unofficial]]></category>
		<category><![CDATA[vídeo]]></category>
		<category><![CDATA[Weiqi Gao]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=1853</guid>
		<description><![CDATA[JavaFX 1.0 is out and is absolutely amazing. You guys did really a great work on it. As I really need a working SDK on Linux to continue to study and I don&#8217;t have any Windows/Mac near me, I&#8217;m using the Weiqi Gao&#8217;s workaround. I tried to simplify a little bit more the process for [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://javafx.com">JavaFX 1.0</a> is out and is absolutely amazing. You guys did really a great work on it.</p>
<p style="text-align: center;"><a title="JavaFX Site" href="http://javafx.com"><img class="size-full wp-image-1854 aligncenter" title="javafx site" src="http://silveiraneto.net/wp-content/uploads/2008/12/javafxsite.png" alt="" width="400" height="311" /></a></p>
<p>As I really need a working SDK on Linux to continue to study and I don&#8217;t have any Windows/Mac near me, I&#8217;m using the <a title="Weiqigao Blog" href="http://www.weiqigao.com/blog/2008/08/05/watch_javafx_sdk_run_on_linux.html">Weiqi Gao&#8217;s workaround</a>. I tried to simplify a little bit more the process for those who need JavaFX SDK working on Linux right now.</p>
<p><strong>Download</strong> <a title="JavaFX for Linux" href="http://silveiraneto.net/downloads/javafxsdk_linux_unofficial.tar.bz2">javafxsdk_linux_unofficial.tar.bz2</a> (~18Mb).</p>
<p>And then</p>
<blockquote><p>tar -xjvf javafxsdk_linux_unofficial.tar.bz2<br />
sudo cp javafx /opt/javafx<br />
echo &#8220;PATH=\$PATH:/opt/javafx/bin&#8221; &gt;&gt; ~/.profile<br />
echo &#8220;JAVAFX_HOME=/opt/javafx&#8221; &gt;&gt; ~/.profile<br />
source ~/.profile</p></blockquote>
<p>Now you can call javafx, javafxc, javafxdoc and javafxpackager from your terminal. Don&#8217;t forget that you need Java 1.6 or greater installed.</p>
<p>Here&#8217;s a video showing the SDK working, I&#8217;m compiling and running two sample applications. Remeber that as a temporary unofficial port for Linux, there&#8217;s not native video support nor hardware acceleration.</p>
<p style="text-align: center;"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/ENf5mXEIiD8&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/ENf5mXEIiD8&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></object></p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2008/12/06/javafx-sdk-10-on-linux/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Un P&#8217;tit Café</title>
		<link>http://silveiraneto.net/2008/12/03/un-ptit-cafe/</link>
		<comments>http://silveiraneto.net/2008/12/03/un-ptit-cafe/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 01:22:11 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[français]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[Café]]></category>
		<category><![CDATA[Monsier D]]></category>
		<category><![CDATA[Odelaf]]></category>
		<category><![CDATA[vídeo]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=1834</guid>
		<description><![CDATA[Par Odelaf e Monsier D. Lyrique: Pour bien commencer Ma petite journée Et me réveiller Moi, j&#8217;ai pris un café Un arabica Noir et bien corsé J&#8217;enfile ma parka Ça y est je peux y aller «Où est-ce que tu vas ?» Me crie mon aimée «Prenons un kawa Je viens de me lever» Étant [...]]]></description>
			<content:encoded><![CDATA[<p>Par <a href="http://oldelafetmonsieurd.free.fr/">Odelaf e Monsier D</a>.</p>
<p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/eFnvxOmm6tc&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/eFnvxOmm6tc&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></object></p>
<p>Lyrique:</p>
<blockquote><p>Pour bien commencer<br />
Ma petite journée<br />
Et me réveiller<br />
Moi, j&#8217;ai pris un café<br />
Un arabica<br />
Noir et bien corsé<br />
J&#8217;enfile ma parka<br />
Ça y est je peux y aller</p>
<p>«Où est-ce que tu vas ?»<br />
Me crie mon aimée<br />
«Prenons un kawa<br />
Je viens de me lever»<br />
Étant en avance<br />
Et un peu forcé<br />
Je change de sens<br />
Et reprends un café</p>
<p>A huit heures moins l&#8217;quart<br />
Faut bien l&#8217;avouer<br />
Les bureaux sont vides<br />
On pourrait s&#8217;ennuyer<br />
Mais je reste calme<br />
Je sais m&#8217;adapter<br />
Le temps qu&#8217;ils arrivent<br />
J&#8217;ai l&#8217;temps pour un café</p>
<p>La journée s&#8217;emballe<br />
Tout le monde peut bosser<br />
Au moins jusqu&#8217;à l&#8217;heure<br />
De la pause-café<br />
Ma secrétaire entre :<br />
«Fort comme vous l&#8217;aimez»<br />
Ah mince, j&#8217;viens d&#8217;en prendre<br />
Mais maintenant qu&#8217;il est fait&#8230;</p>
<p>Un repas d&#8217;affaire<br />
Tout près du Sentier<br />
Il fait un temps super<br />
Mais je me sens stressé<br />
Mes collègues se marrent :<br />
«Détends-toi, René !<br />
Prends un bon cigare<br />
Et un p&#8217;tit café&#8230;»</p>
<p>Une fois fini<br />
Mes collègues crevés<br />
Appellent un taxi<br />
Mais moi j&#8217;ai envie d&#8217;sauter<br />
Je fais tout Paris<br />
Puis je vois un troquet<br />
J&#8217;commande un déca<br />
Mais recaféiné</p>
<p>J&#8217;arrive au bureau<br />
Ma secrétaire me fait :<br />
«Vous êtes un peu en r&#8217;tard<br />
Je me suis inquiétée»<br />
Han ! &#8211; J&#8217;la jette par la f&#8217;nêtre<br />
Elle l&#8217;avait bien cherché<br />
T&#8217;façons faut qu&#8217;je rentre<br />
Mais avant un café</p>
<p>Attendant l&#8217;métro<br />
Je me fais agresser<br />
Une p&#8217;tite vieille me dit :<br />
«Vous avez l&#8217;heure s&#8217;il vous plaît ?»<br />
Han &#8211; Je lui casse la tête<br />
Et j&#8217;la pousse sur le quai<br />
Je file à la maison<br />
Et j&#8217;me sers un &#8211; devinez ?</p>
<p>«Papa, mon Papa,<br />
En classe je suis premier»<br />
Putain mais quoi ?<br />
Tu vas arrêter de m&#8217;faire chier ?<br />
Qu&#8217;il est con ce gosse !<br />
En plus y s&#8217;met à chialer !<br />
J&#8217;m'enferme dans la cuisine<br />
Il reste un peu d&#8217;café</p>
<p>Ça fait quatorze jours<br />
Que je suis enfermé<br />
J&#8217;suis seul dans ma cuisine<br />
Et je bois du café<br />
Il faudrait bien qu&#8217;je dorme<br />
Mais les flics vont m&#8217;choper<br />
Alors je cloue les portes<br />
Et j&#8217;reprends du café..</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2008/12/03/un-ptit-cafe/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>JavaFX Overview Slides</title>
		<link>http://silveiraneto.net/2008/10/19/javafx-overview-slides/</link>
		<comments>http://silveiraneto.net/2008/10/19/javafx-overview-slides/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 01:35:03 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[café com tapioca]]></category>
		<category><![CDATA[CEJUG]]></category>
		<category><![CDATA[Faculdade Christus]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[jug]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[vídeo]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=1485</guid>
		<description><![CDATA[My slides about a overview on JavaFX at our last CEJUG event. JavaFX Overview View SlideShare presentation or Upload your own. (tags: javafx ria) Downloads: javafx_cct_cejug_oct_2008.odp javafx_cct_cejug_oct_2008.pdf Here a little screncast showing the live preview feature on the NetBeans JavaFX Plugin. You can also download the orignal screencast in higher resolution netbeans_javafx_preview.ogg (15 Mb). Photos [...]]]></description>
			<content:encoded><![CDATA[<p>My slides about a overview on JavaFX at our <a href="http://www.cejug.org/pages/viewpage.action?pageId=32014362">last CEJUG event</a>.</p>
<p><center>
<div style="width:425px;text-align:left" id="__ss_670449"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/silveiraneto/javafx-overview-presentation?type=powerpoint" title="JavaFX Overview">JavaFX Overview</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=javafxcctcejugoct2008-1224465285764069-8&#038;stripped_title=javafx-overview-presentation" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=javafxcctcejugoct2008-1224465285764069-8&#038;stripped_title=javafx-overview-presentation" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View SlideShare <a style="text-decoration:underline;" href="http://www.slideshare.net/silveiraneto/javafx-overview-presentation?type=powerpoint" title="View JavaFX Overview on SlideShare">presentation</a> or <a style="text-decoration:underline;" href="http://www.slideshare.net/upload?type=powerpoint">Upload</a> your own. (tags: <a style="text-decoration:underline;" href="http://slideshare.net/tag/javafx">javafx</a> <a style="text-decoration:underline;" href="http://slideshare.net/tag/ria">ria</a>)</div>
</div>
<p></center></p>
<p><strong>Downloads:</strong></p>
<ul>
<li><a href="http://silveiraneto.net/downloads/javafx_cct_cejug_oct_2008.odp">javafx_cct_cejug_oct_2008.odp</a></li>
<li><a href="http://silveiraneto.net/downloads/javafx_cct_cejug_oct_2008.pdf">javafx_cct_cejug_oct_2008.pdf</a></li>
</ul>
<p style="text-align: center;"><img src='http://farm4.static.flickr.com/3002/2956858644_4870fa0b27.jpg' alt='Café com Tapioca na Christus'/></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm4.static.flickr.com/3041/2956896062_255c8afa6f.jpg" alt="Café com Tapioca na Christus" /></p>
<p>Here a little screncast showing the live preview feature on the <a href="http://javafx.netbeans.org/">NetBeans JavaFX Plugin</a>.</p>
<p style="text-align: center;"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/vCWQtQgdpUA&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/vCWQtQgdpUA&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></object></p>
<p>You can also download the orignal screencast in higher resolution <a href="http://silveiraneto.net/downloads/netbeans_javafx_preview.ogg">netbeans_javafx_preview.ogg</a> (15 Mb). Photos of the presentation at <a title="CCT Christus" href="http://flickr.com/photos/silveiraneto/sets/72157608193146923/">my Flickr album</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2008/10/19/javafx-overview-slides/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaFX, Duke Potato</title>
		<link>http://silveiraneto.net/2008/10/04/javafx-duke-potato/</link>
		<comments>http://silveiraneto.net/2008/10/04/javafx-duke-potato/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 19:04:01 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[draggable]]></category>
		<category><![CDATA[duke]]></category>
		<category><![CDATA[Duke Potato]]></category>
		<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[Mr Potato Head]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[vídeo]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=1327</guid>
		<description><![CDATA[Do you know the toy Mr. Potato Head? Now meet the Java Potato. Duke images here from previous dukes I posted and other images from Open Clipart Project. Java Web Start: The code: package dukepotato; &#160; import javafx.application.Frame; import javafx.application.Stage; import javafx.scene.CustomNode; import javafx.scene.Node; import javafx.scene.Group; import javafx.input.MouseEvent; import javafx.scene.geometry.Circle; import javafx.scene.paint.Color; import javafx.scene.image.ImageView; import [...]]]></description>
			<content:encoded><![CDATA[<p>Do you know the toy <a title="Wikipédia, inglês" href="http://en.wikipedia.org/wiki/Mr_potato_head">Mr. Potato Head</a>? Now meet the Java Potato.</p>
<p style="text-align: center;"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/6NrUdp5XX_o&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/6NrUdp5XX_o&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></object></p>
<p>Duke images here from <a title="Dukes" href="http://silveiraneto.net/tag/duke">previous dukes I posted</a> and other images from <a title="Open Clipart" href="http://openclipart.org/">Open Clipart Project</a>.</p>
<p>Java Web Start:</p>
<p style="text-align: center;"><a title="Click to launch" href="http://silveiraneto.net/downloads/dukepotato/launch.jnlp"><img class="size-full wp-image-1474 aligncenter" title="webstart" src="http://silveiraneto.net/wp-content/uploads/2008/10/webstart.png" alt="" width="88" height="23" /></a></p>
<p>The code:</p>
<div class="wp_syntax">
<div class="code">
<pre class="java java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">dukepotato</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.application.Frame</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.application.Stage</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.scene.CustomNode</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.scene.Node</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.scene.Group</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.input.MouseEvent</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.scene.geometry.Circle</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.scene.paint.Color</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.scene.image.ImageView</span>;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.scene.image.Image</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Img <span style="color: #000000; font-weight: bold;">extends</span> ImageView<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span>  attribute content<span style="color: #339933;">:</span> Node<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span>;
    <span style="color: #000000; font-weight: bold;">public</span>  attribute src<span style="color: #339933;">:</span> <span style="color: #003399;">String</span>;
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> attribute endX <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0.0</span>;
    <span style="color: #000000; font-weight: bold;">private</span> attribute endY <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0.0</span>;
    <span style="color: #000000; font-weight: bold;">private</span> attribute startX <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0.0</span>;
    <span style="color: #000000; font-weight: bold;">private</span> attribute startY <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0.0</span>;
&nbsp;
    override attribute translateX <span style="color: #339933;">=</span> bind endX;
    override attribute translateY <span style="color: #339933;">=</span> bind endY;
    override attribute blocksMouse <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">true</span>;
&nbsp;
    init <span style="color: #009900;">&#123;</span>
        image <span style="color: #339933;">=</span> <span style="color: #003399;">Image</span> <span style="color: #009900;">&#123;</span>
            url<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;{__DIR__}/{src}&quot;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    override attribute onMousePressed <span style="color: #339933;">=</span> function<span style="color: #009900;">&#40;</span>e<span style="color: #339933;">:</span><span style="color: #003399;">MouseEvent</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span><span style="color: #003399;">Void</span> <span style="color: #009900;">&#123;</span>
        startX <span style="color: #339933;">=</span> e.<span style="color: #006633;">getDragX</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span>endX;
        startY <span style="color: #339933;">=</span> e.<span style="color: #006633;">getDragY</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span>endY;
    <span style="color: #009900;">&#125;</span>
&nbsp;
    override attribute onMouseDragged <span style="color: #339933;">=</span> function<span style="color: #009900;">&#40;</span>e<span style="color: #339933;">:</span><span style="color: #003399;">MouseEvent</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span><span style="color: #003399;">Void</span> <span style="color: #009900;">&#123;</span>
        endX <span style="color: #339933;">=</span> e.<span style="color: #006633;">getDragX</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span>startX;
        endY <span style="color: #339933;">=</span> e.<span style="color: #006633;">getDragY</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span>startY;
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
var dukesimages <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;duke1.png&quot;</span>, <span style="color: #0000ff;">&quot;duke2.png&quot;</span>, <span style="color: #0000ff;">&quot;duke3.png&quot;</span>, <span style="color: #0000ff;">&quot;duke4.png&quot;</span><span style="color: #009900;">&#93;</span>;
var dukes <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>image in dukesimages<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #003399;">Image</span> <span style="color: #009900;">&#123;</span>
        url<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;{__DIR__}/{image}&quot;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
var index <span style="color: #339933;">=</span> 0;
var duke <span style="color: #339933;">=</span> ImageView <span style="color: #009900;">&#123;</span>
    x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">200</span>, y<span style="color: #339933;">:</span><span style="color: #cc66cc;">170</span>
    image<span style="color: #339933;">:</span> bind dukes<span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span>;
    onMouseClicked<span style="color: #339933;">:</span> function<span style="color: #009900;">&#40;</span> e<span style="color: #339933;">:</span> <span style="color: #003399;">MouseEvent</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span><span style="color: #003399;">Void</span> <span style="color: #009900;">&#123;</span>
        index <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>index <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> mod sizeof dukesimages;
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
var hat <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;hat.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">370</span> <span style="color: #009900;">&#125;</span>
var partyhat <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;party_hat.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">160</span>, y<span style="color: #339933;">:</span> <span style="color: #cc66cc;">5</span> <span style="color: #009900;">&#125;</span>
var cap <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;cap.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">230</span>, y<span style="color: #339933;">:</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#125;</span>
var cake <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;cake.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">526</span>, y<span style="color: #339933;">:</span> <span style="color: #cc66cc;">190</span> <span style="color: #009900;">&#125;</span>
var glove <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;glove.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">338</span>, y<span style="color: #339933;">:</span> <span style="color: #cc66cc;">363</span> <span style="color: #009900;">&#125;</span>
var baseball <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;baseball.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">548</span>, y<span style="color: #339933;">:</span><span style="color: #cc66cc;">373</span> <span style="color: #009900;">&#125;</span>
var pencil <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;pencil.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">451</span>, y<span style="color: #339933;">:</span> <span style="color: #cc66cc;">365</span> <span style="color: #009900;">&#125;</span>
var camera <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;camera.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">125</span>, y<span style="color: #339933;">:</span> <span style="color: #cc66cc;">380</span> <span style="color: #009900;">&#125;</span>
var coffee <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;coffee.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">541</span>, y<span style="color: #339933;">:</span> <span style="color: #cc66cc;">114</span> <span style="color: #009900;">&#125;</span>
var burger <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;burger.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">542</span>, y<span style="color: #339933;">:</span> <span style="color: #cc66cc;">282</span> <span style="color: #009900;">&#125;</span>
var diamond <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;diamond.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">243</span>, y<span style="color: #339933;">:</span> <span style="color: #cc66cc;">383</span> <span style="color: #009900;">&#125;</span>
var pliers <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;pliers.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">20</span>, y<span style="color: #339933;">:</span> <span style="color: #cc66cc;">368</span> <span style="color: #009900;">&#125;</span>
var rubikcube <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;rubikcube.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">37</span>, y<span style="color: #339933;">:</span> <span style="color: #cc66cc;">295</span> <span style="color: #009900;">&#125;</span>
var syringe <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;syringe.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">35</span>, y<span style="color: #339933;">:</span> <span style="color: #cc66cc;">245</span> <span style="color: #009900;">&#125;</span>
var hourglass <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;hourglass.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">35</span>, y<span style="color: #339933;">:</span> <span style="color: #cc66cc;">127</span> <span style="color: #009900;">&#125;</span>
var adventurehat <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;adventurehat.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">8</span>, y<span style="color: #339933;">:</span><span style="color: #cc66cc;">30</span> <span style="color: #009900;">&#125;</span>
var tie <span style="color: #339933;">=</span> Img <span style="color: #009900;">&#123;</span> src<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;tie.png&quot;</span>, x<span style="color: #339933;">:</span> <span style="color: #cc66cc;">547</span>, y<span style="color: #339933;">:</span><span style="color: #cc66cc;">35</span> <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003399;">Frame</span> <span style="color: #009900;">&#123;</span>
    title<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;Duke Potato&quot;</span>
    width<span style="color: #339933;">:</span> <span style="color: #cc66cc;">640</span>
    height<span style="color: #339933;">:</span> <span style="color: #cc66cc;">480</span>
    closeAction<span style="color: #339933;">:</span> function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        java.<span style="color: #006633;">lang</span>.<span style="color: #003399;">System</span>.<span style="color: #006633;">exit</span><span style="color: #009900;">&#40;</span> 0 <span style="color: #009900;">&#41;</span>;
    <span style="color: #009900;">&#125;</span>
    visible<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">true</span>
&nbsp;
    stage<span style="color: #339933;">:</span> Stage <span style="color: #009900;">&#123;</span>
        content<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>duke, hat, partyhat, cake, adventurehat, cap, glove,
            baseball, pencil, camera, coffee, burger, diamond,
            pliers, rubikcube, syringe, hourglass, tie<span style="color: #009900;">&#93;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<ul>
<li>Lines 14 to 42 is the same dragging approach I showed in the post <a href="http://silveiraneto.net/2008/08/11/javafx-draggable-node/">Draggable Nodes</a>, but this time creating a class that inherits the behavior of ImageView.</li>
<li>Lines 44 to 57 is the Duke that changes when you click on it. It cycles over the dukesimages list.</li>
<li>Lines 59 to 75 is just instantiations of all toys and objects we will use to dress the Duke. Look how easier was to create and place a image.</li>
<li>Lines 78 to the end is just creating a Frame and putting all elements on it.</li>
</ul>
<p><strong>Download</strong> a package with the NetBeans project, sources, libraries and images, <a href="http://silveiraneto.net/downloads/DukePotato.tar.gz">DukePotato.tar.gz</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2008/10/04/javafx-duke-potato/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

