<?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>JavaFX News, Demos and Insight // FX Experience &#187; UI Design</title>
	<atom:link href="http://fxexperience.com/category/ui-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://fxexperience.com</link>
	<description>Sharing the Experience of JavaFX</description>
	<lastBuildDate>Fri, 03 Feb 2012 22:47:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Fun JavaFX 2.0 Audio Player</title>
		<link>http://fxexperience.com/2012/01/fun-javafx-2-0-audio-player/</link>
		<comments>http://fxexperience.com/2012/01/fun-javafx-2-0-audio-player/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 08:10:11 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Controls]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[UI Design]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=1586</guid>
		<description><![CDATA[I was inspired by Dean Iverson&#8217;s tweet with a audio equalizer in JavaFX: #JavaFX rocks. Literally. An example from our upcoming Pro JavaFX 2 book: pic.twitter.com/tSI4Vry4 and the equalizer view from that Pro JavaFX 2 example app: pic.twitter.com/T6jxvrf9 . updated pic.twitter.com/FqzgVimG So wanted to have a go at doing one my self, so little while later [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://fxexperience.com/wp-content/uploads/2012/01/FXExperiencePlayer-BG.png"><img class="aligncenter size-medium wp-image-1587" title="FXExperiencePlayer" src="http://fxexperience.com/wp-content/uploads/2012/01/FXExperiencePlayer-BG-300x190.png" alt="" width="300" height="190" /></a></p>
<p>I was inspired by <a href="http://twitter.com/deanriverson">Dean Iverson&#8217;s</a> tweet with a audio equalizer in JavaFX:</p>
<blockquote><p>#JavaFX rocks. Literally. An example from our upcoming Pro JavaFX 2 book: <a href="http://pic.twitter.com/tSI4Vry4">pic.twitter.com/tSI4Vry4</a><br />
and the equalizer view from that Pro JavaFX 2 example app: <a href="http://pic.twitter.com/T6jxvrf9">pic.twitter.com/T6jxvrf9</a><br />
. updated <a href="http://pic.twitter.com/FqzgVimG">pic.twitter.com/FqzgVimG</a></p></blockquote>
<p>So wanted to have a go at doing one my self, so little while later I have a design and built a working application. Demo video after the break.</p>
<p><span id="more-1586"></span></p>
<p><iframe src="http://www.youtube.com/embed/QhFXd3Ost3w?rel=0&amp;hd=1" frameborder="0" width="960" height="720"></iframe></p>
<h3>The Design</h3>
<p>I started the design with a free Photoshop file from Diego Monzon:</p>
<p><a href="http://dribbble.com/shots/146460-UI-Rack-Pro-7-Freebie"><img class="alignnone" title="Starting Free PSD" src="http://dribbble.com/system/users/11040/screenshots/146460/ui7.jpg?1309482012" alt="" width="400" height="300" /></a></p>
<p>You will see that some of it like the cool VU meters made it direct though to my design but then I played around with the other parts. I have added a link to the Photoshop file I created so you can see what I have done if you are intrested. From the photoshop file I produced a few PNG files which are used in the application, you can see them in the src images directory. I found a free LCD dot matrix font from dafont which is what I am using for the text on the screen. You can see in the code how this is loaded in JavaFX.</p>
<p><a title="Photoshop design" href="http://fxexperience.com/applications/FXExperiencePlayer-BG.psd.zip">Download the Photoshop File</a> 18Mb</p>
<h4>The Code</h4>
<p>The application did not take that long to build, guess about a day in total and about 800 lines of code. I think it is fully working other than the balance is a little fiddly with the mouse. All the control customizations should have full keyboard navigation <img src='http://fxexperience.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . It is mostly standard UI Controls just styled with Images and CSS. The round knobs like balance and volume I had to do something special for and created a knob skin for the Slider control. There was a bunch of the standard logic to load and parse M3U and XML playlists, a very simple data model object PlayList which just contains a url which it was loaded from and a observable list of Pairs, each Pair being a name for the song and a url to the song. We did not have all the low level media API I needed for the VU meters but as they are only really for show I made of some data from what we can get from AudioSpectrumListener.</p>
<p><a title="Source and NB Project" href="http://fxexperience.com/applications/FxExperiencePlayer.zip">Download the source and Netbeans Project</a> 1.5Mb</p>
<p>Hope you enjoy playing with this fun little app as much as I did creating it. Hope it goes to show that you can create pretty much any UI that you can imagine in JavaFX 2.0 and even use standard controls so you maintain keyboard navigation, accessibility etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2012/01/fun-javafx-2-0-audio-player/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Styling FX Buttons with CSS</title>
		<link>http://fxexperience.com/2011/12/styling-fx-buttons-with-css/</link>
		<comments>http://fxexperience.com/2011/12/styling-fx-buttons-with-css/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 23:36:03 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Controls]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tips n' Tricks]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=1523</guid>
		<description><![CDATA[A number of people have asked me recently can I create this look or that look using CSS in JavaFX. Or they have said that you could never do that! So I thought I would do a little experiment and try recreating a bunch of common button styles purely using CSS. So without further ado, [...]]]></description>
			<content:encoded><![CDATA[<p>A number of people have asked me recently can I create this look or that look using CSS in JavaFX. Or they have said that you could never do that! So I thought I would do a little experiment and try recreating a bunch of common button styles purely using CSS. So without further ado, here is the result:</p>
<p><img class="aligncenter size-full wp-image-1524" title="CSS Styled Buttons" src="http://fxexperience.com/wp-content/uploads/2011/12/Screen-Shot-2011-12-20-at-2.51.18-PM.png" alt="" width="706" height="873" /><br />
<span id="more-1523"></span><br />
All of these are mostly created with multiple background fill layers each with a gradient. Then there is a little font tweaking and some subtle effects. So for example all you need to make a JavaFX button look like a Windows 7 button is:</p>
<pre class="brush: css; title: ; notranslate">
#windows7-default {
    -fx-background-color:
        #3c7fb1,
        linear-gradient(#fafdfe, #e8f5fc),
        linear-gradient(#eaf6fd 0%, #d9f0fc 49%, #bee6fd 50%, #a7d9f5 100%);
    -fx-background-insets: 0,1,2;
    -fx-background-radius: 3,2,1;
    -fx-padding: 3 30 3 30;
    -fx-text-fill: black;
    -fx-font-size: 14px;
}
</pre>
<p>The first line defines the 3 background fills, first is solid color and the other two are linear gradients. The background-insets offsets the backgrounds so they do not 100% paint over each other and the second background is 1px in from the outside and the 3rd background is 2px in from the outside of the button. The background-radius us setting the corner radius&#8217;s of the 3 backgrounds getting smaller as the backgrounds move in, this makes the gap between the borders a consistent 1 pixel all the way around. Padding adds extra space around the text to make the button bigger by default. Then the last two lines set the text color and size. That is all there is too it.</p>
<p>I have not included styles for the pressed, over and focused states of all the buttons but they can all be easily added in a similar way. I have included a over and pressed state for the &#8220;Record Sales&#8221; button as a example. </p>
<p>You can download the complete Netbeans project with all the code here.<br />
<b><a href="/applications/ButtonStyles.zip">ButtonStyles.zip</a></b></p>
<p>Here is the CSS code of all the button styles you see above:</p>
<pre class="brush: css; title: ; notranslate">
#green {
    -fx-background-color:
        linear-gradient(#f0ff35, #a9ff00),
        radial-gradient(center 50% -40%, radius 200%, #b8ee36 45%, #80c800 50%);
    -fx-background-radius: 6, 5;
    -fx-background-insets: 0, 1;
    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.4) , 5, 0.0 , 0 , 1 );
    -fx-text-fill: #395306;
}
#round-red {
    -fx-background-color: linear-gradient(#ff5400, #be1d00);
    -fx-background-radius: 30;
    -fx-background-insets: 0;
    -fx-text-fill: white;
}
#bevel-grey {
    -fx-background-color:
        linear-gradient(#f2f2f2, #d6d6d6),
        linear-gradient(#fcfcfc 0%, #d9d9d9 20%, #d6d6d6 100%),
        linear-gradient(#dddddd 0%, #f6f6f6 50%);
    -fx-background-radius: 8,7,6;
    -fx-background-insets: 0,1,2;
    -fx-text-fill: black;
    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 5, 0.0 , 0 , 1 );
}
#glass-grey {
    -fx-background-color:
        #c3c4c4,
        linear-gradient(#d6d6d6 50%, white 100%),
        radial-gradient(center 50% -40%, radius 200%, #e6e6e6 45%, rgba(230,230,230,0) 50%);
    -fx-background-radius: 30;
    -fx-background-insets: 0,1,1;
    -fx-text-fill: black;
    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 3, 0.0 , 0 , 1 );
}
#shiny-orange {
    -fx-background-color:
        linear-gradient(#ffd65b, #e68400),
        linear-gradient(#ffef84, #f2ba44),
        linear-gradient(#ffea6a, #efaa22),
        linear-gradient(#ffe657 0%, #f8c202 50%, #eea10b 100%),
        linear-gradient(from 0% 0% to 15% 50%, rgba(255,255,255,0.9), rgba(255,255,255,0));
    -fx-background-radius: 30;
    -fx-background-insets: 0,1,2,3,0;
    -fx-text-fill: #654b00;
    -fx-font-weight: bold;
    -fx-font-size: 14px;
    -fx-padding: 10 20 10 20;
}
#dark-blue {
    -fx-background-color:
        #090a0c,
        linear-gradient(#38424b 0%, #1f2429 20%, #191d22 100%),
        linear-gradient(#20262b, #191d22),
        radial-gradient(center 50% 0%, radius 100%, rgba(114,131,148,0.9), rgba(255,255,255,0));
    -fx-background-radius: 5,4,3,5;
    -fx-background-insets: 0,1,2,0;
    -fx-text-fill: white;
    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 5, 0.0 , 0 , 1 );
    -fx-font-family: &quot;Arial&quot;;
    -fx-text-fill: linear-gradient(white, #d0d0d0);
    -fx-font-size: 12px;
    -fx-padding: 10 20 10 20;
}
#dark-blue Text {
    -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.9) , 1, 0.0 , 0 , 1 );
}
#record-sales {
    -fx-padding: 8 15 15 15;
    -fx-background-insets: 0,0 0 5 0, 0 0 6 0, 0 0 7 0;
    -fx-background-radius: 8;
    -fx-background-color:
        linear-gradient(from 0% 93% to 0% 100%, #a34313 0%, #903b12 100%),
        #9d4024,
        #d86e3a,
        radial-gradient(center 50% 50%, radius 100%, #d86e3a, #c54e2c);
    -fx-effect: dropshadow( gaussian , rgba(0,0,0,0.75) , 4,0,0,1 );
    -fx-font-weight: bold;
    -fx-font-size: 1.1em;
}
#record-sales:hover {
    -fx-background-color:
        linear-gradient(from 0% 93% to 0% 100%, #a34313 0%, #903b12 100%),
        #9d4024,
        #d86e3a,
        radial-gradient(center 50% 50%, radius 100%, #ea7f4b, #c54e2c);
}
#record-sales:pressed {
    -fx-padding: 10 15 13 15;
    -fx-background-insets: 2 0 0 0,2 0 3 0, 2 0 4 0, 2 0 5 0;
}
#record-sales Text {
    -fx-fill: white;
    -fx-effect: dropshadow( gaussian , #a30000 , 0,0,0,2 );
}
#rich-blue {
    -fx-background-color:
        #000000,
        linear-gradient(#7ebcea, #2f4b8f),
        linear-gradient(#426ab7, #263e75),
        linear-gradient(#395cab, #223768);
    -fx-background-insets: 0,1,2,3;
    -fx-background-radius: 3,2,2,2;
    -fx-padding: 12 30 12 30;
    -fx-text-fill: white;
    -fx-font-size: 12px;
}
#rich-blue Text {
    -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.8) , 0, 0.0 , 0 , 1);
}
#big-yellow {
    -fx-background-color:
        #ecebe9,
        rgba(0,0,0,0.05),
        linear-gradient(#dcca8a, #c7a740),
        linear-gradient(#f9f2d6 0%, #f4e5bc 20%, #e6c75d 80%, #e2c045 100%),
        linear-gradient(#f6ebbe, #e6c34d);
    -fx-background-insets: 0,9 9 8 9,9,10,11;
    -fx-background-radius: 50;
    -fx-padding: 15 30 15 30;
    -fx-font-family: &quot;Helvetica&quot;;
    -fx-font-size: 18px;
    -fx-text-fill: #311c09;
    -fx-effect: innershadow( three-pass-box , rgba(0,0,0,0.1) , 2, 0.0 , 0 , 1);
}
#big-yellow Text {
    -fx-effect: dropshadow( one-pass-box , rgba(255,255,255,0.5) , 0, 0.0 , 0 , 1);
}
#iphone-toolbar {
    -fx-background-color: linear-gradient(#98a8bd 0%, #8195af 25%, #6d86a4 100%);
}
#iphone {
    -fx-background-color:
        #a6b5c9,
        linear-gradient(#303842 0%, #3e5577 20%, #375074 100%),
        linear-gradient(#768aa5 0%, #849cbb 5%, #5877a2 50%, #486a9a 51%, #4a6c9b 100%);
    -fx-background-insets: 0 0 -1 0,0,1;
    -fx-background-radius: 5,5,4;
    -fx-padding: 7 30 7 30;
    -fx-text-fill: #242d35;
    -fx-font-family: &quot;Helvetica&quot;;
    -fx-font-size: 12px;
    -fx-text-fill: white;
}
#iphone Text {
    -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.8) , 0, 0.0 , 0 , -1 );
}
#ipad-dark-grey {
    -fx-background-color:
        linear-gradient(#686868 0%, #232723 25%, #373837 75%, #757575 100%),
        linear-gradient(#020b02, #3a3a3a),
        linear-gradient(#9d9e9d 0%, #6b6a6b 20%, #343534 80%, #242424 100%),
        linear-gradient(#8a8a8a 0%, #6b6a6b 20%, #343534 80%, #262626 100%),
        linear-gradient(#777777 0%, #606060 50%, #505250 51%, #2a2b2a 100%);
    -fx-background-insets: 0,1,4,5,6;
    -fx-background-radius: 9,8,5,4,3;
    -fx-padding: 15 30 15 30;
    -fx-font-family: &quot;Helvetica&quot;;
    -fx-font-size: 18px;
    -fx-font-weight: bold;
    -fx-text-fill: white;
    -fx-effect: dropshadow( three-pass-box , rgba(255,255,255,0.2) , 1, 0.0 , 0 , 1);
}
#ipad-dark-grey Text {
    -fx-effect: dropshadow( one-pass-box , black , 0, 0.0 , 0 , -1 );
}
#ipad-grey {
    -fx-background-color:
        linear-gradient(#686868 0%, #232723 25%, #373837 75%, #757575 100%),
        linear-gradient(#020b02, #3a3a3a),
        linear-gradient(#b9b9b9 0%, #c2c2c2 20%, #afafaf 80%, #c8c8c8 100%),
        linear-gradient(#f5f5f5 0%, #dbdbdb 50%, #cacaca 51%, #d7d7d7 100%);
    -fx-background-insets: 0,1,4,5;
    -fx-background-radius: 9,8,5,4;
    -fx-padding: 15 30 15 30;
    -fx-font-family: &quot;Helvetica&quot;;
    -fx-font-size: 18px;
    -fx-font-weight: bold;
    -fx-text-fill: #333333;
    -fx-effect: dropshadow( three-pass-box , rgba(255,255,255,0.2) , 1, 0.0 , 0 , 1);
}
#ipad-grey Text {
    -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
}
#lion-default {
    -fx-background-color:
        rgba(0,0,0,0.08),
        linear-gradient(#5a61af, #51536d),
        linear-gradient(#e4fbff 0%,#cee6fb 10%, #a5d3fb 50%, #88c6fb 51%, #d5faff 100%);
    -fx-background-insets: 0 0 -1 0,0,1;
    -fx-background-radius: 5,5,4;
    -fx-padding: 3 30 3 30;
    -fx-text-fill: #242d35;
    -fx-font-size: 14px;
}
#lion {
    -fx-background-color:
        rgba(0,0,0,0.08),
        linear-gradient(#9a9a9a, #909090),
        linear-gradient(white 0%, #f3f3f3 50%, #ececec 51%, #f2f2f2 100%);
    -fx-background-insets: 0 0 -1 0,0,1;
    -fx-background-radius: 5,5,4;
    -fx-padding: 3 30 3 30;
    -fx-text-fill: #242d35;
    -fx-font-size: 14px;
}
#windows7-default {
    -fx-background-color:
        #3c7fb1,
        linear-gradient(#fafdfe, #e8f5fc),
        linear-gradient(#eaf6fd 0%, #d9f0fc 49%, #bee6fd 50%, #a7d9f5 100%);
    -fx-background-insets: 0,1,2;
    -fx-background-radius: 3,2,1;
    -fx-padding: 3 30 3 30;
    -fx-text-fill: black;
    -fx-font-size: 14px;
}
#windows7 {
    -fx-background-color:
        #707070,
        linear-gradient(#fcfcfc, #f3f3f3),
        linear-gradient(#f2f2f2 0%, #ebebeb 49%, #dddddd 50%, #cfcfcf 100%);
    -fx-background-insets: 0,1,2;
    -fx-background-radius: 3,2,1;
    -fx-padding: 3 30 3 30;
    -fx-text-fill: black;
    -fx-font-size: 14px;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2011/12/styling-fx-buttons-with-css/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Alternate row highlighting in empty TableView (and ListView) rows</title>
		<link>http://fxexperience.com/2011/11/alternate-row-highlighting-in-empty-tableview-and-listview-rows/</link>
		<comments>http://fxexperience.com/2011/11/alternate-row-highlighting-in-empty-tableview-and-listview-rows/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 04:53:05 +0000</pubDate>
		<dc:creator>Jonathan Giles</dc:creator>
				<category><![CDATA[Controls]]></category>
		<category><![CDATA[Tips n' Tricks]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=1499</guid>
		<description><![CDATA[One thing I see asked a lot (either directly via email, or in the rather excellent JavaFX Forums) is why does TableView (and ListView) look like this in JavaFX 2.0: Or, more specifically, why it doesn&#8217;t look like this: I can see where this question comes from, given this is how Swing&#8217;s JTable looks: It [...]]]></description>
			<content:encoded><![CDATA[<p>One thing I see asked a lot (either directly via email, or in the rather excellent <a href="https://forums.oracle.com/forums/forum.jspa?forumID=1385&amp;start=0">JavaFX Forums</a>) is why does TableView (and ListView) look like this in JavaFX 2.0:</p>
<div id="attachment_1500" class="wp-caption aligncenter" style="width: 509px"><img class="size-full wp-image-1500" title="blog-table-1" src="http://fxexperience.com/wp-content/uploads/2011/11/blog-table-1.png" alt="" width="499" height="310" /><p class="wp-caption-text">A TableView control using default styling and API as provided in JavaFX 2.0.</p></div>
<p><span id="more-1499"></span>Or, more specifically, why it doesn&#8217;t look like this:</p>
<div id="attachment_1502" class="wp-caption aligncenter" style="width: 508px"><img class="size-full wp-image-1502" title="blog-table-2" src="http://fxexperience.com/wp-content/uploads/2011/11/blog-table-2.png" alt="" width="498" height="307" /><p class="wp-caption-text">A TableView without alternate row highlighting in empty rows</p></div>
<p>I can see where this question comes from, given this is how Swing&#8217;s JTable looks:</p>
<div id="attachment_1501" class="wp-caption aligncenter" style="width: 535px"><img class="size-full wp-image-1501" title="blog-table-3" src="http://fxexperience.com/wp-content/uploads/2011/11/blog-table-3.png" alt="" width="525" height="188" /><p class="wp-caption-text">Swing JTable</p></div>
<p>It comes down to taste I guess, but given that there is a subset of developers who expect this look, I thought I&#8217;d put a blog post up here to clarify how it is done (and to save me having to explain it to people individually by email!) <img src='http://fxexperience.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  All you need is the following CSS for TableView:</p>
<pre class="brush: css; title: ; notranslate">
.table-row-cell:empty {
    -fx-background-color: white;
}

.table-row-cell:empty .table-cell {
    -fx-border-width: 0px;
}
</pre>
<p>Similarly, for ListView, you can get away with just the first statement above (slightly modified for ListView):</p>
<pre class="brush: css; title: ; notranslate">
.list-cell:empty {
    -fx-background-color: white;
}
</pre>
<p>The end result is precisely what you see in the second image above (there ain&#8217;t no photoshop trickery here!) <img src='http://fxexperience.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Hopefully this helps people customising their user interfaces, and hopefully also encourages you to further explore what is possible. The best starting point is the excellent <a href="http://docs.oracle.com/javafx/">JavaFX documentation website</a>, the <a href="http://docs.oracle.com/javafx/2.0/api/javafx/scene/doc-files/cssref.html">CSS Reference</a> (which is about to be updated for 2.0.2 I believe), and as always, the caspian.css file that ships with every JavaFX release (embedded within jfxrt.jar).</p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2011/11/alternate-row-highlighting-in-empty-tableview-and-listview-rows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Custom Cell Caching</title>
		<link>http://fxexperience.com/2010/06/custom-cell-caching/</link>
		<comments>http://fxexperience.com/2010/06/custom-cell-caching/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 06:09:23 +0000</pubDate>
		<dc:creator>Jonathan Giles</dc:creator>
				<category><![CDATA[Controls]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=883</guid>
		<description><![CDATA[Ok, I know we&#8217;ve been going on about custom cells / cell factories a bit recently, but I wanted to do one more post about a very useful topic: caching within cell content. These days &#8216;Hello World&#8217; has been replaced by building a Twitter client, so I&#8217;ve decided to frame this topic in terms of [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, I know we&#8217;ve been going on about custom cells / cell factories a bit recently, but I wanted to do one more post about a very useful topic: caching within cell content.</p>
<p>These days &#8216;Hello World&#8217; has been replaced by building a Twitter client, so I&#8217;ve decided to frame this topic in terms of building a Twitter client. Because I don&#8217;t actually care about the whole web service side of thing, I&#8217;ve neglected to implement the whole &#8216;real data&#8217; / web services aspect of it. If you want to see an actual running implementation with real data, have a look at <span>William Antônio&#8217;s <a href="http://bit.ly/cXsqUR">Twitter client</a>, which is using this ListCell implementation.</span></p>
<p><span><span id="more-883"></span>So, in all the posts to this site related to cells, I&#8217;m sure you&#8217;ve probably come to appreciate the ways in which you should create a ListView or TreeView with custom cell factories. Therefore, what I really want to cover in this post is just the custom cell implementation, and the importance of caching. A Twitter client wouldn&#8217;t be a true client without showing the users profile image, so this is my target for caching. Without caching, each time the cell was updated (i.e. the content changes due to scrolling, or when we scroll a user out of screen and then back in), we&#8217;d have to redownload and load the image. This would lead to considerable lag and a poor user experience. What we need to do is load the image once, cache it, and reuse it whenever the image URL is requested by a cell. At the same time, we don&#8217;t want to run the PC dry of memory by loading all profile images into memory. Enter: <a href="http://java.sun.com/javase/6/docs/api/java/lang/ref/SoftReference.html">SoftReference</a> caching.<br />
</span></p>
<p><span><strong>Word of warning</strong>: I&#8217;m not a caching expert. It is possible that I&#8217;ve done something stupid, and I hope you&#8217;ll let me know, but I believe that the code below should at least be decent. I&#8217;ll happily update this example if anyone gives me useful feedback.</span></p>
<p><span>Check out the code below, and I&#8217;ll continue to discuss it afterwards.</span></p>
<pre class="brush: javafx; title: ; notranslate">
import model.Tweet;

import java.lang.ref.SoftReference;
import java.util.HashMap;

import javafx.geometry.HPos;
import javafx.geometry.VPos;
import javafx.util.Math;
import javafx.scene.control.Label;
import javafx.scene.control.ListCell;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.Container;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;

// controls whether the cache is used or not. This _really_ shouldn't be false!
def useCache = true;

// map of String -&gt; SoftReference (of Image)
def map = new HashMap();

def IMAGE_SIZE = 48;

public class TwitterListCell extends ListCell {

    // used to represent the users image
    var imageView:ImageView;

    // a slightly bigger and bolder label for the persons name
    var personName:Label = Label {
        font: Font.font(&quot;Arial&quot;, FontWeight.BOLD, 13);
    }

    // the message label
    var message:Label = Label {
        textWrap: true
    }

    override var node = Container {
        content: bind [ imageView, personName, message ]

        override function getPrefHeight(width:Number):Number {
            def w = listView.width;
            Math.max(IMAGE_SIZE, personName.getPrefHeight(w) + message.getPrefHeight(w));
        }

        override function doLayout():Void {
            var x:Number = -1.5;
            var y:Number = 0;
            var listWidth = listView.width;
            var cellHeight = height;

            // position image
            Container.positionNode(imageView, x, y, IMAGE_SIZE, cellHeight,
                HPos.CENTER, VPos.TOP, false);

            // position text at the same indent position regardless of whether
            // an image exists or not
            x += IMAGE_SIZE + 5;
            var textWidth = listWidth - x;
            var personNameHeight = personName.getPrefHeight(textWidth);
            Container.resizeNode(personName, textWidth, personNameHeight);
            Container.positionNode(personName, x, y, listWidth - x, personNameHeight,
                HPos.LEFT, VPos.TOP, false);

            y += personNameHeight;
            Container.resizeNode(message, textWidth, message.getPrefHeight(textWidth));
            Container.positionNode(message, x, y, listWidth - x, height - personNameHeight,
                HPos.LEFT, VPos.TOP, false);
        }
    }

    override var onUpdate = function():Void {
        var tweet = item as Tweet;

        personName.text = tweet.person.name;
        message.text = tweet.message;

        // image handling
        if (map.containsKey(tweet.person.image)) {
            // the image has possibly been cached, so lets try to get it
            var softRef = map.get(tweet.person.image) as SoftReference;

            // get the image out of the SoftReference wrapper
            var image = softRef.get() as Image;

            // check if it is null - which would be the case if the image had
            // been removed by the garbage collector
            if (image == null) {
                // we need to reload the image
                loadImage(tweet.person.image);
            } else {
                // the image is available, so we can reuse it without the
                // burden of having to download and reload it into memory.
                imageView = ImageView {
                    image: image;
                }
            }
        } else {
            // the image is not cached, so lets load it
            loadImage(tweet.person.image);
        }
    };

    function loadImage(url:String) {
        // create the image and imageview
        var image = Image {
            url: url
            height: IMAGE_SIZE
            preserveRatio: true
            backgroundLoading: true
        }
        imageView = ImageView {
            image: image;
        }

        if (useCache) {
            // put into cache using a SoftReference
            var softRef = new SoftReference(image);
            map.put(url, softRef);
        } else {
            map.remove(url);
        }
    }
}
</pre>
<p><span>You&#8217;ll note that in this example most of the code is pretty standard. A few variables are created for the image and text, and then I&#8217;ve gone the route of laying the content out in a Container, but you can achieve a similar layout using the available layout containers. Following this I have defined an onUpdate function, which is called whenever the cell should be updated. This is usually called due to a user interaction, which may potentially change the Cell.item value, which would of course require an update of the cell&#8217;s visuals.</span></p>
<p><span>The bulk, and most important part, of the onUpdate function deals with loading the users profile image, or retrieving and reusing the cached version of it. Note the use of the global HashMap, which maps between the URL of the users image and the Image itself. Because it is global (i.e. static), this map will be available, and used, by all TwitterListCell instances. Also important to note is that I didn&#8217;t put the ImageView itself into the HashMap as a Node can not be placed in multiple positions in the scenegraph, but an Image can be.</span></p>
<p><span>The rest of the code in this class really just deals with the fact that a SoftReference may clear out it&#8217;s reference to the Image object if the garbage collector needs the memory, in which case we need to reload the image again. The other obvious part is the need to also put the image into the cache if it&#8217;s not already there.</span></p>
<p><span>Shown below is the end result, but remember that there is a working version of this demo in William Antônio&#8217;s <a href="http://bit.ly/cXsqUR">Twitter client</a>, which is a very early work in progress.</span></p>
<p><img src="http://fxexperience.com/wp-content/uploads/2010/06/twitter-listcell1.PNG" alt="twitter-listcell" title="twitter-listcell" width="187" height="366" class="aligncenter size-full wp-image-893" /></p>
<p><span>I hope this might be useful to people, and as always we&#8217;re keen to hear your thoughts and feedback, and what you&#8217;re hoping us to cover. Until next time &#8211; cheers! <img src='http://fxexperience.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2010/06/custom-cell-caching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text Effects</title>
		<link>http://fxexperience.com/2009/11/text-effects/</link>
		<comments>http://fxexperience.com/2009/11/text-effects/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 15:22:51 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=258</guid>
		<description><![CDATA[I came across the cool blog by Rakesh Menon the other day &#8220;JavaFX &#8211; Text Effects&#8221;. It got me thinking how many other cool text effects could we do in JavaFX. Quick research for ideas came up with &#8220;50 Stunning Photoshop Text Effect Tutorials&#8221; blog post on Smashing Magazine. So I picked a couple fun [...]]]></description>
			<content:encoded><![CDATA[<p>I came across the cool blog by Rakesh Menon the other day <a title="Text Effects Blog" href="http://blogs.sun.com/rakeshmenonp/entry/javafx_text_effects" target="_blank">&#8220;JavaFX &#8211; Text Effects&#8221;</a>. It got me thinking how many other cool text effects could we do in JavaFX. Quick research for ideas came up with <a href="http://www.smashingmagazine.com/2009/03/04/50-stunning-photoshop-text-effect-tutorials/">&#8220;50 Stunning Photoshop Text Effect Tutorials&#8221;</a> blog post on Smashing Magazine. So I picked a couple fun ones and had a go <img src='http://fxexperience.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h2>Neon Text</h2>
<p style="text-align: center;"><a title="Run Neon Sign Demo" href="http://fxexperience.com/webstart/texteffects/neon/Text_Effects.jnlp"><img class="aligncenter size-full wp-image-259" title="Neon Sign Screenshot" src="http://fxexperience.com/wp-content/uploads/2009/11/Picture-14.png" alt="Neon Sign Screenshot" width="680" height="402" />Click To Run</a></p>
<p><span id="more-258"></span><br />
The first example the came to my attention as I could see how I could have used it in our recent game, was <a href="http://www.spoono.com/photoshop/tutorials/tutorial.php?id=20">Neon Text @ spoono.com</a>. This is achieved in JavaFX by applying multiple innershadow and dropshadow effects to the text. Here is the complete code for the test application above.</p>
<pre class="brush: javafx; title: ; notranslate">
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.*;
import javafx.scene.image.*;
import javafx.scene.shape.*;
import javafx.scene.paint.*;
import javafx.scene.effect.*;
import javafx.scene.control.*;

var width = 600;
var height = 300;
var text:Text;
var textBox:TextBox;
Stage {
    title: &quot;Text Effects: Neon Sign&quot;
    resizable: false
    scene: Scene {
        width: width, height: height
        content: [
            ImageView { image: Image{ url: &quot;{__DIR__}bricks.jpg&quot;} }
            Rectangle {
                width: width, height: height
                fill: RadialGradient {
                    centerX: 0.5, centerY: 0.5
                    radius: 0.7, proportional: true
                    stops: [
                        Stop{offset: 0.4, color: Color.rgb(0,0,0,0.1)}
                        Stop{offset: 1, color: Color.rgb(0,0,0,0.8)}
                    ]
                }
            }
            text = Text {
                effect: Blend{
                    mode: BlendMode.MULTIPLY
                    bottomInput: DropShadow {
                        color: Color.rgb(254,235,66,0.3)
                        offsetX: 5, offsetY: 5
                        radius: 5
                        spread: 0.2
                    }
                    topInput: Blend{
                        mode: BlendMode.MULTIPLY
                        bottomInput: DropShadow {
                            color: Color.web(&quot;#f13a00&quot;)
                            radius: 20
                            spread: 0.2
                        }
                        topInput: Blend{
                            mode: BlendMode.MULTIPLY
                            bottomInput: InnerShadow {
                                color: Color.web(&quot;#feeb42&quot;)
                                radius: 9
                                choke: 0.8
                            }
                            topInput: InnerShadow {
                                color: Color.web(&quot;#f13a00&quot;)
                                radius: 5
                                choke: 0.4
                            }
                        }
                    }
                }
                fill: Color.WHITE
                font : Font { name: &quot;Harlow&quot; size : 110 }
                layoutX: bind (width - text.layoutBounds.width)/2
                layoutY: bind (height/2) + 20
                content: bind textBox.rawText
            }
            textBox = TextBox {
                text:&quot;Neon Sign&quot;
                layoutX: 100
                layoutY: height - 40
                width: width-200
            }
        ]
    }
}
</pre>
<h2>Snow &#038; Ice</h2>
<p style="text-align: center;"><a title="Run Snow n Ice Demo" href="http://fxexperience.com/webstart/texteffects/snow/Text_Effects.jnlp"><img src="http://fxexperience.com/wp-content/uploads/2009/11/Picture-11.png" alt="Snow &amp; Ice" title="Snow &amp; Ice" width="680" height="502" class="aligncenter size-full wp-image-263" />Click To Run</a></p>
<p>This one was based on the Tutsplus.com article <a href="http://psd.tutsplus.com/text-effects-tutorials/icey-styles-in-photoshop/">Icey Styles in Photoshop</a> but as we do not have the Bevel and Emboss effect that photoshop has yet I had do my best to simulate it with inner and drop shadows.</p>
<pre class="brush: javafx; title: ; notranslate">
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.*;
import javafx.scene.shape.*;
import javafx.scene.paint.*;
import javafx.scene.effect.*;
import javafx.scene.control.*;

var width = 600;
var height = 400;
var text:Text;
var textBox:TextBox;
Stage {
    title: &quot;Text Effects: Snow &amp; Ice&quot;
    resizable: false
    scene: Scene {
        width: width
        height: height
        content: [
            Rectangle {
                width: width, height: height
                fill: RadialGradient {
                    centerX: 0.5, centerY: 0.5
                    radius: 0.7, proportional: true
                    stops: [
                        Stop{offset: 0.4, color: Color.web(&quot;#34365e&quot;)}
                        Stop{offset: 1, color: Color.web(&quot;#0d0f3a&quot;)}
                    ]
                }
            }
            text = Text {
                effect: Blend{
                    mode: BlendMode.SRC_OVER
                    bottomInput: DropShadow {
                        color: Color.rgb(0,0,0,0.1)
                        offsetX: 8, offsetY: 8
                        radius: 2
                    }
                    topInput: Blend{
                        mode: BlendMode.SRC_OVER
                        bottomInput: DropShadow {
                            color: Color.web(&quot;#21233f&quot;)
                            radius: 4
                            spread: 0.9
                        }
                        topInput: Blend{
                            mode: BlendMode.DARKEN
                            bottomInput: InnerShadow {
                                color: Color.web(&quot;#cee3f4&quot;)
                                radius: 5
                                choke: 0.7
                                offsetX: -4, offsetY: -4
                            }
                            topInput: Blend{
                                mode: BlendMode.MULTIPLY
                                bottomInput: InnerShadow {
                                    color: Color.web(&quot;#6c7fee&quot;)
                                    radius: 7
                                    choke: 0.2
                                    offsetX: 2, offsetY: 2
                                }
                                topInput: InnerShadow {
                                    color: Color.web(&quot;#a5ebff&quot;)
                                    radius: 4
                                    offsetX: -2, offsetY: -2
                                }
                            }
                        }
                    }
                }
                fill: Color.web(&quot;#f7fafb&quot;)//web(&quot;#e5f5fb&quot;)
                strokeWidth: 3
                font : Font {
                    name: &quot;Kabel&quot;
                    size : 120
                }
                layoutX: bind (width - text.layoutBounds.width)/2
                layoutY: bind (height/2) - 20
                content: bind if (textBox.rawText == &quot;&quot;) then &quot;Snow \n&amp; Ice&quot; else textBox.rawText
            }
            textBox = TextBox {
                layoutX: 100
                layoutY: height - 40
                width: width-200
            }
        ]
    }
}
</pre>
<h2>Recessed</h2>
<p style="text-align: center;"><a title="Run Recessed Demo" href="http://fxexperience.com/webstart/texteffects/recessed/Text_Effects.jnlp"><img src="http://fxexperience.com/wp-content/uploads/2009/11/Picture-12.png" alt="Recessed" title="Recessed" width="680" height="402" class="aligncenter size-full wp-image-265" />Click To Run</a></p>
<p>After playing with a couple from tutorials I thought I would have a go at one my self. This is a version of the classic web recessed text effect. The designer <a href="http://www.alexbuga.com/">Alex Buga</a> used this technique to great effect on his website. Unfortunately its down for redesign at the moment but for those who missed it here is a snap shot.</p>
<p><a href="http://fxexperience.com/wp-content/uploads/2009/11/Picture-15.png"><img src="http://fxexperience.com/wp-content/uploads/2009/11/Picture-15-300x230.png" alt="Alex Buga.com" title="Alex Buga.com" width="300" height="230" class="aligncenter size-medium wp-image-267" /></a></p>
<p>Here is the code for this sample. Its much simpler than the first two as it only uses two effects and a gradient fill on the text. It could be applied to any color just by changing the text fill gradient to be darker version of the background it is sitting on.</p>
<pre class="brush: javafx; title: ; notranslate">
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.*;
import javafx.scene.shape.*;
import javafx.scene.paint.*;
import javafx.scene.effect.*;
import javafx.scene.control.*;

var width = 600;
var height = 300;
var text:Text;
var textBox:TextBox;
Stage {
    title: &quot;Text Effects: Recessed&quot;
    resizable: false
    scene: Scene {
        width: width
        height: height
        content: [
            Rectangle {
                width: width, height: height
                fill: LinearGradient {
                    startX: 0, endX: 0, startY: 0, endY: 1
                    stops: [
                        Stop { offset: 0, color: Color.rgb(202,202,202) }
                        Stop { offset: 1, color: Color.rgb(97,97,97) }
                    ]
                }
            }
            text = Text {
                effect: Blend{
                    mode: BlendMode.MULTIPLY
                    bottomInput: DropShadow {
                        color: Color.rgb(255,255,255,0.5)
                        offsetX: 1, offsetY: 1
                        radius: 0
                    }
                    topInput: InnerShadow {
                        color: Color.rgb(0,0,0,0.7)
                        offsetX: 2, offsetY: 2
                        radius: 5
                    }
                }
                fill: LinearGradient {
                    startX: 0, endX: 0, startY: 0, endY: 1
                    stops: [
                        Stop { offset: 0, color: Color.rgb(190,190,190) }
                        Stop { offset: 1, color: Color.rgb(170,170,170) }
                    ]
                }
                font : Font { name: &quot;Arial Black&quot;, size : 90 }
                layoutX: bind (width - text.layoutBounds.width)/2
                layoutY: bind (height/2) + 20
                content: bind textBox.rawText
            }
            textBox = TextBox {
                text:&quot;Recessed&quot;
                layoutX: 100
                layoutY: height - 40
                width: width-200
            }
        ]
    }
}
</pre>
<h2>Stand Out</h2>
<p style="text-align: center;"><a title="Run Stand Out Demo" href="http://fxexperience.com/webstart/texteffects/standout/Text_Effects.jnlp"><img src="http://fxexperience.com/wp-content/uploads/2009/11/Picture-13.png" alt="Stand Out" title="Stand Out" width="680" height="402" class="aligncenter size-full wp-image-269" />Click To Run</a></p>
<p>One last little example for you, this one is going for a chrome look. This only uses a single simple reflection effect most of it is done with a gradient fill and gradient stroke.</p>
<pre class="brush: javafx; title: ; notranslate">
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.*;
import javafx.scene.shape.*;
import javafx.scene.paint.*;
import javafx.scene.effect.*;
import javafx.scene.control.*;

var width = 600;
var height = 300;
var text:Text;
var textBox:TextBox;
Stage {
    title: &quot;Text Effects: Stand Out&quot;
    resizable: false
    scene: Scene {
        width: width
        height: height
        content: [
            Rectangle {
                width: width, height: height
                fill: LinearGradient {
                    startX: 0, endX: 0, startY: 0, endY: 1
                    stops: [
                        Stop { offset: 0, color: Color.web(&quot;#6c6a6a&quot;) }
                        Stop { offset: 1, color: Color.web(&quot;#3e3d3d&quot;) }
                    ]
                }
            }
            text = Text {
                effect: Reflection {
                        topOffset: -4
                }
                fill: LinearGradient {
                    startX: 0, endX: 0, startY: 0, endY: 1
                    stops: [
                        Stop { offset: 0.03, color: Color.web(&quot;#cccccc&quot;) }
                        Stop { offset: 0.499, color: Color.web(&quot;#fdfdfd&quot;) }
                        Stop { offset: 0.5, color: Color.web(&quot;#999999&quot;) }
                        Stop { offset: 0.99, color: Color.web(&quot;#dddddd&quot;) }
                    ]
                }
                stroke: LinearGradient {
                    startX: 0, endX: 0, startY: 0, endY: 1
                    stops: [
                        Stop { offset: 0.03, color: Color.web(&quot;#e9e5e5&quot;) }
                        Stop { offset: 0.06, color: Color.web(&quot;#909090&quot;) }
                        Stop { offset: 0.23, color: Color.web(&quot;#d1d1d1&quot;) }
                        Stop { offset: 0.34, color: Color.web(&quot;#9f9f9f&quot;) }
                        Stop { offset: 0.60, color: Color.web(&quot;#7b7b7b&quot;) }
                        Stop { offset: 0.67, color: Color.web(&quot;#aeaeae&quot;) }
                        Stop { offset: 0.76, color: Color.web(&quot;#7b7b7b&quot;) }
                        Stop { offset: 0.94, color: Color.web(&quot;#676766&quot;) }
                        Stop { offset: 0.99, color: Color.web(&quot;#e5e5e4&quot;) }
                    ]
                }
                font : Font { name: &quot;Arial Black&quot;, size : 80 }
                layoutX: bind (width - text.layoutBounds.width)/2
                layoutY: bind (height/2) + 20
                content: bind textBox.rawText
            }
            textBox = TextBox {
                text:&quot;STAND OUT&quot;
                layoutX: 100
                layoutY: height - 40
                width: width-200
            }
        ]
    }
}
</pre>
<p>I hope you have enjoyed these <img src='http://fxexperience.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Have a go see what you can create your self it would be great to be able to put together a &#8220;50 Stunning JavaFX Text Effect Tutorials&#8221; blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2009/11/text-effects/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Win $2000 in RIA Exemplar Challenge</title>
		<link>http://fxexperience.com/2009/10/win-2000-in-ria-exemplar-challenge/</link>
		<comments>http://fxexperience.com/2009/10/win-2000-in-ria-exemplar-challenge/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 12:01:15 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Controls]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=176</guid>
		<description><![CDATA[Create an application in JavaFX that exemplifies the appearance and behavior of a next-generation enterprise RIA (rich internet application) See the official announcement for more details on the rules etc. Announcing the JavaFXpert RIA Exemplar Challenge Announcing the JavaFXpert RIA Exemplar Challenge I will be judging the entries for their visual design with the help of [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>Create an application in JavaFX that exemplifies the appearance and behavior of a next-generation enterprise RIA (rich internet application)</strong></p></blockquote>
<p>See the official announcement for more details on the rules etc. <a title="Announcing the JavaFXpert RIA Exemplar Challenge" href="http://learnjavafx.typepad.com/weblog/2009/10/announcing-the-javafxpert-ria-exemplar-challenge.html" target="_blank">Announcing the JavaFXpert RIA Exemplar Challenge</a></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Announcing the JavaFXpert RIA Exemplar Challenge</div>
<p>I will be judging the entries for their visual design with the help of fellow graphics judge <a href="http://www.curious-creature.org/">Romain Guy</a>. To help all the designers entering here are a couple of the original designs for the Caspian theme along with links to the photoshop files they were created with. This way you can see the how all the all the controls visuals are contracted using vector shapes and layer effects.</p>
<p style="text-align: center;"><a href="http://fxexperience.com/caspian/Controls.psd.zip"><img class="aligncenter" title="Download Controls Photoshop PSD" src="http://fxexperience.com/caspian/Controls.png" alt="" width="500" height="211" /></a></p>
<p style="text-align: center;"><a href="http://fxexperience.com/caspian/Controls.psd.zip">Download Controls.PSD.ZIP</a></p>
<p style="text-align: center;"><a href="http://fxexperience.com/caspian/Controls-Mockup.psd.zip"><img class="aligncenter" title="Download Controls Mockup Photoshop PSD" src="http://fxexperience.com/caspian/Controls-Mockup.png" alt="" width="643" height="641" /></a></p>
<p style="text-align: center;"><a href="http://fxexperience.com/caspian/Controls-Mockup.psd.zip">Download Controls Mockup.PSD.ZIP</a></p>
<p style="text-align: left;">I also thought maybe some links to sites with good articles on design might be helpful. Most of these are associated with Web Design rather than Application User Interface Design but there is a large amount of cross over and I have not found any good sites on Application User Interface myself.</p>
<ul>
<li><a href="http://www.smashingmagazine.com/" target="_blank">Smashing Magazine</a></li>
<li><a href="http://abduzeedo.com" target="_blank">Abduzeedo</a></li>
<li><a href="http://www.outlawdesignblog.com/">Outlaw Design Blog</a></li>
<li><a href="http://www.hongkiat.com/blog/">Hongkiat</a></li>
<li><a href="http://www.noupe.com/">Noupe</a></li>
</ul>
<p>Here are a few links for inspiration:</p>
<ul>
<li><a href="http://www.madebysofa.com/#work">Sofa</a></li>
<li><a href="http://280slides.com/">280 Slides</a></li>
<li><a href="http://280atlas.com/what.php">280 Atlas</a></li>
<li><a href="http://www.atebits.com/tweetie-mac/">atebits</a></li>
<li><a href="http://metalabdesign.com/">metalabdesign</a></li>
<li><a href="http://transmissionapps.com/">transmissionapps</a></li>
<li><a href="http://www.icondesigner.net/">Icon Designer</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2009/10/win-2000-in-ria-exemplar-challenge/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Free icons for your JavaFX applications</title>
		<link>http://fxexperience.com/2009/07/free-icons-for-your-javafx-applications/</link>
		<comments>http://fxexperience.com/2009/07/free-icons-for-your-javafx-applications/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 20:16:11 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=122</guid>
		<description><![CDATA[Icons are a important part of any application so here is a few nice free collections I have come across that you might find helpful. You can add add a icon to a button like this: assuming the icon &#8220;icon.png&#8221; is in the same directory(package) as your source file. Developpers Icons by Sekkyumu Basic set [...]]]></description>
			<content:encoded><![CDATA[<p>Icons are a important part of any application so here is a few nice free collections I have come across that you might find helpful. You can add add a icon to a button like this:</p>
<pre class="brush: css; title: ; notranslate">
Button {
    graphic: ImageView{ image: Image{ url:&quot;{__DIR__}icon.png&quot;}}
}
</pre>
<p>assuming the icon &#8220;icon.png&#8221; is in the same directory(package) as your source file.</p>
<h3>Developpers Icons by Sekkyumu</h3>
<p><a href="http://Sekkyumu.deviantart.com/art/Developpers-Icons-63052312"><img class="alignnone" title="Developpers Icons by Sekkyumu" src="http://fc03.deviantart.com/fs27/i/2008/035/5/d/Developpers_Icons_by_Sekkyumu.png" alt="" width="600" height="288" /></a></p>
<h3><span id="more-122"></span>Basic set by prokofusha</h3>
<p><a href="http://prokofusha.deviantart.com/art/Basic-set-125164098"><img class="alignnone" title="Basic set by prokofusha" src="http://fc08.deviantart.com/fs42/i/2009/158/7/f/Basic_set_by_prokofusha.png" alt="" width="446" height="807" /></a></p>
<h3>Free Vector Icon Set by monofactor</h3>
<p><a href="http://www.monofactor.com/free-vector-icon-set-1-25-icons/"><img class="alignnone" title="Free Vector Icons" src="http://www.monofactor.com/files/mf_icons1.jpg" alt="" width="525" height="162" /></a></p>
<p>Lots more nice icons in this Smashing Magazine article <a href="http://www.smashingmagazine.com/2008/05/21/40-professional-icon-sets-for-free-download/">40 Professional Icon Sets For Free Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2009/07/free-icons-for-your-javafx-applications/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Caspian Skin</title>
		<link>http://fxexperience.com/2009/06/caspian-skin/</link>
		<comments>http://fxexperience.com/2009/06/caspian-skin/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 06:27:36 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Controls]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=58</guid>
		<description><![CDATA[The new JavaFX controls were designed to be easily skinable so that you can create any look you can think up but we still need a default look that you get out of the box. The default skin that comes with JavaFX 1.2 is called Caspian which aims to be flexable and usable as is [...]]]></description>
			<content:encoded><![CDATA[<p>The new JavaFX controls were designed to be easily skinable so that you can create any look you can think up but we still need a default look that you get out of the box. The default skin that comes with JavaFX 1.2 is called Caspian which aims to be flexable and usable as is for a wide range of applications. I thought I would share a little about the design decisions I went through in designing Caspian.<br />
<strong></strong></p>
<p><strong> The Requirements</strong></p>
<ul>
<li>Needs to work in many types of applications from product sites though strong branded corporate sites to sparkly web 2.0 sites.</li>
<li>Has to fit in and look in place on Windows, Mac, Mobile and TV</li>
<li>Must not look identifiably like any other look</li>
<li>Should complement the design of a application not over power it</li>
</ul>
<p><strong>The Technical Requirements</strong></p>
<ul>
<li>Need to be CSS themable so the designer/developer can customize it to fit into their product design</li>
<li>Vector based so that the controls look good even when scaled , rotating, animating etc.</li>
<li>Needs to be technically simple so that it is fast to render</li>
</ul>
<p><strong>The Color</strong></p>
<ul>
<li>Has to be gray to fit in with the current fashion and the widest range of products</li>
<li>Needs an accent color for important UI parts such as focused items and default buttons on a dialog where the user attention needs to be drawn</li>
<li>Has to work on wide range backgrounds</li>
</ul>
<p><img class="aligncenter size-full wp-image-60" title="colors" src="http://fxexperience.com/wp-content/uploads/2009/06/colors.png" alt="colors" width="700" height="101" /></p>
<h3>Initial Design</h3>
<p>After experimenting with lots of designs and researching what other people are doing in the field here are the initial designs I did in Photoshop.</p>
<p><img class="aligncenter size-full wp-image-61" title="controls design 1" src="http://fxexperience.com/wp-content/uploads/2009/06/controls1.png" alt="controls design 1" width="669" height="398" /></p>
<p><img class="aligncenter size-full wp-image-62" title="controls design 2" src="http://fxexperience.com/wp-content/uploads/2009/06/controls2.png" alt="controls design 2" width="669" height="398" /></p>
<div id="attachment_65" class="wp-caption aligncenter" style="width: 645px"><img class="size-full wp-image-65" title="design2" src="http://fxexperience.com/wp-content/uploads/2009/06/design2.png" alt="Example Window Design" width="635" height="542" /><p class="wp-caption-text">Example Window Design</p></div>
<div id="attachment_67" class="wp-caption aligncenter" style="width: 867px"><img class="size-full wp-image-67" title="colors1" src="http://fxexperience.com/wp-content/uploads/2009/06/colors1.png" alt="Testing on a extreme range of colors" width="857" height="371" /><p class="wp-caption-text">Testing on a extreme range of colors</p></div>
<p>Hope you found that interesting the next few blogs on Caspian will cover how to style controls with CSS and how to make custom skins.</p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2009/06/caspian-skin/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

