<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: JavaFX Light Bulb with improved UI performance</title>
	<atom:link href="http://blog.cedarsoft.com/2010/04/javafx-light-bulb-with-improved-ui-performance-slider/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cedarsoft.com/2010/04/javafx-light-bulb-with-improved-ui-performance-slider/</link>
	<description>A blog about Java and (related) Open Source tools...</description>
	<lastBuildDate>Wed, 25 Jan 2012 12:18:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: johannes</title>
		<link>http://blog.cedarsoft.com/2010/04/javafx-light-bulb-with-improved-ui-performance-slider/comment-page-1/#comment-83</link>
		<dc:creator>johannes</dc:creator>
		<pubDate>Sat, 01 May 2010 11:38:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cedarsoft.com/?p=246#comment-83</guid>
		<description>Very nice idea! I will take a closer look at your code. At least for sliders this seems to be a very good approach.

But I think for this demo particular demo it won&#039;t work. The change of the opacity takes too long.</description>
		<content:encoded><![CDATA[<p>Very nice idea! I will take a closer look at your code. At least for sliders this seems to be a very good approach.</p>
<p>But I think for this demo particular demo it won&#8217;t work. The change of the opacity takes too long.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Powell</title>
		<link>http://blog.cedarsoft.com/2010/04/javafx-light-bulb-with-improved-ui-performance-slider/comment-page-1/#comment-82</link>
		<dc:creator>Dan Powell</dc:creator>
		<pubDate>Thu, 29 Apr 2010 17:43:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cedarsoft.com/?p=246#comment-82</guid>
		<description>This great technique should work for Swing too.</description>
		<content:encoded><![CDATA[<p>This great technique should work for Swing too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jasper Potts</title>
		<link>http://blog.cedarsoft.com/2010/04/javafx-light-bulb-with-improved-ui-performance-slider/comment-page-1/#comment-81</link>
		<dc:creator>Jasper Potts</dc:creator>
		<pubDate>Wed, 28 Apr 2010 14:58:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cedarsoft.com/?p=246#comment-81</guid>
		<description>Another way to do it is to round the slider value to the nearest X. Where X depends on how many stops you want between min and max.  Below is some example code showing how to limit a slider to 10 stops between min and max. This should be much lighter weight than using a Timer.

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.control.Slider;

var text:Text;
var slider:Slider;

def numberOfStops = 10;
def factor = bind 1/ ((slider.max - slider.min)/numberOfStops);
var sliderValue = bind ((slider.value*factor) as Integer) / factor;

Stage {
    scene: Scene {
        width: 250
        height: 150
        content: [
            text = Text {
                font : Font { size : 16 }
                x: 10
                y: 30
                content: bind &quot;Slider value = {slider.value}\n  sliderValue={sliderValue}&quot;
            }
            slider = Slider {
                layoutX: 20
                layoutY: 80
                min: 0
                max: 0.4
                majorTickUnit: 2
                minorTickCount: 1
                snapToTicks: true
            }

        ]
    }
}</description>
		<content:encoded><![CDATA[<p>Another way to do it is to round the slider value to the nearest X. Where X depends on how many stops you want between min and max.  Below is some example code showing how to limit a slider to 10 stops between min and max. This should be much lighter weight than using a Timer.</p>
<p>import javafx.stage.Stage;<br />
import javafx.scene.Scene;<br />
import javafx.scene.text.Text;<br />
import javafx.scene.text.Font;<br />
import javafx.scene.control.Slider;</p>
<p>var text:Text;<br />
var slider:Slider;</p>
<p>def numberOfStops = 10;<br />
def factor = bind 1/ ((slider.max &#8211; slider.min)/numberOfStops);<br />
var sliderValue = bind ((slider.value*factor) as Integer) / factor;</p>
<p>Stage {<br />
    scene: Scene {<br />
        width: 250<br />
        height: 150<br />
        content: [<br />
            text = Text {<br />
                font : Font { size : 16 }<br />
                x: 10<br />
                y: 30<br />
                content: bind "Slider value = {slider.value}\n  sliderValue={sliderValue}"<br />
            }<br />
            slider = Slider {<br />
                layoutX: 20<br />
                layoutY: 80<br />
                min: 0<br />
                max: 0.4<br />
                majorTickUnit: 2<br />
                minorTickCount: 1<br />
                snapToTicks: true<br />
            }</p>
<p>        ]<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johannes</title>
		<link>http://blog.cedarsoft.com/2010/04/javafx-light-bulb-with-improved-ui-performance-slider/comment-page-1/#comment-80</link>
		<dc:creator>johannes</dc:creator>
		<pubDate>Wed, 28 Apr 2010 08:09:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cedarsoft.com/?p=246#comment-80</guid>
		<description>Thanks for the hint. I just used a JNLP created by Netbeans. Obviously I should have looked at it first... Thanks.</description>
		<content:encoded><![CDATA[<p>Thanks for the hint. I just used a JNLP created by Netbeans. Obviously I should have looked at it first&#8230; Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Smith</title>
		<link>http://blog.cedarsoft.com/2010/04/javafx-light-bulb-with-improved-ui-performance-slider/comment-page-1/#comment-79</link>
		<dc:creator>John Smith</dc:creator>
		<pubDate>Tue, 27 Apr 2010 20:11:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cedarsoft.com/?p=246#comment-79</guid>
		<description>Nice post, I noticed that the slider was really unresponsive when I first tried that demo a few times ago - I thought it was due to poor performance of the JavaFX runtime rather than inefficient application code.

The launch button on this page does not work at this time:
  com.sun.deploy.net.FailedDownloadException: Unable to load resource: file:/home/johannes/NetBeansProjects/fx-commons/dist/fx-commons.jnlp</description>
		<content:encoded><![CDATA[<p>Nice post, I noticed that the slider was really unresponsive when I first tried that demo a few times ago &#8211; I thought it was due to poor performance of the JavaFX runtime rather than inefficient application code.</p>
<p>The launch button on this page does not work at this time:<br />
  com.sun.deploy.net.FailedDownloadException: Unable to load resource: file:/home/johannes/NetBeansProjects/fx-commons/dist/fx-commons.jnlp</p>
]]></content:encoded>
	</item>
</channel>
</rss>

