<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Java, JavaFX and beyond...</title>
	<atom:link href="http://javaria.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://javaria.wordpress.com</link>
	<description>by Rakesh Menon</description>
	<lastBuildDate>Sat, 19 Mar 2011 07:16:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='javaria.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Java, JavaFX and beyond...</title>
		<link>http://javaria.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://javaria.wordpress.com/osd.xml" title="Java, JavaFX and beyond..." />
	<atom:link rel='hub' href='http://javaria.wordpress.com/?pushpress=hub'/>
		<item>
		<title>JavaFX – Rotate Chart Axis Label</title>
		<link>http://javaria.wordpress.com/2010/06/12/javafx-%e2%80%93-rotate-chart-axis-label/</link>
		<comments>http://javaria.wordpress.com/2010/06/12/javafx-%e2%80%93-rotate-chart-axis-label/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 08:51:34 +0000</pubDate>
		<dc:creator>Rakesh Menon</dc:creator>
				<category><![CDATA[javafx]]></category>
		<category><![CDATA[BarChart]]></category>
		<category><![CDATA[chart]]></category>

		<guid isPermaLink="false">http://javaria.wordpress.com/?p=817</guid>
		<description><![CDATA[It will be difficult to fit in long labels when they are horizontal. Labels will overlap. So it may be nice to rotate the label by small angle so as to fit long text. We may do this by customizing CategoryAxis. As of now it depends on some internal implementation, but it will be nice [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=817&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
It will be difficult to fit in long labels when they are horizontal. Labels will overlap. So it may be nice to rotate the label by small angle so as to fit long text. We may do this by customizing <a href="http://java.sun.com/javafx/1.3/docs/api/javafx.scene.chart.part/javafx.scene.chart.part.CategoryAxis.html">CategoryAxis</a>. As of now it depends on some internal implementation, but it will be nice to have this feature as part of public API <img src="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" />
</p>
<p><div align="center">
<a href="http://javafxdemos.googlecode.com/hg/resource/ChartRotateLabel/ChartRotateLabel.html"><img src="http://javafxdemos.googlecode.com/hg/resource/ChartRotateLabel/ChartRotateLabel.png" border="0"></a>
</div>
</p>
<p>
For Applet mode, click on above image. For standalone mode <a href="http://javafxdemos.googlecode.com/hg/resource/ChartRotateLabel/ChartRotateLabel.jnlp"><img src="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg"></a>
</p>
<p>
Try it out and let me know feedback <img src="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" />
</p>
<p>
<a href="http://code.google.com/p/javafxdemos/source/browse/#hg/ChartRotateLabel/src/chartrotatelabel"><img src="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" border="0" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javaria.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javaria.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javaria.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javaria.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javaria.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javaria.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javaria.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javaria.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javaria.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javaria.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javaria.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javaria.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javaria.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javaria.wordpress.com/817/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=817&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javaria.wordpress.com/2010/06/12/javafx-%e2%80%93-rotate-chart-axis-label/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2698941d353dbc9bcec4a52ce47e0c25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rakesh Menon</media:title>
		</media:content>

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/ChartRotateLabel/ChartRotateLabel.png" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" medium="image" />
	</item>
		<item>
		<title>JavaFX[1.3] – Power of CSS</title>
		<link>http://javaria.wordpress.com/2010/05/28/javafx1-3-%e2%80%93-power-of-css/</link>
		<comments>http://javaria.wordpress.com/2010/05/28/javafx1-3-%e2%80%93-power-of-css/#comments</comments>
		<pubDate>Fri, 28 May 2010 11:24:36 +0000</pubDate>
		<dc:creator>Rakesh Menon</dc:creator>
				<category><![CDATA[javafx]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[listview]]></category>
		<category><![CDATA[treeview]]></category>

		<guid isPermaLink="false">http://javaria.wordpress.com/?p=812</guid>
		<description><![CDATA[There was a question related to setting of background color for TreeView. Yes we can do lot of customization of Controls using CSS. It may be a bit difficult at this point of time due to lack of proper documentation. But you can start playing with CSS using StyleEditor sample. Below samples shows ListView and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=812&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
There was a question related to setting of background color for TreeView. Yes we can do lot of customization of Controls using CSS. It may be a bit difficult at this point of time due to lack of proper documentation. But you can start playing with CSS using <a href="http://javafx.com/samples/StyleEditor/">StyleEditor</a> sample.
</p>
<p>
Below samples shows ListView and TreeView customized using <a href="http://code.google.com/p/javafxdemos/source/browse/CSSPower/src/csspower/javafx.css">javafx.css</a> file. Thanks to <a href="http://www.jasperpotts.com/blog/">Jasper Potts</a> for help <img src="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" />
</p>
</p>
<p><a href="http://javafxdemos.googlecode.com/hg/resource/CSSPower/CSSPower.html"><img src="http://javafxdemos.googlecode.com/hg/resource/CSSPower/CSSPower.jpg" border="0"></a>
</p>
<p>
For Applet mode, click on above image. For standalone mode <a href="http://javafxdemos.googlecode.com/hg/resource/CSSPower/CSSPower.jnlp"><img src="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg"></a>
</p>
<p>
Try it out and let me know feedback <img src="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" /> It will be much much easier once the official documentation is in place..
</p>
<p>
<a href="http://code.google.com/p/javafxdemos/source/browse/#hg/CSSPower/src/csspower"><img src="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" border="0" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javaria.wordpress.com/812/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javaria.wordpress.com/812/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javaria.wordpress.com/812/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javaria.wordpress.com/812/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javaria.wordpress.com/812/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javaria.wordpress.com/812/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javaria.wordpress.com/812/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javaria.wordpress.com/812/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javaria.wordpress.com/812/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javaria.wordpress.com/812/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javaria.wordpress.com/812/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javaria.wordpress.com/812/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javaria.wordpress.com/812/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javaria.wordpress.com/812/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=812&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javaria.wordpress.com/2010/05/28/javafx1-3-%e2%80%93-power-of-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2698941d353dbc9bcec4a52ce47e0c25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rakesh Menon</media:title>
		</media:content>

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/CSSPower/CSSPower.jpg" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" medium="image" />
	</item>
		<item>
		<title>JavaFX [1.3] &#8211; TableView (?)</title>
		<link>http://javaria.wordpress.com/2010/05/22/javafx-1-3-tableview/</link>
		<comments>http://javaria.wordpress.com/2010/05/22/javafx-1-3-tableview/#comments</comments>
		<pubDate>Sat, 22 May 2010 12:40:33 +0000</pubDate>
		<dc:creator>Rakesh Menon</dc:creator>
				<category><![CDATA[javafx]]></category>
		<category><![CDATA[1.3]]></category>
		<category><![CDATA[tableview]]></category>

		<guid isPermaLink="false">http://javaria.wordpress.com/?p=808</guid>
		<description><![CDATA[Yes! TableView or Data-Grid is really important control and must be included in JavaFX. If you are really in hurry and can use JavaFX 1.2, you can use XTableView from JFXtras. They are also working on 1.3 complaint version. If both these strategies failed, you can still put together TableView using a group of ListView. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=808&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
Yes! TableView or Data-Grid is really important control and must be included in JavaFX. If you are really in hurry and can use JavaFX 1.2, you can use <a href="http://steveonjava.com/jfxtras-0-6-final-released/">XTableView from JFXtras</a>. They are also working on 1.3 complaint version.
</p>
<p>
If both these strategies failed, you can still put together TableView using a group of <a href="http://java.sun.com/javafx/1.3/docs/api/javafx.scene.control/javafx.scene.control.ListView.html">ListView</a>. All foundation for implementing a scalable TableView is already in place based on <a href="http://java.sun.com/javafx/1.3/docs/api/javafx.scene.control/javafx.scene.control.Cell.html">Cell</a> API.
</p>
<p>
<a href="http://javafxdemos.googlecode.com/hg/resource/JavaFXTable/JavaFXTable.html"><img src="http://javafxdemos.googlecode.com/hg/resource/JavaFXTable/JavaFXTable.png" border="0"></a><br />
<br />For Applet mode, click on above image<br />
For standalone mode <a href="http://javafxdemos.googlecode.com/hg/resource/JavaFXTable/JavaFXTable.jnlp"><img src="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg" border="0"><br />
</a>
</p>
<p>
Mean while you can use above TableView implementation. View is constructed using a set of ListView. The data model is direct copy of Swing. So didn&#8217;t really put any effort for implementing this&#8230;
</p>
<p>
Please try it out and let me know feedback.. <img src="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif">
</p>
<p>
<a href="http://code.google.com/p/javafxdemos/source/browse/#hg/JavaFXTable/src/javafxtable/control"><img src="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" border="0"></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javaria.wordpress.com/808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javaria.wordpress.com/808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javaria.wordpress.com/808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javaria.wordpress.com/808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javaria.wordpress.com/808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javaria.wordpress.com/808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javaria.wordpress.com/808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javaria.wordpress.com/808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javaria.wordpress.com/808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javaria.wordpress.com/808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javaria.wordpress.com/808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javaria.wordpress.com/808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javaria.wordpress.com/808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javaria.wordpress.com/808/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=808&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javaria.wordpress.com/2010/05/22/javafx-1-3-tableview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2698941d353dbc9bcec4a52ce47e0c25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rakesh Menon</media:title>
		</media:content>

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/JavaFXTable/JavaFXTable.png" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" medium="image" />
	</item>
		<item>
		<title>JavaFX [1.3] – TreeView</title>
		<link>http://javaria.wordpress.com/2010/05/10/javafx-1-3-%e2%80%93-treeview/</link>
		<comments>http://javaria.wordpress.com/2010/05/10/javafx-1-3-%e2%80%93-treeview/#comments</comments>
		<pubDate>Mon, 10 May 2010 03:59:26 +0000</pubDate>
		<dc:creator>Rakesh Menon</dc:creator>
				<category><![CDATA[javafx]]></category>
		<category><![CDATA[1.3]]></category>
		<category><![CDATA[treeview]]></category>

		<guid isPermaLink="false">http://javaria.wordpress.com/?p=802</guid>
		<description><![CDATA[JavaFX 1.3 has TreeView as preview control. Here I&#8217;ll demonstrate how to use it to implement a File Browser. For this, we need to implement a custom TreeView.cellFactory which will return a TreeCell instance (View) and provide an implementation for TreeItem (Model). TreeItem.createChildren is implemented so as to add more and more items, as and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=802&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
JavaFX 1.3 has <a href="http://java.sun.com/javafx/1.3/docs/api/com.javafx.preview.control/com.javafx.preview.control.TreeView.html">TreeView</a> as preview control. Here I&#8217;ll demonstrate how to use it to implement a File Browser. For this, we need to implement a custom <b>TreeView.cellFactory</b> which will return a <a href="http://java.sun.com/javafx/1.3/docs/api/com.javafx.preview.control/com.javafx.preview.control.TreeCell.html">TreeCell</a> instance (View) and provide an implementation for <a href="http://java.sun.com/javafx/1.3/docs/api/com.javafx.preview.control/com.javafx.preview.control.TreeItem.html">TreeItem</a> (Model). <b>TreeItem.createChildren</b> is implemented so as to add more and more items, as and when user expands the nodes (Drive/Directory).
</p>
<p>
<a href="http://javafxdemos.googlecode.com/hg/resource/FileBrowser/FileBrowser.html"><img src="http://javafxdemos.googlecode.com/hg/resource/FileBrowser/FileBrowser.png" border="0"></a>
</p>
<p>
For Applet mode, click on above image
</p>
<p>
For standalone mode <a href="http://javafxdemos.googlecode.com/hg/resource/FileBrowser/FileBrowser.jnlp"><img src="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg"></a>
</p>
<p>
Try all preview controls and give your valuable feedback and file RFEs/Bugs in <a href="http://javafx-jira.kenai.com/secure/Dashboard.jspa">JavaFX &#8211; JIRA</a> <img src="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" />
</p>
<p>
<a href="http://code.google.com/p/javafxdemos/source/browse/#hg/FileBrowser/src/filebrowser"><img src="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" border="0" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javaria.wordpress.com/802/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javaria.wordpress.com/802/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javaria.wordpress.com/802/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javaria.wordpress.com/802/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javaria.wordpress.com/802/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javaria.wordpress.com/802/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javaria.wordpress.com/802/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javaria.wordpress.com/802/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javaria.wordpress.com/802/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javaria.wordpress.com/802/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javaria.wordpress.com/802/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javaria.wordpress.com/802/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javaria.wordpress.com/802/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javaria.wordpress.com/802/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=802&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javaria.wordpress.com/2010/05/10/javafx-1-3-%e2%80%93-treeview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2698941d353dbc9bcec4a52ce47e0c25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rakesh Menon</media:title>
		</media:content>

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/FileBrowser/FileBrowser.png" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" medium="image" />
	</item>
		<item>
		<title>JavaFX + Facebook</title>
		<link>http://javaria.wordpress.com/2010/05/03/javafx-facebook/</link>
		<comments>http://javaria.wordpress.com/2010/05/03/javafx-facebook/#comments</comments>
		<pubDate>Mon, 03 May 2010 10:11:58 +0000</pubDate>
		<dc:creator>Rakesh Menon</dc:creator>
				<category><![CDATA[javafx]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://javaria.wordpress.com/?p=795</guid>
		<description><![CDATA[One of my previous post discussed about OAuth based authentication for Twitter, LinkedIn and Yahoo. Here I&#8217;ll discuss about authentication and usage of Facebook. It also provides OAuth based authentication, but the flow and usage is slightly different. Please refer to Desktop Application Authentication for more information. For new application, please ensure that you register [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=795&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
One of my previous <a href="http://javaria.wordpress.com/2010/04/15/javafx-oauth/">post</a> discussed about <a href="http://en.wikipedia.org/wiki/OAuth">OAuth</a> based authentication for Twitter, LinkedIn and Yahoo. Here I&#8217;ll discuss about authentication and usage of Facebook. It also provides OAuth based authentication, but the flow and usage is slightly different. Please refer to <a href="http://developers.facebook.com/docs/authentication/desktop">Desktop Application Authentication</a> for more information.
</p>
<p>
For new application, please ensure that you <a href="http://developers.facebook.com/setup/">register your application</a> with Facebook. Specify <b>Connect URL</b> as base URL of deployed applet. Note down <b>Application ID</b> which will be used as <b>client_id</b>. Using client_id and Applet URL we can create the authorization URL as shown below.
</p>
<p>
<a href="https://graph.facebook.com/oauth/authorize?client_id=113187112053972&amp;redirect_uri=http://javafxdemos.googlecode.com/hg/resource/JavaFXFacebook/JavaFXFacebook.html&amp;type=user_agent"><img src="http://javafxdemos.googlecode.com/hg/resource/images/fb_login_button.png" border="0"></a>
</p>
<p>
<b>Authentication Steps:</b></p>
<ul>
<li>Click on above link and login to Facebook</li>
<li>Authorize <b>JavaFX Sample</b> application to access your Facebook profile</li>
<li>Page will be automatically redirected to the JavaFX Applet page</li>
<li>Extract the <b>access_token</b> parameter from URL</li>
<li>Pass <b>access_token</b> to JavaFX Applet as argument</li>
<li>Use Facebook <a href="http://developers.facebook.com/docs/api"><b>Graph API</b></a> to access all rest of information</li>
</ul>
<p>
Please refer to <a href="http://code.google.com/p/javafxdemos/source/browse/resource/JavaFXFacebook/JavaFXFacebook.html">JavaFXFacebook.html</a> for more information related to extraction and passing of <b>access_token</b> and <b>client_id</b> to JavaFX Applet. The view is implemented using <a href="http://java.sun.com/javafx/1.3/docs/api/javafx.scene.control/javafx.scene.control.ListView.html">ListView</a>. Please refer to <a href="http://fxexperience.com/2010/04/new-to-javafx-1-3-cells/">New to JavaFX 1.3: Cells</a> for usage on <a href="http://java.sun.com/javafx/1.3/docs/api/javafx.scene.control/javafx.scene.control.ListView.html">ListView</a> + <a href="http://java.sun.com/javafx/1.3/docs/api/javafx.scene.control/javafx.scene.control.ListCell.html">ListCell</a> APIs.
</p>
<p>
<b>Update:</b> There was some confusion due to additional steps related to &#8220;redirection of url to applet&#8221;. Yes, Twitter, LinkedIn and Yahoo didn&#8217;t have this concept. The difference is, there user needs to copy the access_token numbers from the page and paste it in application. In case of Facebook, due to url-redirection, the access_token can be automatically passed to application as argument. So user don&#8217;t have to do any copy-paste.
</p>
<p>
Try it out and let me know feedback <img src="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" />
</p>
<p>
<a href="http://code.google.com/p/javafxdemos/source/browse/#hg/JavaFXFacebook/src/javafxfacebook"><img src="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" border="0" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javaria.wordpress.com/795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javaria.wordpress.com/795/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javaria.wordpress.com/795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javaria.wordpress.com/795/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javaria.wordpress.com/795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javaria.wordpress.com/795/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javaria.wordpress.com/795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javaria.wordpress.com/795/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javaria.wordpress.com/795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javaria.wordpress.com/795/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javaria.wordpress.com/795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javaria.wordpress.com/795/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javaria.wordpress.com/795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javaria.wordpress.com/795/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=795&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javaria.wordpress.com/2010/05/03/javafx-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2698941d353dbc9bcec4a52ce47e0c25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rakesh Menon</media:title>
		</media:content>

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/fb_login_button.png" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" medium="image" />
	</item>
		<item>
		<title>JavaFX [1.3] – Save As Image</title>
		<link>http://javaria.wordpress.com/2010/04/26/javafx-1-3-save-as-image/</link>
		<comments>http://javaria.wordpress.com/2010/04/26/javafx-1-3-save-as-image/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 11:36:32 +0000</pubDate>
		<dc:creator>Rakesh Menon</dc:creator>
				<category><![CDATA[javafx]]></category>
		<category><![CDATA[1.3]]></category>
		<category><![CDATA[node]]></category>
		<category><![CDATA[save]]></category>

		<guid isPermaLink="false">http://javaria.wordpress.com/?p=780</guid>
		<description><![CDATA[JavaFX &#8211; Save As Image code updated to be compatible with JavaFX 1.3 Please refer to JavaFX13Utils.fx for more information. You will need to update only if you are using internal APIs as mentioned in this forum thread. For Applet mode, click on above image For standalone mode Try it out and let me know [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=780&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
<a href="http://javaria.wordpress.com/2009/07/21/javafx-save-as-image/">JavaFX &#8211; Save As Image</a> code updated to be compatible with <a href="http://javafx.com/docs/articles/javafx1-3.jsp">JavaFX 1.3</a><br /> Please refer to <a href="http://code.google.com/p/javafxdemos/source/browse/SaveAsImage/src/saveasimage/JavaFX13Utils.fx">JavaFX13Utils.fx</a> for more information. You will need to update only if you are using internal APIs as mentioned in this <a href="http://forums.sun.com/thread.jspa?threadID=5392334">forum thread</a>.
</p>
<p>
<a href="http://javafxdemos.googlecode.com/hg/resource/SaveAsImage/1.3/SaveAsImage.html"><img src="http://javafxdemos.googlecode.com/hg/resource/SaveAsImage/SaveAsImage.jpg" border="0" /></a>
</p>
<p>
For Applet mode, click on above image
</p>
<p>
For standalone mode <a href="http://javafxdemos.googlecode.com/hg/resource/SaveAsImage/1.3/SaveAsImage.jnlp"><img src="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg"></a>
</p>
<p>
Try it out and let me know feedback <img src="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" />
</p>
<p>
<a href="http://code.google.com/p/javafxdemos/source/browse/#hg/SaveAsImage/src/saveasimage"><img src="/rakeshmenonp/resource/images/source_b.png" border="0" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javaria.wordpress.com/780/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javaria.wordpress.com/780/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javaria.wordpress.com/780/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javaria.wordpress.com/780/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javaria.wordpress.com/780/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javaria.wordpress.com/780/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javaria.wordpress.com/780/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javaria.wordpress.com/780/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javaria.wordpress.com/780/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javaria.wordpress.com/780/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javaria.wordpress.com/780/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javaria.wordpress.com/780/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javaria.wordpress.com/780/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javaria.wordpress.com/780/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=780&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javaria.wordpress.com/2010/04/26/javafx-1-3-save-as-image/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2698941d353dbc9bcec4a52ce47e0c25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rakesh Menon</media:title>
		</media:content>

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/SaveAsImage/SaveAsImage.jpg" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" medium="image" />
	</item>
		<item>
		<title>JavaFX + OAuth</title>
		<link>http://javaria.wordpress.com/2010/04/15/javafx-oauth/</link>
		<comments>http://javaria.wordpress.com/2010/04/15/javafx-oauth/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 07:58:43 +0000</pubDate>
		<dc:creator>Rakesh Menon</dc:creator>
				<category><![CDATA[javafx]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://javaria.wordpress.com/?p=775</guid>
		<description><![CDATA[As usual will start off with Wikipedia &#8211; OAuth (Open Authorization) &#8211; is an open standard that allows users to share their private resources (e.g. photos, videos, contact lists) stored on one site with another site without having to hand out their username and password. With more and more services moving to OAuth model, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=775&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
As usual will start off with Wikipedia &#8211; <a href="http://en.wikipedia.org/wiki/OAuth">OAuth (Open Authorization)</a> &#8211; is an open standard that allows users to share their private resources (e.g. photos, videos, contact lists) stored on one site with another site without having to hand out their username and password. With more and more services moving to <b>OAuth</b> model, I think we need to try to have a generic implementation. Here is an attempt&#8230; <img src="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" />
</p>
<p>
I prefer not to duplicate all those details available in various resources, so suggest to read few articles if you are not familiar with concepts of OAuth. <a href="http://developer.yahoo.com/oauth/guide/oauth-auth-flow.html">Yahoo has a very detailed article outlining the flow of OAuth authorization</a> or <a href="http://hueniverse.com/oauth/">Beginner&#8217;s Guide to OAuth from Hueniverse</a>. Please refer to same for more info..
</p>
<p>
You can try out yourself with demo below. You need to get consumer-key and consumer-secret from respective service providers &#8211; <a href="http://apiwiki.twitter.com/OAuth-FAQ">Twitter</a>, <a href="http://developer.linkedin.com/docs/DOC-1008">LinkedIn</a> or <a href="http://developer.yahoo.com/oauth/">Yahoo</a>
</p>
<p>
<a href="http://javafxdemos.googlecode.com/hg/resource/JavaFXOAuth/JavaFXOAuth.html"><img src="http://javafxdemos.googlecode.com/hg/resource/JavaFXOAuth/JavaFXOAuth.jpg" border="0" /></a>
</p>
<p>
<br />
To launch click on above image or <a href="http://javafxdemos.googlecode.com/hg/resource/JavaFXOAuth/JavaFXOAuth.jnlp"><img src="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg"></a>
</p>
<p>
First enter <b>oauth_consumer_key</b> and <b>oauth_secret_key</b>, click &#8220;Request Token&#8221; button. If key is proper, you will receive a message in log with a URL. Copy and paste that URL in browser and follow the instructions. Once you grant access to your application, it will return a number. Copy the number and paste it as <b>oauth_verifier</b>. Now click on &#8220;Access Token&#8221; button. It will return you <b>oauth_token</b> and <b>oauth_token_secret</b> which can be used for all subsequent communication.
</p>
<p>
Yes its a bit difficult to understand the overall flow and implementation. I have tried my best to simplify it. The API may be simplified a bit more. I have signed up for contributing to <a href="http://jfxtras.org/">JFXtras</a> long time back, but haven&#8217;t done anything yet. My objective was to pull in the various parsers that are used in different samples and create a library. I think all these can be incorporated into that&#8230;
</p>
<p>
<b>Usage:</b></p>
<div align="left" class="java">
<table border="0" cellpadding="3" cellspacing="0" bgcolor="#ffffff">
<tr>
<td nowrap="nowrap" valign="top" align="left">
                <code><br />
                    <font color="#000000">def&nbsp;oauthAPI&nbsp;=&nbsp;OAuthAPI.getInstance</font><font color="#000000">(</font><br />
                    <font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">&lt;Service-Provider&gt;,&nbsp;</font><br />
                    <font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">&lt;oauth_consumer_key&gt;,</font><br />
                    <font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">&lt;oauth_consumer_secret&gt;</font><br />
                    <font color="#000000">)</font><font color="#000000">;</font><br />
                    <font color="#ffffff"></font><br />
                    <font color="#3f7f5f">//&nbsp;Request&nbsp;Token&nbsp;Callback</font><br />
                    <font color="#000000">oauthAPI.onRequestToken&nbsp;=&nbsp;function</font><font color="#000000">(</font><font color="#000000">response:String</font><font color="#000000">)&nbsp;</font><font color="#000000">:&nbsp;Void&nbsp;</font><font color="#000000">{</font><br />
                    <font color="#ffffff"></font><br />
                    <font color="#000000">}</font><br />
                    <font color="#ffffff"></font><br />
                    <font color="#3f7f5f">//&nbsp;Access&nbsp;Token&nbsp;Callback</font><br />
                    <font color="#000000">oauthAPI.onAccessToken&nbsp;=&nbsp;function</font><font color="#000000">(</font><font color="#000000">response:String</font><font color="#000000">)&nbsp;</font><font color="#000000">:&nbsp;Void&nbsp;</font><font color="#000000">{</font><br />
                    <font color="#ffffff"></font><br />
                    <font color="#000000">}</font><br />
                    <font color="#ffffff"></font><br />
                    <font color="#3f7f5f">//&nbsp;Request&nbsp;Token</font><br />
                    <font color="#000000">oauthAPI.requestToken</font><font color="#000000">()</font><font color="#000000">;</font><br />
                    <font color="#ffffff"></font><br />
                    <font color="#3f7f5f">//&nbsp;Access&nbsp;Token</font><br />
                    <font color="#000000">oauthAPI.accessToken</font><font color="#000000">(</font><font color="#000000">&lt;oauth_verifier&gt;</font><font color="#000000">)</font><font color="#000000">;</font><br />&nbsp;<br />
                </code>
            </td>
</tr>
</table>
</div>
<p>
Refer to <a href="http://code.google.com/p/javafxdemos/source/browse/JavaFXOAuth/src/javafxoauth/api/LinkedInAPI.fx">LinkedInAPI.fx</a> to get an idea on how we can extend the implementation to have fulll fledged support.
</p>
<p>
Please try it out and let me know your suggestions and feedback.. <img src="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" />
</p>
<p>
<a href="http://code.google.com/p/javafxdemos/source/browse/#hg/JavaFXOAuth/"><img src="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" border="0" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javaria.wordpress.com/775/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javaria.wordpress.com/775/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javaria.wordpress.com/775/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javaria.wordpress.com/775/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javaria.wordpress.com/775/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javaria.wordpress.com/775/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javaria.wordpress.com/775/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javaria.wordpress.com/775/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javaria.wordpress.com/775/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javaria.wordpress.com/775/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javaria.wordpress.com/775/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javaria.wordpress.com/775/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javaria.wordpress.com/775/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javaria.wordpress.com/775/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=775&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javaria.wordpress.com/2010/04/15/javafx-oauth/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2698941d353dbc9bcec4a52ce47e0c25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rakesh Menon</media:title>
		</media:content>

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/JavaFXOAuth/JavaFXOAuth.jpg" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" medium="image" />
	</item>
		<item>
		<title>JavaFX &#8211; Modal Dialog</title>
		<link>http://javaria.wordpress.com/2010/04/05/javafx-modal-dialog/</link>
		<comments>http://javaria.wordpress.com/2010/04/05/javafx-modal-dialog/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 05:04:14 +0000</pubDate>
		<dc:creator>Rakesh Menon</dc:creator>
				<category><![CDATA[javafx]]></category>
		<category><![CDATA[modal dialog]]></category>

		<guid isPermaLink="false">http://javaria.wordpress.com/2010/04/05/javafx-modal-dialog/</guid>
		<description><![CDATA[How to implement &#8220;Modal Dialog&#8221; in JavaFX ? Before going into details of implementation, lets first have a look at common requirement for &#8220;Modal Dialog&#8221;.. It must block.. Mouse Events beyond the modal dialog Key Events beyond the modal dialog Execution of current Thread until dialog is disposed JavaSE 6 allows to specify various types [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=768&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
How to implement &#8220;Modal Dialog&#8221; in JavaFX ? Before going into details of implementation, lets first have a look at common requirement for &#8220;Modal Dialog&#8221;.. It must block..</p>
<ul>
<li>Mouse Events beyond the modal dialog</li>
<li>Key Events beyond the modal dialog</li>
<li>Execution of current Thread until dialog is disposed</li>
</ul>
<p>
JavaSE 6 allows to specify various types of modality as in <a href="http://java.sun.com/javase/6/docs/api/java/awt/Dialog.ModalityType.html">ModalityType</a>. We will try to implement behavior some where between Application and Document Modal <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p>
<p>
<a href="http://javafxdemos.googlecode.com/hg/resource/ModalDialog/ModalDialog.html"><img src="http://javafxdemos.googlecode.com/hg/resource/ModalDialog/ModalDialog.jpg" border="0"></a>
</p>
<p>
<br />
To launch click on above image or <a href="http://javafxdemos.googlecode.com/hg/resource/ModalDialog/ModalDialog.jnlp"><img src="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg"></a><br />
<br />
<img src="http://javafxdemos.googlecode.com/hg/resource/ModalDialog/warning.png" align="top">Use of &#8220;Block EDT&#8221; may lead to deadlock and freeze application
</p>
<p>
Blocking <b>Mouse Events</b> is very easy, we just need to place a Rectangle whose width and height spans the entire Scene. Then set <i>Node.blocksMouse</i> attribute to true.
</p>
<p>
<b>Key Events</b> can be restricted if we could ensure that none of nodes other than child of Modal-Dialog receives focus. One way to achieve this is to disable default focus traversal. Get a list of all focus-traversable nodes in the dialog. We can set <i>Node.focusTraversable</i> attribute to false. Now add key-listeners to all nodes. Since focus traversal is disabled, the node will receive <i>TAB</i> key events. When the node receives <i>TAB</i> key event we can explicitly move the request to next node by invoking <i>Node.requestFocus</i>. Request focus for previous node for <i>Shift + TAB</i> key event. Please refer to <a href="http://code.google.com/p/javafxdemos/source/browse/ModalDialog/src/modaldialog/FocusCycleRoot.fx">FocusCycleRoot.fx</a> for more information.
</p>
<p>
Now comes the interesting part &#8211; block execution of current thread &#8211; But JavaFX is executed on <a href="http://en.wikipedia.org/wiki/Event_dispatching_thread">Event Dispatch Thread</a> &#8211;  <a href="http://java.sun.com/javase/6/docs/api/java/awt/EventQueue.html#isDispatchThread%28%29">EventQueue.isDispatchThread()</a> will return <i>true</i>. So we cannot block this thread, as it will freeze the user interface. Assuming that the underline Toolkit of JavaFX is built on top of AWT Toolkit, we can use AWT APIs to get around this situation. Before blocking the current thread, we can <a href="http://java.sun.com/javase/6/docs/api/java/awt/EventQueue.html#push%28java.awt.EventQueue%29">push</a> a new <a href="http://java.sun.com/javase/6/docs/api/java/awt/EventQueue.html">EventQueue</a> instance into System-Event-Queue, so as to create an alternate path for dispatching events. After disposing the modal dialog, we can restore the original event queue using <a href="http://java.sun.com/javase/6/docs/api/java/awt/EventQueue.html#pop%28%29">pop</a>. Please refer to <a href="http://code.google.com/p/javafxdemos/source/browse/ModalDialog/src/modaldialog/EventQueueUtils.java">EventQueueUtils.java</a> for more information.
</p>
<p>
Above solution is not stable enough and also not future proof. It assume that Toolkit is AWT and we have access to EventQueue (For which we need to sign the Applet), also the API may not be compatible with other profiles. In addition to this, <b>pop</b> API has tendency to create deadlock, there were attempts to fix this in various releases, but still doesn&#8217;t provide stable behavior (especially when called from JavaFX).
</p>
<p>
So we may have to revisit the requirement &#8211; <i>&#8220;block execution of current thread&#8221;</i>. Instead we can write the program in such a way that the display of MessageBox will be the last statement in current execution block. Thus we don&#8217;t have to block the thread. Then MessageBox can handle redirection to other blocks of code by invoking functions. Thus MessageBox will act like a decision box. This approach will work with most cases and can emulate the &#8220;block thread&#8221; behavior. Also you don&#8217;t have to sign the application. Please refer to <a href="http://code.google.com/p/javafxdemos/source/browse/ModalDialog/src/modaldialog/MessageBox.fx">MessageBox.fx</a> for more information.
</p>
<p>
Also <a href="http://jfxtras.org/">JFXtras</a> has built in <a href="http://jfxtras.googlecode.com/svn/site/javadoc/release-0.6/org.jfxtras.stage/org.jfxtras.stage.XDialog.html">Dialog</a> implementation which supports modality. Please refer to <a href="http://jfxtras.org/">JFXtras</a> for more information.
</p>
<p>
Please try it out and let me know feedback.. <img src="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" />
</p>
<p>
<a href="http://code.google.com/p/javafxdemos/source/browse/#hg/ModalDialog/"><img src="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" border="0" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javaria.wordpress.com/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javaria.wordpress.com/768/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javaria.wordpress.com/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javaria.wordpress.com/768/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javaria.wordpress.com/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javaria.wordpress.com/768/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javaria.wordpress.com/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javaria.wordpress.com/768/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javaria.wordpress.com/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javaria.wordpress.com/768/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javaria.wordpress.com/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javaria.wordpress.com/768/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javaria.wordpress.com/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javaria.wordpress.com/768/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=768&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javaria.wordpress.com/2010/04/05/javafx-modal-dialog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2698941d353dbc9bcec4a52ce47e0c25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rakesh Menon</media:title>
		</media:content>

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/ModalDialog/ModalDialog.jpg" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/ModalDialog/warning.png" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" medium="image" />
	</item>
		<item>
		<title>JavaFX + JSP</title>
		<link>http://javaria.wordpress.com/2010/03/29/javafx-jsp/</link>
		<comments>http://javaria.wordpress.com/2010/03/29/javafx-jsp/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 15:01:47 +0000</pubDate>
		<dc:creator>Rakesh Menon</dc:creator>
				<category><![CDATA[javafx]]></category>
		<category><![CDATA[jsp]]></category>

		<guid isPermaLink="false">http://javaria.wordpress.com/?p=766</guid>
		<description><![CDATA[There were many queries related to integration of JavaFX with JSP or JSF. JavaFX is executed on client side, JSP &#38; JSF resides on server, so &#8220;integration&#8221; in this context can be an overloaded term. Lets try one approach.. Its easy to just copy-paste all of those JavaFX launch script into your JSP. Another approach [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=766&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td><img src="http://javafxdemos.googlecode.com/hg/JavaFXJSP/java_duke.gif" border="0" /></td>
<td>
There were many queries related to integration of JavaFX with <a href="http://java.sun.com/products/jsp/">JSP</a> or <a href="http://java.sun.com/javaee/javaserverfaces/">JSF</a>. JavaFX is executed on client side, JSP &amp; JSF resides on server, so <i>&#8220;integration&#8221;</i> in this context can be an overloaded term. Lets try one approach..
</td>
</tr>
</table>
<p>
Its easy to just copy-paste all of those JavaFX launch script into your JSP. Another approach is to write a <a href="http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags.html">Custom Tag Library</a> which will generate and embed the necessary code. JSP pages will use this tag library. This will allow to consolidate all JavaFX related code, customize the generation of JavaFX tags, pass additional arguments which are specific to your application.
</p>
<p>
A simple tld is shown here &#8211; <a href="http://code.google.com/p/javafxdemos/source/browse/JavaFXJSP/web/WEB-INF/tlds/javafx.tld">javafx.tld</a> &#8211; It accepts all parameters that are required to construct JavaFX applet tag as argument. You can pass additional arguments (in this case it passes User-Agent header information) to JavaFX Applet. The tag library is implemented by &#8211; <a href="http://code.google.com/p/javafxdemos/source/browse/JavaFXJSP/src/java/javafxjsp/JavaFXTag.java">JavaFXTag.java</a>. It can be used as any other tag library as shown in &#8211; <a href="http://code.google.com/p/javafxdemos/source/browse/JavaFXJSP/web/index.jsp">index.jsp</a>. Rest of JavaFX &#8211; Server communication can be handled directly in JavaFX layer using AJAX like approach &#8211; REST WebServices &#8211; or directly invoking server technologies using JavaEE APIs <img src="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" />
</p>
<p>
Its just a start, but I think it helps to consolidate and customize the <i>&#8220;integration&#8221;</i>.. <img src="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" />
</p>
<p>
<a href="http://code.google.com/p/javafxdemos/source/browse/#hg/JavaFXJSP/"><img src="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" border="0" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javaria.wordpress.com/766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javaria.wordpress.com/766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javaria.wordpress.com/766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javaria.wordpress.com/766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javaria.wordpress.com/766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javaria.wordpress.com/766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javaria.wordpress.com/766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javaria.wordpress.com/766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javaria.wordpress.com/766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javaria.wordpress.com/766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javaria.wordpress.com/766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javaria.wordpress.com/766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javaria.wordpress.com/766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javaria.wordpress.com/766/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=766&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javaria.wordpress.com/2010/03/29/javafx-jsp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2698941d353dbc9bcec4a52ce47e0c25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rakesh Menon</media:title>
		</media:content>

		<media:content url="http://javafxdemos.googlecode.com/hg/JavaFXJSP/java_duke.gif" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" medium="image" />
	</item>
		<item>
		<title>JavaFX &#8211; Wizard UI</title>
		<link>http://javaria.wordpress.com/2010/03/23/javafx-wizard-ui/</link>
		<comments>http://javaria.wordpress.com/2010/03/23/javafx-wizard-ui/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 03:35:34 +0000</pubDate>
		<dc:creator>Rakesh Menon</dc:creator>
				<category><![CDATA[javafx]]></category>
		<category><![CDATA[container]]></category>
		<category><![CDATA[wizard]]></category>

		<guid isPermaLink="false">http://javaria.wordpress.com/?p=763</guid>
		<description><![CDATA[This demonstrates implementation of simple wizard user interface using a combination of Container, Button and bind. To launch click on above image or I have a main Container &#8211; Wizard. This has the navigation buttons and a sequence of Containers &#8211; WizardPanel, which contains the user interface for each panel. A variable selectedIndex in Wizard [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=763&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
This demonstrates implementation of simple wizard user interface using a combination of <a href="http://java.sun.com/javafx/1.2/docs/api/javafx.scene.layout/javafx.scene.layout.Container.html">Container</a>, <a href="http://java.sun.com/javafx/1.2/docs/api/javafx.scene.control/javafx.scene.control.Button.html">Button</a> and <a href="http://openjfx.java.sun.com/current-build/doc/reference/Binding.html">bind</a>.
</p>
<p>
<a href="http://javafxdemos.googlecode.com/hg/resource/JavaFXWizard/JavaFXWizard.html"><img src="http://javafxdemos.googlecode.com/hg/resource/JavaFXWizard/JavaFXWizard.jpg" border="0"></a>
</p>
<p>
<br />
To launch click on above image or <a href="http://javafxdemos.googlecode.com/hg/resource/JavaFXWizard/JavaFXWizard.jnlp"><img src="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg"></a>
</p>
</p>
<p>I have a main Container &#8211; <a href="http://code.google.com/p/javafxdemos/source/browse/JavaFXWizard/src/javafxwizard/Wizard.fx">Wizard</a>. This has the navigation buttons and a sequence of Containers &#8211; <a href="http://code.google.com/p/javafxdemos/source/browse/JavaFXWizard/src/javafxwizard/WizardPanel.fx">WizardPanel</a>, which contains the user interface for each panel. A variable <b>selectedIndex</b> in <a href="http://code.google.com/p/javafxdemos/source/browse/JavaFXWizard/src/javafxwizard/Wizard.fx">Wizard</a> keeps track of currently shown panel. Variable <b>selectedPanel</b> holds the instance of selected panel. A new panel instance is set to this variable when index is updated. The node is bound to <b>content</b> so as to update UI when a new panel is set. Disabled state of &#8220;Back&#8221; and &#8220;Next&#8221; button is set dynamically using <b>bind</b> with <b>selectedIndex</b>.
</p>
<p>
The panels in demo uses a series of SVG images &#8211; <a href="http://en.wikipedia.org/wiki/File:Wave.svg">Duke</a>, <a href="http://commons.wikimedia.org/wiki/File:TheStructorr_Lamborghini_Gallardo.svg">Lamborghini</a> and <a href="http://www.croczilla.com/bits_and_pieces/svg/samples/tiger/tiger.svg">Tiger</a>. Its converted into <b>FXZ</b> format using <a href="http://javafx.com/docs/gettingstarted/production_suite/">JavaFX Production Suite &#8211; SVG Converter</a> and ofcourse the text is from <a href="http://www.wikipedia.org/">wikipedia</a> <img src="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" />
</p>
<p>
Please try it out and let me know feedback.. <img src="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" />
</p>
<p>
<a href="http://code.google.com/p/javafxdemos/source/browse/#hg/JavaFXWizard/"><img src="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" border="0" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javaria.wordpress.com/763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javaria.wordpress.com/763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javaria.wordpress.com/763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javaria.wordpress.com/763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javaria.wordpress.com/763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javaria.wordpress.com/763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javaria.wordpress.com/763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javaria.wordpress.com/763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javaria.wordpress.com/763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javaria.wordpress.com/763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javaria.wordpress.com/763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javaria.wordpress.com/763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javaria.wordpress.com/763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javaria.wordpress.com/763/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javaria.wordpress.com&amp;blog=12103676&amp;post=763&amp;subd=javaria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javaria.wordpress.com/2010/03/23/javafx-wizard-ui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2698941d353dbc9bcec4a52ce47e0c25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rakesh Menon</media:title>
		</media:content>

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/JavaFXWizard/JavaFXWizard.jpg" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/jws-launch-button.jpg" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/smileys/smile.gif" medium="image" />

		<media:content url="http://javafxdemos.googlecode.com/hg/resource/images/source_b.png" medium="image" />
	</item>
	</channel>
</rss>
