<?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>Caffeine Induced Ramblings - Jasper Potts's Blog &#187; Java</title>
	<atom:link href="http://www.jasperpotts.com/blog/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasperpotts.com/blog</link>
	<description>Jasper Potts's Blog on Java and Life</description>
	<lastBuildDate>Tue, 24 Nov 2009 17:58:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>New Synthetica BlackEye Look and Feel</title>
		<link>http://www.jasperpotts.com/blog/2009/11/new-synthetica-blackeye-look-and-feel/</link>
		<comments>http://www.jasperpotts.com/blog/2009/11/new-synthetica-blackeye-look-and-feel/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 17:57:48 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=221</guid>
		<description><![CDATA[Its always nice to see new Swing Look and Feels. Nice looking new theme for Synthetica. Link: Synthetica BlackEye Highlights

Synthetica is based on same Synth Look and Feel that Nimbus is. There are some very neat features which we are supporting in JavaFX like shaped windows and smart backgrounds. Its really nice to seem them available [...]]]></description>
			<content:encoded><![CDATA[<p>Its always nice to see new Swing Look and Feels. Nice looking new theme for Synthetica. Link: <a href="http://weblogs.java.net/blog/wzberger/archive/2009/11/22/synthetica-blackeye-highlights">Synthetica BlackEye Highlights</a></p>
<p><img class="aligncenter" title="Shaped Windows" src="http://www.javasoft.de/images/screenshots/syntheticaBlackEye/highlights/windowShape.png" alt="" width="310" height="158" /><img class="aligncenter" title="Smart Background" src="http://www.javasoft.de/images/screenshots/syntheticaBlackEye/highlights/smartBackground.png" alt="" width="190" height="246" /></p>
<p>Synthetica is based on same Synth Look and Feel that Nimbus is. There are some very neat features which we are supporting in JavaFX like shaped windows and smart backgrounds. Its really nice to seem them available to Swing developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/11/new-synthetica-blackeye-look-and-feel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Exciting new Swing GUI builder &#8220;GUIDE&#8221;</title>
		<link>http://www.jasperpotts.com/blog/2009/09/exciting-new-swing-gui-builder-guide/</link>
		<comments>http://www.jasperpotts.com/blog/2009/09/exciting-new-swing-gui-builder-guide/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 15:37:06 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=216</guid>
		<description><![CDATA[A new Swing GUI builder tool is out in beta called GUIDE. Looking at the videos on the website it looks impressive. Like a more polished version of Netbeans Matisse with some extra goodies.

Mindsilver GUIDE
]]></description>
			<content:encoded><![CDATA[<p>A new Swing GUI builder tool is out in beta called GUIDE. Looking at the videos on the website it looks impressive. Like a more polished version of Netbeans Matisse with some extra goodies.</p>
<p><a href="http://www.mindsilver.com/"><img class="alignnone" title="Mindsilver GUIDE" src="http://www.mindsilver.com/guide/docs/articles/mvc/supervisingController-createView.png" alt="" width="520" height="340" /></a></p>
<h3><a href="http://www.mindsilver.com/">Mindsilver GUIDE</a></h3>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/09/exciting-new-swing-gui-builder-guide/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Time to close the polls</title>
		<link>http://www.jasperpotts.com/blog/2009/05/time-to-close-the-polls/</link>
		<comments>http://www.jasperpotts.com/blog/2009/05/time-to-close-the-polls/#comments</comments>
		<pubDate>Tue, 12 May 2009 14:39:00 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Nimbus]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=212</guid>
		<description><![CDATA[It seemed like it was time to close the polls, I don&#8217;t think there is a clear answer across all platforms. On windows there is a clear winner for the native look and that makes sense as Windows LAF has had a huge amount of work put into it over that last 5 years plus. [...]]]></description>
			<content:encoded><![CDATA[<p>It seemed like it was time to close the polls, I don&#8217;t think there is a clear answer across all platforms. On windows there is a clear winner for the native look and that makes sense as Windows LAF has had a huge amount of work put into it over that last 5 years plus. If there was the resources to put a equal effort into the GTK LAF and a new KDE LAF then they would be clear winners to. Nimbus is a great cross platform look and feel and allows people to create good looking applications but maybe is not the simplest look and feel for people to start with as it takes a little effort to make a great looking application with it. Also it is not the best for compatibility with applications written to work with other look and feels so is a dangerous choice as a default. So I kind of feel that we could go native on Windows and people will be happy but there is no clear answer for GTK and KDE. I will pass the poll results on to the other people who have a say in the decision and see what the consensus is.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/05/time-to-close-the-polls/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Breakdown of what should be default LAF for Java 7</title>
		<link>http://www.jasperpotts.com/blog/2009/03/breakdown-of-what-should-be-default-laf-for-java-7/</link>
		<comments>http://www.jasperpotts.com/blog/2009/03/breakdown-of-what-should-be-default-laf-for-java-7/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 11:06:38 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Nimbus]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=208</guid>
		<description><![CDATA[After watching the voting and reading the comments I have noticed two things: First is from 30 votes to 800 votes the percentages have hardly changed which means we seem to be falling on a conclusion. Native LAF has varied from 59% to 63% so nothing major and is a clear winner.
The second point is [...]]]></description>
			<content:encoded><![CDATA[<p>After watching the voting and reading the comments I have noticed two things: First is from 30 votes to 800 votes the percentages have hardly changed which means we seem to be falling on a conclusion. Native LAF has varied from 59% to 63% so nothing major and is a clear winner.</p>
<p>The second point is there seems to be different answers for Windows and Unix and good arguments that maybe they should not be the same so let me start a new poll with them split and see if I am right. I will split the poll into 3 categories Windows, Unix GTK and Unix KDE. I am not quite sure how we detect between GTK and KDE but sure we can find a way <img src='http://www.jasperpotts.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
<p>Again If you have a strong feeling one way or another then please explain in a comment below as we would love to hear. All your votes and comments will be taken into consideration when we make the final discussion.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/03/breakdown-of-what-should-be-default-laf-for-java-7/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Which Look and Feel should be default in Java 7</title>
		<link>http://www.jasperpotts.com/blog/2009/03/which-look-and-feel-should-be-default-in-java-7/</link>
		<comments>http://www.jasperpotts.com/blog/2009/03/which-look-and-feel-should-be-default-in-java-7/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 14:35:02 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Nimbus]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=198</guid>
		<description><![CDATA[The other day I was discussing with colleagues if Nimbus should be the default LAF(Look and Feel) for Swing application. The current default LAF is Ocean which is a spiced up theme for Metal which has been the Swing default LAF since the beginning. It feels like with a large release like Java 7 it [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I was discussing with colleagues if Nimbus should be the default LAF(Look and Feel) for Swing application. The current default LAF is Ocean which is a spiced up theme for Metal which has been the Swing default LAF since the beginning. It feels like with a large release like Java 7 it is about time we changed the default LAF to a more sensible choice which leaves two choices Nimbus which is the new cross platform LAF and the system native LAF which will be Windows LAF on Windows and GTK LAF on Unix. Apple has already gone with the system native choice and the default LAF for Java Swing applications on Mac is Apple&#8217;s Aqua native LAF. The only reason for remaining with Ocean LAF is to maintain backwards compatibility for old Java applications which were written with static pixel based layout so will be all messed up if the size of components changes. My feeling is that sector of users should be getting pretty small now and as long as we provide a easy work around like system property file that lets a user/administrator change the default LAF back to Ocean for those few special cases then we can move forward and select a modern LAF as the default. So then it comes down to what to choose <strong>Nimbus</strong> or <strong>Native</strong>(Windows/GTK) I am torn between the two. So we decided the best idea is to ask more people, so what do you think?</p>
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
<p>If you have a strong feeling one way or another then please explain in a comment below as we would love to hear. All your votes and comments will be taken into consideration when we make the final discussion.</p>
<p><em><strong>Update</strong><br />
I have closed this poll and opened 3 new ones on the post <a href="http://www.jasperpotts.com/blog/2009/03/breakdown-of-what-should-be-default-laf-for-java-7/">Breakdown of what should be default LAF for Java 7</a>. So follow that link if you would like to vote.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/03/which-look-and-feel-should-be-default-in-java-7/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>Nimbus: The New Face of Swing &#8211; JavaOne 2008</title>
		<link>http://www.jasperpotts.com/blog/2009/01/nimbus-the-new-face-of-swing-javaone-2008/</link>
		<comments>http://www.jasperpotts.com/blog/2009/01/nimbus-the-new-face-of-swing-javaone-2008/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 11:15:59 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Nimbus]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=130</guid>
		<description><![CDATA[I am just reviewing the submissions for JavaOne 2009 and was looking back at what we did for JavaOne 2008 and noticed Sun has posted the slides with audio from our session on Nimbus last year. So if you are interested in Nimbus and were not fortunate enough to be able to come and see us in [...]]]></description>
			<content:encoded><![CDATA[<p>I am just reviewing the submissions for <a href="http://java.sun.com/javaone/">JavaOne 2009</a> and was looking back at what we did for <a href="http://developers.sun.com/learning/javaoneonline/j1online.jsp?track=coolstuff&amp;yr=2008">JavaOne 2008</a> and noticed Sun has posted the slides with audio from our session on Nimbus last year. So if you are interested in Nimbus and were not fortunate enough to be able to come and see us in person or have listened to it already. Then it is well worth checking out as I think we made a good attempt to explain how Nimbus works and how to use it. </p>
<h4>Nimbus: The New Face of Swing TS-6096</h4>
<p><em>Presenter: Richard Bair, Sun Microsystems, Inc.; Jasper Potts, Sun Microsystems, Inc.</em></p>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td>
<form action="http://developers.sun.com/learning/javaoneonline/sessions/2008/watch/TS-6096/index.html?cid=925635">
<input type="submit" value=" Watch Multimedia " /></form>
</td>
<td>
<form action="http://developers.sun.com/learning/javaoneonline/2008/pdf/TS-6096.pdf?cid=925634">
<input type="submit" value=" View PDF " /></form>
</td>
<td>
<form action="http://developers.sun.com/learning/javaoneonline/sessions/2008/mp3/TS-6096.mp3?cid=925636">
<input type="submit" value=" MP3 " /></form>
</td>
</tr>
</tbody>
</table>
<p>Nimbus is the stunning next-generation cross-platform look-and-feel for the Java platform, perfect for skinning Swing components in existing applications and new FX applications. In this session, two Nimbus developers guide you through using Nimbus to create beautiful modern applications. They cover the basics of using Nimbus in your Swing applications and also discuss using the new Nimbus Designer visual design tool for extending Nimbus and styling custom components. Finally, they show how to brand your applications with completely custom look-and-feels extending Nimbus.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/01/nimbus-the-new-face-of-swing-javaone-2008/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Presenting on JavaFX at IJTC 2008 &#8211; Irish Java Technologies Conference 2008</title>
		<link>http://www.jasperpotts.com/blog/2009/01/presenting-on-javafx-at-ijtc-2008-irish-java-technologies-conference-2008/</link>
		<comments>http://www.jasperpotts.com/blog/2009/01/presenting-on-javafx-at-ijtc-2008-irish-java-technologies-conference-2008/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 18:18:00 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaFX]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/2009/01/presenting-on-javafx-at-ijtc-2008-irish-java-technologies-conference-2008/</guid>
		<description><![CDATA[Sorry for the very late notice but if you are attending IJTC on January 7th then I am giving a presentation on JavaFX at 3:30pm so hope to see you all there. I will be posting the slides and demos from this talk and the Devoxx ones later this week so keep an eye out. 

]]></description>
			<content:encoded><![CDATA[<p>Sorry for the very late notice but if you are attending IJTC on January 7th then I am giving a presentation on JavaFX at 3:30pm so hope to see you all there. I will be posting the slides and demos from this talk and the Devoxx ones later this week so keep an eye out. </p>
<p><a href="http://ijtc.firstport.ie/"><img src="http://ijtc.firstport.ie/site_media/images/buttons/ijtc2008-speaker.jpg" alt="Speaker IJTC 2008" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/01/presenting-on-javafx-at-ijtc-2008-irish-java-technologies-conference-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning the JavaFX Language</title>
		<link>http://www.jasperpotts.com/blog/2008/12/learning-the-javafx-language/</link>
		<comments>http://www.jasperpotts.com/blog/2008/12/learning-the-javafx-language/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 14:13:45 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaFX]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/2008/12/learning-the-javafx-language/</guid>
		<description><![CDATA[I had the pain of learning JavaFX by example code, following the compiler mailing list, asking people and if all else fails digging in the source. Finnaly there is a great article that has every thing you need to know to get you started with the language in one easy to read page:
Experiments With JavaFX [...]]]></description>
			<content:encoded><![CDATA[<p>I had the pain of learning JavaFX by example code, following the compiler mailing list, asking people and if all else fails digging in the source. Finnaly there is a great article that has every thing you need to know to get you started with the language in one easy to read page:
<p align="center"><span style="font-size: 32px; font-weight: bold" class="Apple-style-span"><a href="http://www.ociweb.com/jnb/jnbDec2008.html" target="_blank"><span style="font-size: 32px; font-weight: bold">Experiments With JavaFX Script</span><br />
<br /><span style="font-size: 16px; font-weight: normal">by Weiqi Gao, Principal Software Engineer</span></a></span></p>
<p>Its highly recommended reading and I wish it was around when I was learning JavaFX. Its in by bookmarks bar for quick reference every time I can&#8217;t remember a bit of syntax. Hope it helps you to.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2008/12/learning-the-javafx-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Devoxx 2008</title>
		<link>http://www.jasperpotts.com/blog/2008/12/devoxx-2008/</link>
		<comments>http://www.jasperpotts.com/blog/2008/12/devoxx-2008/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 15:26:35 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaFX]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/2008/12/devoxx-2008/</guid>
		<description><![CDATA[I attended Devoxx formally JavaPolis this year for the first time and had a truly brilliant experience. Probably worked the hardest I ever have in my life with about 4 hours of sleep a night for a week and non-stop between, but was also hugely enjoyable. It was great to have a chance to show [...]]]></description>
			<content:encoded><![CDATA[<p>I attended <a href="http://devoxx.com">Devoxx</a> formally JavaPolis this year for the first time and had a truly brilliant experience. Probably worked the hardest I ever have in my life with about 4 hours of sleep a night for a week and non-stop between, but was also hugely enjoyable. It was great to have a chance to show JavaFX and feel the excitement we were generating around it. I finally got a chance to step back from the nitty details and try using it as a developer and see all the good points rather than the amount of work I still need to do to make everything perfect. Oh the pain of being a perfectionist <img src='http://www.jasperpotts.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  . As well as talking in several sessions on JavaFX and demoing in the keynote I got the chance to build a couple of applications in FX during the week. It was fun to see just how fast you can put cool looking apps together in FX:</p>
<ul>
<li>Little image viewer app for our Java FX University session, I will post the source for this soon.<br />
<img src="http://www.jasperpotts.com/blog/wp-content/uploads/2008/12/imageviewer.jpg" alt="FX Image Viewer" /></li>
<li>We had a demo called &#8220;Swish&#8221; which we were going to show during the JavaFX keynote at Devoxx, someone suggested would it not be cool if we could create a Devoxx themed version of it, expecting a logo somewhere or something like that. Well it gave me a chance to put the JavaFX Production Suite through its paces and see what we could do. So a few hours later we had a full Devoxx themed version. The swish demo takes a bunch of graphics created in Photoshop along with animation paths drawn in Illustrator and animates them to make a cool little visual demo. The cool thing is you can take completely new graphics files as long as they follow the same basic form and create a completely new version of the application with no code changes needed.<br />
<img src="http://www.jasperpotts.com/blog/wp-content/uploads/2008/12/devoxx.jpg" alt="Devox Swish" /></li>
<li>After showing <a href="http://www.devoxx.com/display/JV08/Stephan+Janssen+-">Stephan Janssen</a> he suggested how cool it would be if we could replace the full backdrop behind the slides on the cinema screen. So a  second minimal version of Devoxx Swish in full 1080p HD was born which was projected on the full Cinema screen while people were entering/exiting the keynote and when the Beatbox artist Roxorloops was performing.<br />
<img src="http://www.jasperpotts.com/blog/wp-content/uploads/2008/12/devoxxhd.jpg" alt="Devoxx Swish HD" /></li>
<li>Next I got asked if we could put together a little application for the Sun Booth to select prize winners from a text file of names, so a couple of hours later we had it up and running spinning and zooming random names when the mouse was clicked.<br />
<img src="http://www.jasperpotts.com/blog/wp-content/uploads/2008/12/prize-draw.jpg" alt="Prize Draw" /><br />
Seemed to draw quite a crowd, or maybe it was just the cool prizes and free beer! <img src='http://www.jasperpotts.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
<img src="http://www.jasperpotts.com/blog/wp-content/uploads/2008/12/prize-draw2.jpg" alt="Prize Draw 2" /></li>
<li>When I was creating the prize draw application I needed to work out the Spline interpreter numbers to make the names thud down. I ended up using <a href="http://www.jroller.com/gfx/entry/swing_demos_animations_and_swing">Romain Guy&#8217;s Spline Editor for Swing</a> which makes it nice and easy. So thought it was about time we had a JavaFX version, and it could not be too hard. So a couple hours and a couple hundred bind statements later we have a very cool little Spline Editor that lets you edit the spline and see the effect in real time then copy the code to paste into your JavaFX application.<br />
<img src="http://www.jasperpotts.com/blog/wp-content/uploads/2008/12/splineeditor.jpg" alt="Spline Editor" /><br />
If you would like to try it for your self click here: <a href="http://jasperpotts.com/blogfiles/splineeditor/Spline_Editor.jnlp" onclick="javascript:urchinTracker ('/blogfiles/splineeditor/Spline_Editor.jnlp');" title="Launch Spline Editor" target="_blank"><img src="/blogfiles/launch.jpg" align="absmiddle" border="0" /></a> you can also download the <a href="http://jasperpotts.com/blogfiles/splineeditor/src.zip" onclick="javascript:urchinTracker ('/blogfiles/splineeditor/src.zip');" title="Spline Editor Src" target="_blank">source Netbeans project</a>.</li>
</ul>
<p>I hope all of you who attended <a href="http://devoxx.com">Devoxx</a> this year had as much fun as I did and all of you who did not attend you really missed something great and hope to see you all there next year. I will be posting all the slides to our sessions here very soon. All the sessions were recorded and will be posted on <a href="http://www.parleys.com">www.parleys.com</a> at some point next year.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2008/12/devoxx-2008/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Nimbus UIManager UIDefaults</title>
		<link>http://www.jasperpotts.com/blog/2008/08/nimbus-uimanager-uidefaults/</link>
		<comments>http://www.jasperpotts.com/blog/2008/08/nimbus-uimanager-uidefaults/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 21:09:20 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Nimbus]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/2008/08/nimbus-uimanager-uidefaults/</guid>
		<description><![CDATA[Nimbus is completely configured by properties in the UIManager defaults table. In my last blog I showed a simple example of how to skin a single component. This gave you a sneak peek into the power of these properties. Lots of people have asked for a complete list of properties that can be set, well [...]]]></description>
			<content:encoded><![CDATA[<p>Nimbus is completely configured by properties in the UIManager defaults table. In my last blog I showed a simple example of how to skin a single component. This gave you a sneak peek into the power of these properties. Lots of people have asked for a complete list of properties that can be set, well its simple just grab <code>UIManager.getLookAndFeelDefaults()</code> and iterate over the contents of the map and print the keys and values and there you go. Well I am not that cruel so I did the work for you and will include a link to a complete table of them at the end. But before I get to that let me explain how they work.</p>
<p>Nimbus properties follow some rules and you can not only use the property keys that we have added in as default but you can create your own. Nimbus Look and Feel scans the UIDefaults table when ever you add a property with <code>UIManager.put(&lt;&lt;key&gt;&gt;,&lt;&lt;value&gt;&gt;)</code> then updates its internal state. When that new property matches the current state of the component it applies to then it will be applied to that component. Properties cascade like CSS and the most specific matching one is used.<br />
Example:</p>
<ul>
<li><code>foreground = Color.BLACK</code></li>
<li><code>Label.foreground = Color.BLUE</code></li>
<li><code>Label[Disabled].foreground = Color.GRAY</code></li>
<li><code>"SomeLabel"[Disabled].foreground = Color.WHITE</code></li>
</ul>
<p>In these examples <code>foreground</code> applies to the foreground of all regions of all components, <code>Label.foreground</code> applies to only Label components, <code>Label[Disabled].foreground</code> applies to only Label components in the Disabled state. <code>"SomeLabel"[Disabled].foreground</code> applies to all components named &#8220;SomeLabel&#8221; that are in the disabled state. Hopefully that also explains the different ways you can write a rule to match a Component. The only 2 cases that are not covered here are <code>Component.Region.foreground</code> which lets you specify a sub-region of a component and <code>ComponentA:ChildComponentB.foreground</code> which lets you specify a <code>ChildComponentB contained within ComponentA</code>. You can see many examples of these in the complete table below and then play with writing your own. For example you can use the &#8220;name&#8221; property of a component in a similar way to &#8220;class&#8221; in CSS, say naming a bunch of buttons &#8220;hotButton&#8221; and then specifying new rules for them in the defaults table. I already explained in my last blog how you can override the global defaults on a single instance bases which matches the &#8220;style&#8221; attribute with HTML CSS.</p>
<p>Colors in Nimbus are derived, which means there are a core set of colors which are constants and all the other colors are calculated from those. This means you can simply change those and the 1000s of other colors that are related and used in the painters will update to reflect the new base color. These colors are shown in the &#8220;Primary Colors&#8221; section of the table. The colors in the &#8220;Secondary Colors&#8221; section are derived from those in the &#8220;Primary Colors&#8221; section but themselves are used as the base colors for other colors. You may need to change the secondary colors to tweak the results of changing the primary ones if you are not happy with the results. You can you derived colors in your own code as well so that you colors can change when the primary colors change. This will allow you to make your application color theme-able idea for white label branding etc. The method you need is on <code>NimbusLookAndFeel</code> called <code>getDerivedColor</code> :</p>
<pre>
/**
 * Get a derived color, derived colors are shared instances and is color
 * value will change when its parent UIDefault color changes.
 *
 * @param uiDefaultParentName The parent UIDefault key
 * @param hOffset             The hue offset
 * @param sOffset             The saturation offset
 * @param bOffset             The brightness offset
 * @param aOffset             The alpha offset
 * @param uiResource          True if the derived color should be
 *                            UIResource, false if it should not be
 * @return The stored derived color
 */
public Color getDerivedColor(String uiDefaultParentName,
               float hOffset, float sOffset, float bOffset, int aOffset,
               boolean uiResource)
</pre>
<p>Hopefully the rest will make sense as you read though the table and look at all the examples. After that its just a matter of try playing with some and see what you can do. I hope you see that power in this that Richard Bair and I designed and hoped would be useful. The complete defaults properties table is way to big to include in this post so I have put it on a separate page.</p>
<ul>
<li> <a href="http://jasperpotts.com/blogfiles/nimbusdefaults/nimbus.html" title="Nimbus properties">Nimbus UIDefaults Properties List</a></li>
</ul>
<p>If you would like to see how I made this list, here is the code that creates the html.</p>
<table cellspacing="10" style="text-align: center">
<tr>
<td><a href="http://jasperpotts.com/blogfiles/nimbusdefaults/NimbusBrowser.java" onclick="javascript:urchinTracker ('/blogfiles/nimbusdefaults/NimbusBrowser.java');"><img src="http://www.jasperpotts.com/blog/wp-content/uploads/2007/11/java-icon.png" alt="Java Icon" border="0" /><br />NimbusBrowser.java</a></td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2008/08/nimbus-uimanager-uidefaults/feed/</wfw:commentRss>
		<slash:comments>75</slash:comments>
		</item>
	</channel>
</rss>
