<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>javafx &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/javafx/</link>
	<description>Feed of posts on WordPress.com tagged "javafx"</description>
	<pubDate>Mon, 13 Oct 2008 22:30:25 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[JavaFx classes,objects and attributes]]></title>
<link>http://matterofmatter.wordpress.com/?p=38</link>
<pubDate>Thu, 02 Oct 2008 08:49:31 +0000</pubDate>
<dc:creator>M.A.S.Jayasundara</dc:creator>
<guid>http://matterofmatter.fr.wordpress.com/2008/10/02/javafx-classesobjects-and-attributes/</guid>
<description><![CDATA[This example is about usage of javafx classes, creating object and using functions
//START fx FILE
p]]></description>
<content:encoded><![CDATA[<p>This example is about usage of javafx classes, creating object and using functions</p>
<p><span style="color:#808000;">//START fx FILE<br />
package classobjectfunctins;</span></p>
<p><span style="color:#808000;">/**import statement for java.lang.System<br />
*There is no pre imports for java.lang package by compiler.<br />
*So to put System.out.println()'s we need to import System class<br />
*/</span></p>
<p><span style="color:#808000;">import java.lang.System;</span></p>
<p><span style="color:#808000;"><br />
class Rectangle{<br />
&#160;&#160;&#160;attribute length:Number;<br />
&#160;&#160;&#160;attribute width:Number;<br />
&#160;&#160;&#160;function area(  ):Number{<br />
&#160;&#160;&#160;&#160;&#160;&#160;return length * width;<br />
&#160;&#160;&#160;}<br />
}</span></p>
<p><span style="color:#808000;"><br />
class Cuboid{<br />
&#160;&#160;&#160;attribute height:Number=10;<br />
&#160;&#160;&#160;attribute length:Number=10;<br />
&#160;&#160;&#160;attribute width:Number=10;<br />
&#160;&#160;&#160;function volume():Number{<br />
&#160;&#160;&#160;&#160;&#160;&#160;return volume(height,length,width);<br />
&#160;&#160;&#160;}<br />
//overloaded functions<br />
&#160;&#160;&#160;function volume(a:Number,b:Number,c:Number):Number{<br />
&#160;&#160;&#160;&#160;&#160;&#160;return a * b * c;<br />
&#160;&#160;&#160;}<br />
}</span><br />
<span style="color:#808000;">/////////////////////////////////////////////////////////<br />
//Usage one<br />
//define variable<br />
var rect1 = Rectangle{}<br />
//assine values<br />
rect1.length=100;<br />
rect1.width=50;</span></p>
<p><span style="color:#808000;">//call function<br />
System.out.println("Usage one:"+rect1.area());//5000.0</span></p>
<p><span style="color:#808000;">/////////////////////////////////////////////////////////<br />
//Usage two<br />
//define variable with attribute values<br />
var rect2 = Rectangle{<br />
&#160;&#160;&#160;length:12<br />
&#160;&#160;&#160;width:45<br />
};<br />
System.out.println("Usage two:"+rect2.area());//540.0</span></p>
<p><span style="color:#808000;">/////////////////////////////////////////////////////////<br />
//Usage three<br />
var cuboid = Cuboid{};<br />
//using function without parameters<br />
System.out.println("Usage three no args:"+cuboid.volume());//2520.0</span></p>
<p><span style="color:#808000;">//using overloaded method<br />
System.out.println("Usage three no args:"+cuboid.volume(10,10,10));//1000.0</span></p>
<p><span style="color:#808000;">//END fx FILE</span></p>
<p>First we goit to make two classes Rectangle and Cuboid.</p>
<p>Cuboid class has 3 attributes and 2 overloaded functions,</p>
<p>We assign assign attribute values at same time.</p>
<p>First usage we create variable, assign Rectangle class object and</p>
<p>assign some values to the attributes.</p>
<p>Second usage we create we create object and assign variables at the same time.</p>
<p>Last we call overloaded functions</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[First Post]]></title>
<link>http://biblemaps2000.wordpress.com/?p=3</link>
<pubDate>Sun, 28 Sep 2008 21:56:59 +0000</pubDate>
<dc:creator>phoenixpym</dc:creator>
<guid>http://biblemaps2000.fr.wordpress.com/2008/09/28/first-post/</guid>
<description><![CDATA[Amature - Amature
Freeporn.com - Freeporn.com
Sex Vids - Sex Vids
Video - Video
Amature Porn - Amatu]]></description>
<content:encoded><![CDATA[<p>Amature - <a href="http://lasvegaidu.proboards.com/">Amature</a><br />
Freeporn.com - <a href="http://texasdipoi.proboards.com/">Freeporn.com</a><br />
Sex Vids - <a href="http://abroyhiuvr.proboards.com/">Sex Vids</a><br />
Video - <a href="http://americaugw.proboards.com/">Video</a><br />
Amature Porn - <a href="http://nativeavbf.proboards.com/">Amature Porn</a><br />
X Tube - <a href="http://questio6hv.proboards.com/">X Tube</a><br />
Blackporn - <a href="http://sylvani9vr.proboards.com/">Blackporn</a><br />
Familysex - <a href="http://thefreecuo.proboards.com/">Familysex</a><br />
Sexmovies - <a href="http://arefurbzf8.proboards.com/">Sexmovies</a><br />
Grannyporn - <a href="http://austintild.proboards.com/">Grannyporn</a><br />
Www.freeporn - <a href="http://acontemqac.proboards.com/">Www.freeporn</a><br />
Clips - <a href="http://agraduage0.proboards.com/">Clips</a><br />
Teenporn - <a href="http://converte0s.proboards.com/">Teenporn</a><br />
Hotsex - <a href="http://hyundai8fn.proboards.com/">Hotsex</a><br />
Kamasutra Movie - <a href="http://liverda006.proboards.com/">Kamasutra Movie</a><br />
Videos Porno Gratis - <a href="http://hondaraatj.proboards.com/">Videos Porno Gratis</a><br />
Noelia Desnuda - <a href="http://afoodciabg.proboards.com/">Noelia Desnuda</a><br />
Videos Pornos - <a href="http://aorganig1w.proboards.com/">Videos Pornos</a><br />
Porno.com - <a href="http://librahou6b.proboards.com/">Porno.com</a><br />
Bollywoodsex - <a href="http://theeasygh4.proboards.com/">Bollywoodsex</a><br />
Amatuer Porn - <a href="http://nationaqwf.proboards.com/">Amatuer Porn</a><br />
Pornos - <a href="http://joanvanfvy.proboards.com/">Pornos</a><br />
Twistys.com - <a href="http://arhinesvpc.proboards.com/">Twistys.com</a><br />
Bbw Clips - <a href="http://computehdg.proboards.com/">Bbw Clips</a><br />
Bbw Video Clips - <a href="http://freedenusd.proboards.com/">Bbw Video Clips</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[JavaFX attributes and functions]]></title>
<link>http://matterofmatter.wordpress.com/?p=35</link>
<pubDate>Thu, 25 Sep 2008 05:22:13 +0000</pubDate>
<dc:creator>M.A.S.Jayasundara</dc:creator>
<guid>http://matterofmatter.fr.wordpress.com/2008/09/25/javafx-attributes-and-functions/</guid>
<description><![CDATA[

JavaFX there is no methods and variables
there are fuctions and attributes.
ex:-
import java.lang.]]></description>
<content:encoded><![CDATA[<div class="entry">
<div class="snap_preview">
<p>JavaFX there is no methods and variables</p>
<p>there are fuctions and attributes.</p>
<p>ex:-</p>
<pre><span style="color:#808000;">import java.lang.System;</span><span style="color:#808000;">

System.out.println("Hello World.");</span><span style="color:#808000;">

var var1 = 0;</span><span style="color:#808000;">
grow(0);</span><span style="color:#808000;">
function grow(i:Integer):Void{</span><span style="color:#808000;">   
   System.out.println(var1);</span><span style="color:#808000;">  
   var1=i+1;</span><span style="color:#808000;">   
   if(var1==3000){
       </span><span style="color:#808000;">System.exit(0)
   }
   grow(var1)
</span>}</pre>
</div>
</div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Hello world of jfx]]></title>
<link>http://matterofmatter.wordpress.com/?p=19</link>
<pubDate>Wed, 24 Sep 2008 11:50:18 +0000</pubDate>
<dc:creator>M.A.S.Jayasundara</dc:creator>
<guid>http://matterofmatter.fr.wordpress.com/2008/09/24/hello-world-of-jfx/</guid>
<description><![CDATA[Writing java applications using JavaFX seems too easy.
This is simple hello world using java.

publi]]></description>
<content:encoded><![CDATA[<p>Writing java applications using JavaFX seems too easy.</p>
<p>This is simple hello world using java.</p>
<pre><span style="color:#808000;">
public class HelloWorld {
  public static void main(){
    System.out.println("Hello Wold.");
  }
}</span></pre>
<p>and this is using javafx</p>
<pre><span style="color:#808000;">import java.lang.System;
System.out.println("Hello World.");</span></pre>
<p>Only thing with jfx is you have to import all the import statements.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[JavaOne 2008]]></title>
<link>http://tremoloplusdelay.wordpress.com/?p=15</link>
<pubDate>Tue, 23 Sep 2008 22:44:37 +0000</pubDate>
<dc:creator>tremoloplusdelay</dc:creator>
<guid>http://tremoloplusdelay.fr.wordpress.com/2008/09/23/javaone-2008/</guid>
<description><![CDATA[Some really cool stuff back from JavaOne 2008 (click here for the video).
I&#8217;m betting for Java]]></description>
<content:encoded><![CDATA[<p>Some really cool stuff back from JavaOne 2008 (<a href="http://java.sun.com/javaone/sf/webcasts.jsp#k5livewebcast" target="_blank">click here for the video</a>).</p>
<p>I'm betting for JavaFX, Android and java as a serious gaming platform. Lets hope we will see more before year ends (i just cant wait). Maybe i'll be toying around with the new features of java and showing it to you.</p>
<p>Yeah i know, its old news but who cares.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[WidgetFX Meets IT Governance]]></title>
<link>http://inovis.wordpress.com/?p=870</link>
<pubDate>Tue, 23 Sep 2008 01:18:21 +0000</pubDate>
<dc:creator>Stephen Chin</dc:creator>
<guid>http://blogs.inovis.com/2008/09/22/widgetfx-meets-it-governance/</guid>
<description><![CDATA[If you have tried to deploy widgets behind the corporate firewall and hit a brick wall with IT, you ]]></description>
<content:encoded><![CDATA[<p>If you have tried to deploy widgets behind the corporate firewall and hit a brick wall with IT, you are not alone.  While consumer desktop widgets are buzzing, enterprise use of widgets has been woefully neglected.  However, <a href="http://widgetfx.org/">WidgetFX</a>, a new widget platform designed from the requirements of large enterprise customers, may change the way your corporation approaches desktop widgets as part of your IT Governance policy.</p>
<p><a href="http://widgetfx.org/"><img class="size-full wp-image-876" style="float:right;padding:0 0 5px 10px;" title="widgetfx-screenshot" src="http://inovis.wordpress.com/files/2008/09/widgetfx-screenshot.png" alt="Screenshot of WidgetFX" width="191" height="513" /></a></p>
<p>Desktop widgets are small, interactive applications that perform frequently used functions and provide access to services on the Internet, such as news, weather, time, maps, or even stock quotes.  There has been an explosion of interest in desktop widgets for the consumer space including access to popular services such as Flickr, MySpace, and YouTube.  However, there has been very little movement on the enterprise front to provide equivalent desktop widgets for corporate applications.</p>
<p>There are a number of issues that prevent the widespread corporate adoption of widgets:</p>
<ul>
<li><strong>Security Issues</strong> - Security holes and vulnerabilities have plagued all the major widget platforms, and the general lack of rigorous security has prevented the deployment of widget engines within large corporations.</li>
<li><strong>Limited Platform Support</strong> - Unlike web applications, which can be deployed seamlessly across multiple OS and hardware platforms, most of the widget frameworks are limited to a few select platforms.</li>
<li><strong>Proprietary Systems</strong> - All the major widget frameworks are closed source and proprietary.  As a technology vendor, this puts you at the mercy of the framework provider who may choose to change, upgrade, or even suspend their service at any time.</li>
<li><strong>Restrictive License Agreements</strong> - Given the above issues, it should not be a surprise that several of the popular widget frameworks have specific language in their license agreements that limit or prohibit commercial use to reduce liability.</li>
</ul>
<p>Enter <a href="http://widgetfx.org/">WidgetFX</a>, the first desktop widget platform designed specifically for the requirements of large enterprises.</p>
<p><!--more--></p>
<h2>About WidgetFX</h2>
<p>WidgetFX is an open-source desktop widget platform built on top of Sun's new <a href="http://www.sun.com/software/javafx/">JavaFX technology</a>.  Widgets can be written in a combination of JavaFX Script and Java to take advantage of a very rich platform for graphics, animation, and media capabilities.</p>
<p>Unlike the available consumer focused widget frameworks, WidgetFX was born out of the need for a sustainable corporate widget framework.  In order to meet this requirement it had to address corporate security needs, provide seamless cross-platform support, and be distributed under an unencumbered open-source license.</p>
<p>The initial v0.1 launch of WidgetFX was very successful, with over five thousand unique visitors from ninety six different countries in only the first few days.  Here is a view of the geographic diversity courtesy of Google Analytics:</p>
<div class="mceTemp">
[caption id="attachment_872" align="alignnone" width="460" caption="WidgetFX Geographical Distribution"]<a href="http://inovis.wordpress.com/files/2008/09/widgetfx-map.jpg"><img class="size-large wp-image-872" title="widgetfx-map" src="http://inovis.wordpress.com/files/2008/09/widgetfx-map.jpg?w=460" alt="WidgetFX Geographical Distribution" width="460" height="286" /></a>[/caption]
</div>
<p>The current release of WidgetFX includes a fully functional widget dock and is primarily focused on widget developers to give them the tools and documentation needed to start writing widgets today.  Subsequent releases are planned to continue enhancing security, performance, and end user experience in anticipation of a Fall JavaFX release by Sun.</p>
<h3>Widget Security</h3>
<p>While users expect the same security restrictions browsers impose on web applications, most widget frameworks give widgets equal privileges to installed applications with full access to the disk and network.  Regardless of how trustworthy the company providing the framework may be, 3rd party widgets could expose sensitive passwords or corporate secrets outside the corporate firewall.  For this reason many large corporations have chosen to completely disallow or severely restrict the use of widgets on their intranet as part of their IT Governance policy.</p>
<p>Even widgets developed by trusted corporations are subject to security holes, such as the infamous <a href="http://www.microsoft.com/technet/security/Bulletin/MS07-048.mspx">Windows Gadget RSS Exploit</a>:</p>
<blockquote><p>"If a user subscribed to a malicious RSS feed in the Feed Headlines Gadget or added a malicious contacts file in the Contacts Gadget or a user clicked on a malicious link in the Weather Gadget an attacker could potentially run code on the system."</p></blockquote>
<p>Similar security holes have plagued Yahoo Widgets with an <a href="http://secunia.com/advisories/26011/">ActiveX Buffer Overlow Vulnerability</a>, and Google Gadgets where an <a href="http://www.owasp.org/images/a/a1/OWASP_IL_7_Overtaking_Google_Desktop.pdf">XSS vulnerability</a> allowed complete takeover of a user's computer.</p>
<p>In contrast, WidgetFX has the ability to take advantage of the proven Java security model, which is based on a secure sandbox for isolating applications.  Applications running within the sandbox are restricted from accessing the user's files, changing data, or running arbitrary code.  However, if a widget needs additional permissions it can request access from the user for reading a file, accessing a website, or even printing.  For even greater access, a signed widget can request full permissions, but must be granted access by the user subject to their corporate security policy.  This insulates the user from malicious code, and simplifies corporate governance of widgets within an enterprise.</p>
<h3>Cross Platform Support</h3>
<p>One of the traditional challenges of UI development is that certain user interface features are only available on a specific platform, which limits the capabilities of cross-platform toolkits.  Therefore, it is no surprise that the most successful widget frameworks support only a single OS platform.</p>
<p>This provides challenges for corporations who want to adopt a standard for widget frameworks.  Even if a corporation has standardized on Windows, they cannot deploy Windows Sidebar widgets without first upgrading all workstations to Vista.</p>
<p>There is an even greater challenge for corporations developing widgets, because they must rewrite widgets for each platform they need to support for their end users.  Since there is no standardization across Widget frameworks, this also means retesting and certifying widgets per platform.</p>
<p>WidgetFX takes advantage of Java's cross-platform support to provide a consistent user experience across Windows, Mac OS X, and even UNIX variants such as Linux and Solaris.  With the release of <a href="https://jdk6.dev.java.net/6u10ea.html">Java SE 6 Update 10</a>, WidgetFX will be further enhanced by features normally only available with native platform toolkits, such as translucent/shaped windows and system tray integration.  Sun also plans to take the JavaFX platform mobile, which means deployment of common widgets across desktops and mobile devices is in the foreseeable future.</p>
<h3>Open-Source Licensing</h3>
<p>WidgetFX is licensed under the <a href="http://www.gnu.org/copyleft/gpl.html">GNU Public License v3</a> under similar terms as the Java platform.  This helps to keep the WidgetFX engine free for all companies and interested parties to contribute while also allowing development of commercial widgets for sale and distribution.</p>
<p>On the other hand, most of the popular consumer widget frameworks are proprietary, which restricts what you can do with them commercially.  Some of the limitations you may encounter include restrictions on redistribution, lack of control over compatibility and version upgrades, and even blatant restrictions on enterprise or commercial use.</p>
<p>Quoting from the Yahoo Widgets terms of service:</p>
<blockquote><p>"[Yahoo Widgets] is designed for consumer, personal use. It is not designed for enterprise, commercial, or human safety purposes. Its failure in such cases could lead to injury or damage for which you agree that Yahoo! is not responsible."</p></blockquote>
<p>Good luck getting your IT or legal department to approve use of a framework like this!</p>
<h3>Summary</h3>
<p>WidgetFX is an emerging technology for developing desktop widgets that can securely run in a corporate environment.  The v0.1 release is designed to get developers started writing widgets early in anticipation of a fall launch of JavaFX technology by Sun.  For more information about WidgetFX, including apidocs, tutorials, and a live application, visit <a href="http://widgetfx.org/">WidgetFX.org</a>.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Reiterate JavaFX Again]]></title>
<link>http://dbaktiar.wordpress.com/2008/09/18/reiterate-javafx-again/</link>
<pubDate>Thu, 18 Sep 2008 07:12:00 +0000</pubDate>
<dc:creator>dbaktiar</dc:creator>
<guid>http://dbaktiar.fr.wordpress.com/2008/09/18/reiterate-javafx-again/</guid>
<description><![CDATA[Today our servers being physically transported to the new office site. Initially I planned to fix th]]></description>
<content:encoded><![CDATA[<p>Today our servers being physically transported to the new office site. Initially I planned to fix things before leaving to Bangkok, but the moving coincide with my planned date. </p>
<div>So today I spend my half day in the morning exploring JavaFx again.</div>
<div>I went back to my NetBeans 6.1 installation which is a bit dusty because I haven't touched it for a such long time.</div>
<div>I followed the <a href="http://java.sun.com/javafx/tutorials/simple_javafx_nb_app/#3a">JavaFX Clock application</a> step by step and it works as advertised. For a Java developer the learning curve for JavaFX is not steep. Even considering the vast number of open source Java libraries lying around, it is an advantage!</div>
<div>I still am able to use the whole java.lang.* while using the javafx.application.* packages.</div>
<div>Before using the NetBeans version, I followed the Chuk Mun Lee's tutorial on the recent Sun Developers' Network 2008, which was using JavaFXPad. JavaFXPad is ok, only the code formatting and cut-and-paste feature is pretty much limiting. NetBeans has much better support as an IDE, you could even start to develop your JavaFX application.</div>
<p><a href="http://4.bp.blogspot.com/_BWWjbS7vYjs/SNNbhZ3p4hI/AAAAAAAAA4Q/pEpVdxDetpM/s1600-h/javafx-clock.png"><img style="display:block;text-align:center;cursor:hand;margin:0 auto 10px;" src="http://4.bp.blogspot.com/_BWWjbS7vYjs/SNNbhZ3p4hI/AAAAAAAAA4Q/pEpVdxDetpM/s320/javafx-clock.png" border="0" alt="" /></a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[JavaFX Script, Sun Microsystems's new rich Internet applications platform]]></title>
<link>http://dgsjava.wordpress.com/?p=145</link>
<pubDate>Wed, 17 Sep 2008 08:01:08 +0000</pubDate>
<dc:creator>dgsjava</dc:creator>
<guid>http://dgsjava.fr.wordpress.com/2008/09/17/javafx-script-zone-an-interface-for-javas-enemies/</guid>
<description><![CDATA[
Source: javaworld.com, JavaFX: Opensource or not ? Some parts of the JavaFX language are already op]]></description>
<content:encoded><![CDATA[<ul>
<li>Source: javaworld.com, <a href="http://www.javaworld.com/community/?q=node/687" target="_blank">JavaFX: Opensource or not ?</a> Some parts of the JavaFX language are already open source. But the JavaFX tools, I mean: the compiler, the runtime engine, the player, and tools currently under development are not expected to be open source.</li>
<li>Sources:deitel.com, jfx.wikia.com, <a href="http://www.deitel.com/ResourceCenters/Programming/JavaFX/JavaFXTutorialsandDemos/tabid/2187/Default.aspx" target="_blank">JavaFX Resource Center</a>, <a href="http://jfx.wikia.com/wiki/Demos" target="_blank">JavaFX Demos</a>.</li>
<li>Source: ibm.com, <a href="http://www.ibm.com/developerworks/java/library/j-javafx/" target="_blank">Create rich applications with JavaFX Script</a>.</li>
<li>Source: onjava.com, <a href="http://www.onjava.com/pub/a/onjava/2007/07/27/introduction-to-javafx-script.html" target="_blank">Introduction to JavaFX Script</a>, by Anghel Leonard.</li>
<li>Source: JavaFX Script platform support for the NetBeans IDE. JavaFX Preview SDK is now available for <a href="http://java.sun.com/javafx/downloads/">download</a>, including NetBeans IDE 6.1 with JavaFX.</li>
<li>Source: crazysquirrel.com, <a href="http://www.crazysquirrel.com/computing/java/eclipse/getting-javafx-working-in-eclipse.jspx" target="_blank">There is both a NetBeans and an Eclipse plugin for JavaFX</a>. The NetBeans plugin seems to work pretty well the Eclipse plugin on the other hand is difficult to work with. This page describes my efforts to get the Eclipse plugin working. To install the plugin you need to be running at least Eclipse 3.2.2 and Java 5.0 or above. The page seems to indicate that it will only work with Java 5.0 but I've had success with Java 6.0 as well. Follow the instructions that are found at the <a href="https://openjfx.dev.java.net/javafx-eclipse-plugin-install.html">openJFX plugin</a> page to install the plugin.</li>
<li>Source: eclipsezone.com, <a href="http://www.eclipsezone.com/eclipse/forums/t94323.rhtml" target="_blank">Install JavaFX plugin into Eclipse 3.2.2</a>. See inside a dead link for the Eclipse javaFX plugin.</li>
<li>Source: devx.com, <a href="http://www.devx.com/Java/Article/39052" target="_blank">JavaFX in Action, a book excerpt</a>.</li>
<li>Source: mrbool.com, <a href="http://www.mrbool.com/articles/viewcomp.asp?comp=5549" target="_blank">Eclipse JavaFX plugin quick start tutorial</a>, by Marty Kube and jeff Szeto. </li>
</ul>
]]></content:encoded>
</item>
<item>
<title><![CDATA[JavaFx com NetBeans- tendeu? tendeu? Heim? Heim?]]></title>
<link>http://blogprototipo.wordpress.com/?p=55</link>
<pubDate>Tue, 16 Sep 2008 21:46:14 +0000</pubDate>
<dc:creator>blogprototipo</dc:creator>
<guid>http://blogprototipo.fr.wordpress.com/2008/09/16/javafx-com-netbeans-tendeu-tendeu-heim-heim/</guid>
<description><![CDATA[Eu juro que ainda vou aprender a mexer nesse WordPress e fazer um blog com um layout melhorzinho]]></description>
<content:encoded><![CDATA[<p>Eu juro que ainda vou aprender a mexer nesse Wordpress e fazer um blog com um layout melhorzinho... Enquanto isso não acontece... vai assim mesmo.</p>
<p>A palavra hoje é:  JavaFx (Fale JavaFx em inglês, fica algo como Java Effects, tendeu? heim? heim? um trocadilho!).</p>
<p>JavaFx é um conjunto de produtos para criar RIA (Rich Internet Applications), mas não deixe o nome te enganar, funciona muito bem para desktop, na verdade você constrói uma aplicação Desktop e joga para o browser (falando bem por alto claro).</p>
<p>O JavaFx, até o momento é composto po JavaFx Script e JavaFx Mobile. Hoje vou comentar sobre o JavaFx Script, o mobile fica pra próxima.</p>
<p>O JavaFx Script, é uma linguagem Script, criada para que você possa rapidamente criar aplicações com alto nível visual. Ele é uma liguagem interpretada e não compilada e é quase uma extensão do Java. É possível misturar o código Java e JavaFx sem problema algum.</p>
<p>O JavaFx ainda não tem tanto suporte quanto eu gostaria, mas já dá pra brincar com ele. Ainda não tenho coragem de coloca-lo no cliente, mas já andei usando aqui e o futuro parece promissor.</p>
<p>Bom.. Vamos por a mão na massa, pra começar vou colocar aqui como fazer um simples Hello World com JavaFx e NetBeans:</p>
<p>1) Primeiro vamos baixar o plugin JavaFx para NetBeans (MAS É CLARO QUE JÁ EXISTE), vá em Ferramentas -&#62; Plugin, selecione os plugins JavaFx Kit, JavaFx SDK for Windows (se estiver no Windows) e se quiser ver um exemplo mais complexo, JavaFx Weather Sample;</p>
<p>2) Agora vá em Arquivo -&#62; Novo Projeto, selecione a categoria JavaFx e selecione o projeto JavaFX Script Application, cliquem em Próximo. Mude o nome para HelloWorld (ou para PrototipoGostosao, se quiser) e clique em finalizar;</p>
<p>Vai ser criado o projeto e abrirá um arquivo Main.fx.   AI QUE SUSTO! .FX???? siiim .fx é a extensão do javaFx para as "classes". Pronto, contraiu, mas relaxou...</p>
<p>3) Agora com o Main.fx aberto, vá até a Paleta de componentes do NetBeans, geralmente do lado direito, clique e arraste o componente SwingFrame, que está no grupo Swing Componente até a linha logo abaixo do comentário //place your code here. Renomeie a propriedade title: de "MyApplication" para "Titulo Hello World";</p>
<p>Ele já faz os imports necessários. O código ficará:</p>
<p>[sourcecode language='java']<br />
package helloworld;</p>
<p>import javafx.application.Frame;<br />
import javafx.application.Stage;</p>
<p>//Place your Code Here<br />
SwingFrame {<br />
title: "Hello World"<br />
width: 200<br />
height: 200<br />
closeAction: function() {<br />
java.lang.System.exit( 0 );<br />
}<br />
visible: true</p>
<p>menus: [  ]</p>
<p>content: Canvas {<br />
content: []<br />
}<br />
}<br />
[/sourcecode]<br />
4) Ótimo, agora apague o bloco:</p>
<p>Canvas {<br />
content: []<br />
}</p>
<p>que está na parte:</p>
<p><code><br />
content: Canvas {<br />
content: []<br />
}</code></p>
<p>6) Agora clique e arraste o componente TextField no Swing Components até a parta content:  (onde você acabou de apagar o Canvas e mude a propriedade Text: de "TextField" para "Hello World", essa parte é meio confusa,  mas veja como vai ficar o seu código:</p>
<p>[sourcecode language='java']<br />
package helloworld;</p>
<p>import javafx.ext.swing.SwingFrame;<br />
import javafx.ext.swing.Canvas;<br />
import javafx.ext.swing.TextField;</p>
<p>// place your code here<br />
SwingFrame {<br />
   title: "Hello World"<br />
   width: 200<br />
   height: 200<br />
   closeAction: function() {<br />
     java.lang.System.exit( 0 );<br />
   }<br />
   visible: true</p>
<p>   menus: [  ]</p>
<p>   content:TextField {<br />
     columns: 10<br />
     text: "Hello World"<br />
     editable: true<br />
   }<br />
}<br />
[/sourcecode]<br />
Agora veja que legal, clique no botão que aparece na figura abaixo:</p>
<p><a href="http://blogprototipo.files.wordpress.com/2008/09/javafx.jpg"><img class="alignnone size-full wp-image-56" title="javafx" src="http://blogprototipo.wordpress.com/files/2008/09/javafx.jpg" alt="" width="533" height="304" /></a></p>
<p>Viram? é possível fazer um Preview do que você está fazendo e ele vai mudando dinamicamente.</p>
<p>Agora é Salvar o arquivo, clicar com o botão direito no Projeto criado e Run Project!! Tá.. aí você diz: "mas que coisa idiota, isso eu podia fazer com Swing".</p>
<p>Concordo, não vou negar que Swing de vez em quando é legal (OPA!), mas isso é um exemplo EXTREMAMENTE Básico, vamos melhorar agora o exemplo e utilizar o Bind:</p>
<p>1) Recorte o bloco TextField que foi criado na classe anterior:<br />
[sourcecode language='java']<br />
TextField {<br />
        columns: 10<br />
        text: "HelloWorld"<br />
        editable: true<br />
    }<br />
[/sourcecode]</p>
<p>2) vá até a linha abaixo do comentário //place your code here e acima do início do SwingFrame e escreva:  var textField1 =    e depois cole o TextField que foi recortado.</p>
<p>3) Agora na propriedade title: do swingFrame, substitua o valor "HelloWorld" para bind {textField1.text}   (retire as aspas também)  - Aqui você vinculou a propriedade title do SwingFrame com a propriedade text do textField1;</p>
<p>4) No content: que você retirou a TextField, digite:  textField1</p>
<p>Segue abaixo o código completo:</p>
<p>[sourcecode language='java']<br />
package helloworld;</p>
<p>import javafx.ext.swing.SwingFrame;<br />
import javafx.ext.swing.Canvas;<br />
import javafx.ext.swing.TextField;</p>
<p>/**<br />
 * @author Prototipo<br />
 */</p>
<p>// place your code here<br />
var textField1 = TextField {<br />
        columns: 10<br />
        text: "HelloWorld"<br />
        editable: true<br />
    }</p>
<p>SwingFrame {<br />
    title: bind {textField1.text}<br />
    width: 200<br />
    height: 200<br />
    closeAction: function() {<br />
        java.lang.System.exit( 0 );<br />
    }<br />
    visible: true</p>
<p>    menus: [  ]</p>
<p>    content: textField1<br />
}<br />
[/sourcecode]</p>
<p>Agora execute a aplicação e mude o texto da TextField. Você pode vincular a inúmeros objetos, até mesmo a propriedade de um modelo.</p>
<p>Além disso, acessem o site oficial do JavaFx, vejam alguns exemplos e CHOREM MEROS MORTAIS!!</p>
<p><a href="http://java.sun.com/javafx/reference/samples/"></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[The 8 ball problem, have a try!]]></title>
<link>http://110j.wordpress.com/?p=114</link>
<pubDate>Sun, 07 Sep 2008 13:45:59 +0000</pubDate>
<dc:creator>Omer Haderi</dc:creator>
<guid>http://110j.fr.wordpress.com/2008/09/07/the-8-ball-problem-have-a-try/</guid>
<description><![CDATA[Almost 2 months ago Kasper B. Graversen wrote in his blog about a puzzle that most people with compu]]></description>
<content:encoded><![CDATA[<p>Almost 2 months ago Kasper B. Graversen wrote in his blog about a puzzle that most people with computer science background get it wrong... Here's how it goes, given 8 identical looking balls where one of them is heavier than the other seven and a scale, identify the one heavier ball using the least number of weightings. You can read about the puzzle at <a href="http://firstclassthoughts.co.uk/puzzle/the_8_ball_problem_iq_test.html">Kasper B. Graversen blog.<br />
</a></p>
<p>In order to simulate this problem I have created a JavaFX game, so before reading the solution have a try at my simulator and try to find the heavier ball.</p>
<p><a href="http://javafxexamples.googlecode.com/files/EightBall.jnlp" target="_self"><img class="alignnone" title="launch" src="http://lh3.ggpht.com/omer.haderi/SMPY-zgMiII/AAAAAAAAAMU/TwEzwMaLf2I/s144/javalaunch.png" alt="" width="88" height="23" /></a></p>
<pre>You can find the code <a href="http://code.google.com/p/javafxexamples/source/browse/trunk/onetenj/examples/EightBallGame.fx" target="_blank">here</a>
Note: You can also download the code from <a href="http://code.google.com/p/javafxexamples/">JavaFXExamples</a> at google code.
<tt>svn checkout <strong><em>http</em></strong>://javafxexamples.googlecode.com/svn/trunk/ javafxexamples-read-only</tt></pre>
<p>Here are few screen shots of the game.</p>
<p><img class="alignnone" title="8ballGame" src="http://lh5.ggpht.com/omer.haderi/SMPDB7tGn1I/AAAAAAAAAL4/pHYq2-0sOjI/s400/8ballgame.PNG" alt="" width="400" height="395" /></p>
<p>Drag and Drop the ball in the balance, left or right side</p>
<p><img class="alignnone" title="dragAndDrop" src="http://lh4.ggpht.com/omer.haderi/SMPDC9C9hLI/AAAAAAAAAMA/-XxJ2Z-8l3Y/s400/dragingBalls.PNG" alt="" width="400" height="396" /></p>
<p>When pressing the "Start Balance" button you will see something similar to this screen shot.</p>
<p><img class="alignnone" title="startBalance" src="http://lh3.ggpht.com/omer.haderi/SMPDDFQvN_I/AAAAAAAAAMI/3b0b7c0nANg/s400/information.PNG" alt="" width="400" height="395" /></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[JavaFX: Tutorials and Demos]]></title>
<link>http://mauriziostorani.wordpress.com/?p=467</link>
<pubDate>Sun, 07 Sep 2008 10:07:04 +0000</pubDate>
<dc:creator>Maurizio Storani</dc:creator>
<guid>http://mauriziostorani.fr.wordpress.com/2008/09/07/javafx-tutorials-and-demos/</guid>
<description><![CDATA[JavaFX is a family of products for creating Rich Internet Applications (RIAs) with immersive media a]]></description>
<content:encoded><![CDATA[<p style="text-align:left;"><img class="alignleft" style="margin:3px 8px;" src="http://blogs.zdnet.com/Burnette/images/thumb-java-duke-guitar.png" alt="JavaFX image" width="300" height="256" /><strong>JavaFX</strong> is a family of products for creating <span class="mw-redirect">Rich Internet Applications</span> (RIAs) with immersive media and content. The JavaFX products include a runtime and tools suite that web scripters, designers and developers can use to quickly build and deliver expressive rich interactive applications for desktop, mobile, TV and other platforms. Currently JavaFX consists of JavaFX Script and JavaFX Mobile.</p>
<p>In press previews for JavaFX, <span class="mw-redirect">Sun Fellow</span> James Gosling explained:</p>
<blockquote class="templatequote">
<div>
<p>Most scripting languages are oriented at banging out Web pages. This is oriented around interfaces that are highly animated.</p></div>
<div class="templatequotecite">—<cite>James Gosling,</cite></div>
</blockquote>
<blockquote class="templatequote">
<div>
<p>There are parts of the world where a person's desktop computer is their cell phone, and that's the kind of end point that we're going to get to,</p></div>
<div class="templatequotecite">—<cite>James Gosling, </cite></div>
</blockquote>
<p>JavaFX is anticipated to compete on the desktop with Adobe Flash Player, <span class="mw-redirect">Adobe AIR</span>, OpenLaszlo, and Microsoft Silverlight. It may also target Blu-ray Disc's interactive BD-J platform, although as yet no plans for a Blu-ray release have been announced.</p>
<h2>Tutorials on javafx.com</h2>
<h3>Creating GUIs Using JavaFX Script</h3>
<p>This lesson describes the JavaFX SDK Runtime functionality for creating GUIs. It gives you a high-level explanation of the feature and offers instructions on how to create GUIs using the functionality.</p>
<div class="smallpagetitle">
<h4>Feature Overview</h4>
</div>
<p>The JavaFX SDK runtime is the foundation library of JavaFX platform, allowing content developers, designers, and GUI architects to quickly and easily create GUIs for Rich Internet Applications. Based on the underlying scene graph functionality, the library provides the ability to present objects in scenes such as a frame containing a circle with a defined filling and stroke, and apply different types of lighting, animation, and transformation effects. For more information about the scene graph API, see the project page at <a href="http://scenegraph.dev.java.net/" target="_blank">scenegraph.dev.java.net</a> and <a href="http://javafx.com/releases/preview1/docs/tutorials/visual/index.html" target="_blank">Presenting Visual Objects</a> lesson.</p>
<div class="smallpagetitle">
<h4>Practical Examples - Creating Simple Graphics</h4>
</div>
<p align="justify">To learn how to create the GUI using JavaFX Script, consider a task of creating simple graphics: a rounded rectangle and a text string with a drop shadow.</p>
<p align="justify">The following code sample shows how you do it in a traditional way using Java 2D:</p>
<pre>import java.applet.Applet;
import java.awt.font.*;
import java.awt.geom.*;
import java.awt.*;
...
public class SimpleButton extends Applet {
...
	public void paint(Graphics g) {
	  Graphics2D g2 = (Graphics2D) g;
	  g.setColor(Color.LIGHT_GRAY);
	  g2.fillRoundRect(10, 10, 200, 50, 15, 15);

	  Font font = new Font("Serif", Font.BOLD, 20);
	  g.setFont(font);
	  String textString = "Java 2D";
	  FontRenderContext frc = ((Graphics2D)g).getFontRenderContext();
	  Rectangle2D bounds = font.getStringBounds(textString, frc);
	  int wText = (int)bounds.getWidth();
	  int TextX = 10 + 200/2 - wText/2;

	  g.setColor(Color.DARK_GRAY);
	  g.drawString(textString, TextX + 1, 39);
	  g.setColor(Color.YELLOW);
	  g.drawString(textString, TextX, 40);
	}
...
}</pre>
<table border="0" cellspacing="0" cellpadding="2" width="500">
<tbody>
<tr>
<td class="grey3" align="center"><img class="aligncenter" src="http://javafx.com/releases/preview1/docs/tutorials/images/Java2DN.png" alt="Java2D Sample" width="209" height="58" /></p>
<div class="pad3"><span class="dkcaption1">Figure 1: Java 2D Sample </span></div>
</td>
</tr>
</tbody>
</table>
<p>To drop a shadow, this code sets a contrast color and uses an additional <kbd>drawString</kbd> method with offset coordinates.</p>
<p>The JavaFX Script Language and JavaFX Runtime classes enable developers to render the same graphic context more easily and more clearly:</p>
<pre>import javafx.scene.*;
import javafx.scene.paint.*;
import javafx.scene.geometry.*;
import javafx.scene.text.*;
import javafx.scene.effect.*;
import javafx.ext.swing.*;

SwingFrame {
  title: "Simple (JavaFX demo)"
  width: 228
  height: 98
  content: Canvas {
    content: Group {
      content: [
        Rectangle {
          x: 10   y: 10
          width: 200   height: 50
          arcWidth: 15   arcHeight: 15
          fill: Color.web("#C0C0C0")
        },
        Text {
          x: 110   y: 40
          content: "JavaFX"
          font: Font {
            name: "Serif"
            size: 20
            style: FontStyle.BOLD
          }
          fill: Color.YELLOW
          horizontalAlignment: HorizontalAlignment.CENTER
          effect: DropShadow {
            offsetX: 2   offsetY: -2   radius: 6
            color: Color.BLACK
          }
        }
      ]
    }
  }
  visible: true
}</pre>
<p>This code sample defines a <kbd>Group</kbd> object containing two elements: <kbd>Rectangle</kbd> and <kbd>Text</kbd>. Shape parameters and coordinates as well as font and colors are set using corresponding attributes - <kbd>x</kbd> , <kbd>y</kbd>, <kbd>font</kbd>, <kbd>size</kbd>, <kbd>style</kbd>, <kbd>fill</kbd> and <kbd>color</kbd>. The <kbd>effect</kbd> attribute applies a drop shadow to the <kbd>Text</kbd> element.</p>
<p>To enhance this code, apply a lighting effect to the <kbd>Group</kbd>:</p>
<pre>import javafx.scene.*;
import javafx.scene.paint.*;
import javafx.scene.geometry.*;
import javafx.scene.text.*;
import javafx.scene.effect.*;
import javafx.scene.effect.light.*;
import javafx.ext.swing.*;

Group {
  content: [
    Rectangle{...}
    Text {...}
  ] effect: Lighting{light: DistantLight {azimuth: 225}}
}</pre>
<table border="0" cellspacing="0" cellpadding="2" width="500">
<tbody>
<tr>
<td class="grey3" align="center"><img class="aligncenter" src="http://javafx.com/releases/preview1/docs/tutorials/images/JavaFXN.png" alt="JavaFX Sample" width="205" height="53" /></p>
<div class="pad3"><span class="dkcaption1">Figure 2: JavaFX Script Sample </span></div>
</td>
</tr>
</tbody>
</table>
<p>The <kbd>azimuth</kbd> attribute defines a direction angle for the light source on the XY plane, in degrees.<br />
More visual effects are available in the <kbd>javafx.scene.effect</kbd> and <kbd>javafx.scene.effect.light</kbd> packages. Refer to the API doc or to <a href="http://javafx.com/releases/preview1/docs/tutorials/apiTables.html">API Reference</a> for more information. The entire code of this program is available in the <a href="http://javafx.com/releases/preview1/docs/tutorials/GUI/src/JavaFXGraphics.fx">JavaFXGraphics.fx</a> file.</p>
<h3>Applying Data Binding</h3>
<p>Data binding is one of the advantageous features in JavaFX Script Language. It enables all public attributes and functions to be bound. For example, you can bind the window title to the <kbd>TextField</kbd>, so whatever you type automatically appears in the window title without handling event listeners. For the graphical sample, you create a slider to vary the angle of the distant light source.</p>
<table border="0" cellspacing="0" cellpadding="2" width="500">
<tbody>
<tr>
<td class="grey3" align="center"><img class="aligncenter" src="http://javafx.com/releases/preview1/docs/tutorials/images/JavaFXDataBinding.png" alt="Data Binding Sample" width="210" height="90" /></p>
<div class="pad3"><span class="dkcaption1">Figure 3: Data Binding Sample </span></div>
</td>
</tr>
</tbody>
</table>
<p>To add the slider to the <kbd>Group</kbd>, use the <kbd>ComponentView</kbd> class.</p>
<pre>var slider = Slider{minimum: 0 maximum: 360 value: 20};</pre>
<p>(<a href="http://javafx.com/releases/preview1/docs/tutorials/GUI/index.html" target="_blank">more</a>)</p>
<div class="smallpagetitle">
<h2>Demo</h2>
</div>
<p>The demo application is a stopwatch widget that measures and displays time intervals accurate to within hundredths of a second. The application interface is a dial that has a second hand, two small dials that display tenths and hundredths of a second, and a digital display that shows time elapsed in minutes, seconds, and tenths and hundredths of a second. On the top of the main dial there are two buttons, green and red. The green button starts or stops the time measure. Once the green button is pressed during time measure, the stopwatch stops indicating the time elapsed, however the actual time measuring continues. This feature allows recording intermediate results. The red button resets the elapsed time.</p>
<table border="0" cellspacing="0" cellpadding="2" width="500">
<tbody>
<tr>
<td class="grey3" align="center"><img class="aligncenter" src="http://javafx.com/releases/preview1/docs/tutorials/images/StopwatchN.png" alt=" Stopwatch Widget" width="286" height="297" /></p>
<div class="pad3"><span class="dkcaption1">Figure 1: Stopwatch Widget </span></div>
</td>
</tr>
</tbody>
</table>
<h3>Creating the Application GUI</h3>
<p align="justify">The demo uses a number of JavaFX SDK Runtime classes to build the application UI and implement graphical effects.</p>
<p>The following code draws the inner and the outer circle of the main stopwatch. Note the use of the <kbd>Circle</kbd>, <kbd>LinearGradient</kbd>, and <kbd>RadialGradient</kbd> classes. These classes are used to draw circles with a 140- and 134- pixel radius and fill them with the linear and radial gradient respectively. The radius of the circle is defined by the <kbd>radius</kbd> attribute,  the  start and end colors of the gradient are defined using the  <kbd>Stop</kbd> and <kbd>color</kbd> attributes.</p>
<pre>Group { translateX: 40 translateY: 40 content: [
  Circle {
    centerX: 140
    centerY: 140
    radius: 140
    fill:LinearGradient { startX:0 startY:0 endX:1 endY:1
      stops: [
        Stop { offset:0 color: webcolor("#3c3c3c") },
        Stop { offset:1 color: webcolor("#010101") }
      ]
    }
  },
Circle {
  centerX: 140
  centerY: 140
  radius: 134
  fill: RadialGradient { centerX:0.5 centerY:0.5 radius:0.5
    stops: [
      Stop { offset:0 color: rgba(20,20,20,1) },
      Stop { offset:0.9499 color: rgba(20,20,20,1) },
      Stop { offset:0.95 color: rgba(20,20,20,1) },
      Stop { offset:0.975 color: rgba(20,20,20,1) },
      Stop { offset:1 color: rgba(84,84,84,0) }
    ]
  }
},
...</pre>
<p>Also note that the <kbd>Group</kbd> class groups the two circles to enable them share a coordinate space and to be transformed as a group.</p>
<p>The  numbers "0", "15, "30", "45" below the tick marks are implemented using the <kbd>Text</kbd> class. Here is the code that draws a white "0".</p>
<pre>Text {
  font: Font{name: "Courier" size: 16, style: FontStyle.BOLD}
  x: 141 y: 47
  content: "0"
  horizontalAlignment: HorizontalAlignment.CENTER
  fill: webcolor("#FFFFFF")
},
...</pre>
<p>Note that the code uses <kbd>font</kbd> to set the font style and its size, <kbd>x</kbd> and <kbd>y</kbd> attributes to define the position of the tick mark, and <kbd>content</kbd> to display "0". It also fills the tick mark with yellow using <kbd>fill</kbd> with a defined  web code for this color.</p>
<p>The hand of the main dial comprises of two rectangles and a circle created using the <kbd>Circle</kbd> and  <kbd>Rectangle</kbd> classes. Additionally,   lighting effect is applied to the dial using<kbd> Lighting</kbd> class:</p>
<pre>Group {
  content: [
    Group {
      content: [
        Circle {centerX: 140 centerY: 140 radius: 8
          fill: webcolor("#FF0000")},
        Rectangle{x: -1.5 y: -20 width: 3 height: 120
            fill: webcolor("#FF0000")
            rotate: bind handAngle
            translateX: 140
            translateY: 140},
        Rectangle{x: -1.5 y: -40 width: 3 height: 20
            fill: webcolor("#FFFFFF")
            rotate: bind handAngle
            translateX: 140
            translateY: 140}
      ]
      effect: Lighting{
        light: DistantLight {azimuth: 225}
      }
    }
  ]
...</pre>
<p>(<a href="http://javafx.com/releases/preview1/docs/tutorials/GUI/index.html" target="_blank">more</a>)</p>
<h2>Demo: JavaFX, creating a sphere with shadow on silveiraneto.net</h2>
<p><a href="http://silveiraneto.net/2008/07/31/javafx-creating-a-sphere-with-shadow/">Silveira Neto describes on your blog an interesting  JavaFX demo and its graphics potentialities.</a></p>
<p>This is a short tutorial about some JavaFX elements like ellipses, circles, effects and gradients.</p>
<p>In the first code we are creating a frame with a ellipse with center in (120,140), 60 pixels of horizontal radius, 20 pixels of vertical radius and color black. We have also a circle with center in (100,100), 50 pixels of radius and color red. The idea is make this circle appears like a sphere and make the ellipse look like a shadow.</p>
<pre class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://silveiraneto.net/2008/07/31/javafx-creating-a-sphere-with-shadow/#">view plain</a><a href="http://silveiraneto.net/2008/07/31/javafx-creating-a-sphere-with-shadow/#" target="_blank">copy to clipboard</a><a href="http://silveiraneto.net/2008/07/31/javafx-creating-a-sphere-with-shadow/#">print</a><a href="http://silveiraneto.net/2008/07/31/javafx-creating-a-sphere-with-shadow/#">?</a></div>
</div>
<ol class="dp-j">
<li class="alt"><span><span class="keyword">import</span><span> javafx.application.*; </span></span></li>
<li><span><span class="keyword">import</span><span> javafx.scene.paint.*; </span></span></li>
<li class="alt"><span><span class="keyword">import</span><span> javafx.scene.geometry.*; </span></span></li>
<li><span> </span></li>
<li class="alt"><span>Frame { </span></li>
<li><span> title: <span class="string">"JavaFX Sphere"</span><span>, width: </span><span class="number">300</span><span>, height: </span><span class="number">300</span><span>, visible: </span><span class="keyword">true</span><span> </span></span></li>
<li class="alt"><span> stage: Stage { </span></li>
<li><span> content: [ </span></li>
<li class="alt"><span> Ellipse { </span></li>
<li><span> centerX: <span class="number">120</span><span>, centerY: </span><span class="number">140</span><span>, radiusX: </span><span class="number">60</span><span>, radiusY: </span><span class="number">20</span><span> </span></span></li>
<li class="alt"><span> fill: Color.BLACK </span></li>
<li><span> }, </span></li>
<li class="alt"><span> Circle { centerX: <span class="number">100</span><span>, centerY: </span><span class="number">100</span><span>, radius: </span><span class="number">50</span><span>, fill: Color.RED } </span></span></li>
<li><span> ] </span></li>
<li class="alt"><span> } </span></li>
<li><span>} </span></li>
</ol>
</pre>
<pre class="dp-highlighter">
<div class="bar">
<div class="tools"><a href="http://silveiraneto.net/2008/07/31/javafx-creating-a-sphere-with-shadow/#">view plain</a><a href="http://silveiraneto.net/2008/07/31/javafx-creating-a-sphere-with-shadow/#" target="_blank">copy to clipboard</a><a href="http://silveiraneto.net/2008/07/31/javafx-creating-a-sphere-with-shadow/#">print</a><a href="http://silveiraneto.net/2008/07/31/javafx-creating-a-sphere-with-shadow/#">?</a></div>
</div>
<ol class="dp-j">
<li class="alt"><span><span class="keyword">import</span><span> javafx.application.*; </span></span></li>
<li><span><span class="keyword">import</span><span> javafx.scene.paint.*; </span></span></li>
<li class="alt"><span><span class="keyword">import</span><span> javafx.scene.geometry.*; </span></span></li>
<li><span> </span></li>
<li class="alt"><span>Frame { </span></li>
<li><span> title: <span class="string">"JavaFX Sphere"</span><span>, width: </span><span class="number">300</span><span>, height: </span><span class="number">300</span><span>, visible: </span><span class="keyword">true</span><span> </span></span></li>
<li class="alt"><span> stage: Stage { </span></li>
<li><span> content: [ </span></li>
<li class="alt"><span> Ellipse { </span></li>
<li><span> centerX: <span class="number">120</span><span>, centerY: </span><span class="number">140</span><span>, radiusX: </span><span class="number">60</span><span>, radiusY: </span><span class="number">20</span><span> </span></span></li>
<li class="alt"><span> fill: Color.BLACK </span></li>
<li><span> }, </span></li>
<li class="alt"><span> Circle { centerX: <span class="number">100</span><span>, centerY: </span><span class="number">100</span><span>, radius: </span><span class="number">50</span><span>, fill: Color.RED } </span></span></li>
<li><span> ] </span></li>
<li class="alt"><span> } </span></li>
<li><span>} </span></li>
</ol>
</pre>
<pre class="jfx" style="display:none;">import javafx.application.*;
import javafx.scene.paint.*;
import javafx.scene.geometry.*;

Frame {
    title: "JavaFX Sphere", width: 300, height: 300, visible: true
    stage: Stage {
        content: [
            Ellipse {
                 centerX: 120, centerY: 140, radiusX: 60, radiusY: 20
                 fill: Color.BLACK
            },
            Circle { centerX: 100, centerY: 100, radius: 50, fill: Color.RED }
        ]
    }
}</pre>
<p style="text-align:left;"><img class="size-full wp-image-1021 aligncenter" title="JavaFX" src="http://silveiraneto.net/wp-content/uploads/2008/07/javafx_sphere_1.png" alt="" width="322" height="323" />Now we will just add two thing, a effect and a radial gradient.</p>
<p>First we’ll just add javafx.scene.effect.* to our import list and just call the gaussian blur effect in our ellipse with</p>
<div class="dp-highlighter nogutter">
<ol class="dp-j">
<li class="alt">
<pre><span><span>effect: GaussianBlur{ radius: </span><span class="number">20</span><span> } </span></span></pre>
</li>
</ol>
</div>
<div class="dp-highlighter nogutter">
<ol class="dp-j">
<li class="alt">
<pre><span><span>effect: GaussianBlur{ radius: </span><span class="number">20</span><span> }</span></span>
<span><span>
</span></span></pre>
</li>
</ol>
</div>
<div class="dp-highlighter nogutter">(<a href="http://silveiraneto.net/2008/07/31/javafx-creating-a-sphere-with-shadow/" target="_blank">more</a>)</div>
<h3 class="dp-highlighter nogutter"></h3>
<div class="dp-highlighter nogutter">
<h2>Another Demo from silveiraneto.net: JavaFX, game demo</h2>
<p><a href="http://silveiraneto.net/2008/08/24/javafx-game-demo/" target="_blank">From James Weaver's Blog  I found another intersting JavaFx demo made by  Silveira Neto. </a></p>
<p>I've featured Silveira Neto's JavaFX work (play?) in a couple of <a href="http://learnjavafx.typepad.com/weblog/2008/08/dragging-graphi.html" target="_blank">recent</a> <a href="http://learnjavafx.typepad.com/weblog/2008/08/i-hear-voices-p.html" target="_blank">posts</a>, and it appears that he's had gaming on his mind lately.  Silveira is a CS student, CEJUG member and Sun Campus Ambassador at Federal University of Ceará.</p>
<p style="text-align:center;"><a href="http://silveiraneto.net/2008/08/24/javafx-game-demo/" target="_blank"><img class="aligncenter" style="border:0 none;" title="Netoblackdotgame" src="http://learnjavafx.typepad.com/weblog/images/2008/08/25/netoblackdotgame.png" border="0" alt="Netoblackdotgame" width="450" height="360" /></a></p>
<p>His latest creation, shown above, is a game in which the player tries to vacuum up the dirty clouds with a sphere-shaped cleaner.  It demonstrates several techniques in JavaFX, such as creating a side-scrolling game, capturing keyboard input, and ascertaining when a graphical object intersects with a pixel in another graphical object.  You can see more information, including the source code and a YouTube video of the game being played, from <a href="http://silveiraneto.net/2008/08/24/javafx-game-demo/" target="_blank">Silveira's blog post</a>.</p>
<p>In a prior post, Silveira discusses <a href="http://silveiraneto.net/2008/08/18/javafx-side-scrolling-gamming/" target="_blank">how to create a side-scrolling game in JavaFX</a>, showing the classes that he's building to support it.</div>
<p style="text-align:right;"><em>[wikipedia.org]<br />
[http://javafx.com/]<br />
[http://silveiraneto.net/]<br />
[http://learnjavafx.typepad.com]<br />
[javapassion.com]</em></p>
<p><!-- AddThis Button BEGIN --> <a title="Bookmark and Share" href="http://www.addthis.com/bookmark.php?wt=nw&#38;logo=http://mauriziostorani.wordpress.com/files/2008/07/logo_for_add.jpg&#38;pub=flamel&#38;url=http://mauriziostorani.wordpress.com/2008/09/07/javafx-tutorials-and-demos&#38;title=JavaFX: Tutorials and Demos" target="_blank"><img class="alignleft" src="http://s9.addthis.com/button1-bm.gif" border="0" alt="Bookmark and Share" width="125" height="16" /></a> <!-- AddThis Button END --></p>
]]></content:encoded>
</item>

</channel>
</rss>
