<?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; ball</title>
	<atom:link href="http://silveiraneto.net/tag/ball/feed/" rel="self" type="application/rss+xml" />
	<link>http://silveiraneto.net</link>
	<description></description>
	<lastBuildDate>Fri, 09 Mar 2012 04:13:27 +0000</lastBuildDate>
	<language>pt-br</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Draggable and Growable Ball in JavaFX</title>
		<link>http://silveiraneto.net/2008/02/16/draggable-and-growable-ball-in-javafx/</link>
		<comments>http://silveiraneto.net/2008/02/16/draggable-and-growable-ball-in-javafx/#comments</comments>
		<pubDate>Sun, 17 Feb 2008 00:41:52 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[ball]]></category>
		<category><![CDATA[código]]></category>
		<category><![CDATA[draggable]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[growable]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[jfx]]></category>
		<category><![CDATA[jfxbest]]></category>
		<category><![CDATA[openjfx]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[red ball]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[vídeo]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/2008/02/16/draggable-and-growable-ball-in-javafx/</guid>
		<description><![CDATA[<a href="http://silveiraneto.net/2008/02/16/draggable-and-growable-ball-in-javafx/" title="Draggable and Growable Ball in JavaFX"></a>Two simple JavaFX code handling onMouseDragged event. import javafx.ui.*; import javafx.ui.canvas.*; Canvas { content: Circle { var x = 50 var y = 50 transform: bind translate(x, y) radius: 30 fill: red onMouseDragged: operation(e) { x += e.localDragTranslation.x; y += &#8230;<p class="read-more"><a href="http://silveiraneto.net/2008/02/16/draggable-and-growable-ball-in-javafx/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://silveiraneto.net/2008/02/16/draggable-and-growable-ball-in-javafx/" title="Draggable and Growable Ball in JavaFX"></a><p>Two simple JavaFX code handling onMouseDragged event.</p>
<p><center><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/M6G_N80UvZg&#038;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/M6G_N80UvZg&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></center></p>
<pre name="code" class="JAVA">
import javafx.ui.*;
import javafx.ui.canvas.*;

Canvas {
    content: Circle {
        var x = 50
        var y = 50
        transform: bind translate(x, y)
        radius: 30
        fill: red
        onMouseDragged: operation(e) {
                x += e.localDragTranslation.x;
                y += e.localDragTranslation.y;

        }
    }
}
</pre>
<p><center><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/XvMGQomAcnc&#038;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/XvMGQomAcnc&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></center></p>
<pre name="code" class="JAVA">
import javafx.ui.*;
import javafx.ui.canvas.*;

Canvas {
    content: Circle {
        var x = 50
        var y = 50
        var radius = 30
        transform: bind translate(x, y)
        radius: bind radius
        fill: red
        onMouseDragged: operation(e) {
            if (e.button == 1){
                x += e.localDragTranslation.x;
                y += e.localDragTranslation.y;
            }
            if (e.button == 3) {
                radius += e.localDragTranslation.x;
            }
        }
    }
}
</pre>
<p><center><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/VOdjY8lR51Y&#038;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/VOdjY8lR51Y&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></center></p>
<pre name="code" class="JAVA">
import javafx.ui.*;
import javafx.ui.canvas.*;

Canvas {
    content: [
    Rect {x: 50, y: 50, width: 50, height: 50, fill: orange },
    Circle {
        var x = 50
        var y = 50
        var radius = 30
        var color = red:Color
        transform: bind translate(x, y)
        radius: bind radius
        fill: bind color
        onMouseDragged: operation(e) {
            if (e.button == 1){
                x += e.localDragTranslation.x;
                y += e.localDragTranslation.y;
            }
            if (e.button == 3) {
                radius += e.localDragTranslation.x;
            }
        }
        onMousePressed: operation(e){
            color = Color {blue: 0.0, green: 0.0, red: 1.0, opacity: 0.5};
        }
        onMouseReleased: operation(e){
            color = red:Color;
        }
    }]
}
</pre>
<p>You can test this examples with thhe <a href="http://download.java.net/general/openjfx/demos/javafxpad.jnlp">JavaFX Pad</a> or using Netbeans with the <a href="http://javafx.netbeans.org/">JavaFX Plugin</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2008/02/16/draggable-and-growable-ball-in-javafx/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

