<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	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>Comments on: Creating a HUD style button</title>
	<atom:link href="http://explodingpixels.wordpress.com/2009/01/03/creating-a-hud-style-button/feed/" rel="self" type="application/rss+xml" />
	<link>http://explodingpixels.wordpress.com/2009/01/03/creating-a-hud-style-button/</link>
	<description>Exposing the pixels behind beautiful user interfaces</description>
	<lastBuildDate>Thu, 10 Dec 2009 16:18:30 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Creating a HUD style comob box &#171; Exploding Pixels</title>
		<link>http://explodingpixels.wordpress.com/2009/01/03/creating-a-hud-style-button/#comment-452</link>
		<dc:creator>Creating a HUD style comob box &#171; Exploding Pixels</dc:creator>
		<pubDate>Sun, 08 Mar 2009 19:57:02 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=535#comment-452</guid>
		<description>[...] for drawing the combo box itself. It does this by creating a simple HUD style button (see this post for the HudButtonUI code), with extra margin space on the right. Up/down arrows are then painted in [...]</description>
		<content:encoded><![CDATA[<p>[...] for drawing the combo box itself. It does this by creating a simple HUD style button (see this post for the HudButtonUI code), with extra margin space on the right. Up/down arrows are then painted in [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Creating a HUD style check box &#171; Exploding Pixels</title>
		<link>http://explodingpixels.wordpress.com/2009/01/03/creating-a-hud-style-button/#comment-388</link>
		<dc:creator>Creating a HUD style check box &#171; Exploding Pixels</dc:creator>
		<pubDate>Sun, 01 Feb 2009 21:41:41 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=535#comment-388</guid>
		<description>[...] you&#8217;ll probably notice a bit of redundant code from the post on creating a HUD style button. I&#8217;ve done this to keep the blog entries independent, but the code that will be incorporated [...]</description>
		<content:encoded><![CDATA[<p>[...] you&#8217;ll probably notice a bit of redundant code from the post on creating a HUD style button. I&#8217;ve done this to keep the blog entries independent, but the code that will be incorporated [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://explodingpixels.wordpress.com/2009/01/03/creating-a-hud-style-button/#comment-365</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Wed, 14 Jan 2009 14:59:52 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=535#comment-365</guid>
		<description>Cool...thanks Peter. I&#039;ll look at incorporating your changes.</description>
		<content:encoded><![CDATA[<p>Cool&#8230;thanks Peter. I&#8217;ll look at incorporating your changes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://explodingpixels.wordpress.com/2009/01/03/creating-a-hud-style-button/#comment-361</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Mon, 12 Jan 2009 14:38:03 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=535#comment-361</guid>
		<description>Hi Ken!

I modified your code so that it works with JToggleButton too.

add in header:
	 private static final Color TOP_SELECTED_COLOR = new Color(200,200,200,153);
    private static final Color BOTTOM_SELECTED_COLOR = new Color(111,111,111,153);

add/change in createButtonPaint:

		  boolean isSelected = button.getModel().isSelected();
        Color topColor = isPressed ? TOP_PRESSED_COLOR : (isSelected ? TOP_SELECTED_COLOR : TOP_COLOR);
        Color bottomColor = isPressed ? BOTTOM_PRESSED_COLOR :  (isSelected ? BOTTOM_SELECTED_COLOR : BOTTOM_COLOR);


The conditional ifs are not pretty, and i don&#039;t know if thats the &quot;right&quot; color (i just played around with the values) but it looks quite good.

-Peter</description>
		<content:encoded><![CDATA[<p>Hi Ken!</p>
<p>I modified your code so that it works with JToggleButton too.</p>
<p>add in header:<br />
	 private static final Color TOP_SELECTED_COLOR = new Color(200,200,200,153);<br />
    private static final Color BOTTOM_SELECTED_COLOR = new Color(111,111,111,153);</p>
<p>add/change in createButtonPaint:</p>
<p>		  boolean isSelected = button.getModel().isSelected();<br />
        Color topColor = isPressed ? TOP_PRESSED_COLOR : (isSelected ? TOP_SELECTED_COLOR : TOP_COLOR);<br />
        Color bottomColor = isPressed ? BOTTOM_PRESSED_COLOR :  (isSelected ? BOTTOM_SELECTED_COLOR : BOTTOM_COLOR);</p>
<p>The conditional ifs are not pretty, and i don&#8217;t know if thats the &#8220;right&#8221; color (i just played around with the values) but it looks quite good.</p>
<p>-Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://explodingpixels.wordpress.com/2009/01/03/creating-a-hud-style-button/#comment-360</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Wed, 07 Jan 2009 12:46:56 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=535#comment-360</guid>
		<description>Hi rbs,

I&#039;m not quite sure what you mean by &quot;the button always looks the size of a regular Mac button, with a fair amount of empty space above and below the text&quot;. This could be an issue with Java Update 1 vs Java Update 2 on the Mac (I authored this delegate with Update 1). I have seen issues with insets not being honored correctly in Update 2.

Could you &lt;a&gt;email me&lt;/a&gt; a screen shot?

I hadn&#039;t thought about the different size variants, but that is a good idea. I&#039;ll keep it in mind.

-Ken</description>
		<content:encoded><![CDATA[<p>Hi rbs,</p>
<p>I&#8217;m not quite sure what you mean by &#8220;the button always looks the size of a regular Mac button, with a fair amount of empty space above and below the text&#8221;. This could be an issue with Java Update 1 vs Java Update 2 on the Mac (I authored this delegate with Update 1). I have seen issues with insets not being honored correctly in Update 2.</p>
<p>Could you <a>email me</a> a screen shot?</p>
<p>I hadn&#8217;t thought about the different size variants, but that is a good idea. I&#8217;ll keep it in mind.</p>
<p>-Ken</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rbs</title>
		<link>http://explodingpixels.wordpress.com/2009/01/03/creating-a-hud-style-button/#comment-359</link>
		<dc:creator>rbs</dc:creator>
		<pubDate>Wed, 07 Jan 2009 05:03:06 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=535#comment-359</guid>
		<description>Sorry, brain spasm. I don&#039;t know why I was saying &quot;Jeremy&quot;, Ken.</description>
		<content:encoded><![CDATA[<p>Sorry, brain spasm. I don&#8217;t know why I was saying &#8220;Jeremy&#8221;, Ken.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rbs</title>
		<link>http://explodingpixels.wordpress.com/2009/01/03/creating-a-hud-style-button/#comment-358</link>
		<dc:creator>rbs</dc:creator>
		<pubDate>Wed, 07 Jan 2009 05:01:40 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=535#comment-358</guid>
		<description>Jeremy,

I&#039;m having a problem with this in that the button always looks the size of a regular Mac button, with a fair amount of empty space above and below the text. It definitely looks much bigger than the sample in the image at the top of your post.

Also, have you looked at this from the context of being to respond to whether the programmer tries to apply one of the size properties that Apple added to Swing components a year ago?

I have my own simple code for a HUD-looking JTextField, although it will be interesting to see what up with. But I&#039;m looking forward to whatever other components you come up with.</description>
		<content:encoded><![CDATA[<p>Jeremy,</p>
<p>I&#8217;m having a problem with this in that the button always looks the size of a regular Mac button, with a fair amount of empty space above and below the text. It definitely looks much bigger than the sample in the image at the top of your post.</p>
<p>Also, have you looked at this from the context of being to respond to whether the programmer tries to apply one of the size properties that Apple added to Swing components a year ago?</p>
<p>I have my own simple code for a HUD-looking JTextField, although it will be interesting to see what up with. But I&#8217;m looking forward to whatever other components you come up with.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://explodingpixels.wordpress.com/2009/01/03/creating-a-hud-style-button/#comment-357</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Mon, 05 Jan 2009 12:18:24 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=535#comment-357</guid>
		<description>Harald,

I like the way you think! It would indeed be nice if these HUD style UI delegates installed themselves auto-magically when you added them to a HUD style window - I&#039;ll look into this. 

Nimubs supports this sort of component-tree skinning out-of-the box, which will be very useful, though your base L&amp;F will have to be Nimbus.

-Ken
P.S. I&#039;ve added your request for a JTextFiled HUD UI delegate to the corresponding Mac Widgets for Java issue &lt;a href=&quot;http://code.google.com/p/macwidgets/issues/detail?id=43&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Harald,</p>
<p>I like the way you think! It would indeed be nice if these HUD style UI delegates installed themselves auto-magically when you added them to a HUD style window &#8211; I&#8217;ll look into this. </p>
<p>Nimubs supports this sort of component-tree skinning out-of-the box, which will be very useful, though your base L&amp;F will have to be Nimbus.</p>
<p>-Ken<br />
P.S. I&#8217;ve added your request for a JTextFiled HUD UI delegate to the corresponding Mac Widgets for Java issue <a href="http://code.google.com/p/macwidgets/issues/detail?id=43" rel="nofollow">here</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://explodingpixels.wordpress.com/2009/01/03/creating-a-hud-style-button/#comment-356</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Mon, 05 Jan 2009 12:13:15 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=535#comment-356</guid>
		<description>Caligula,

&lt;a href=&quot;http://www.binarymethod.com/content/bghudappkit.php&quot; rel=&quot;nofollow&quot;&gt;These controls&lt;/a&gt; are nice, but they are Cocoa based. Another Cocoa based solution I&#039;ve stumbled across that pays close attention to detail is Brandon Walkin&#039;s &lt;a href=&quot;http://www.brandonwalkin.com/blog/2008/11/13/introducing-bwtoolkit/&quot; rel=&quot;nofollow&quot;&gt;BWToolkit&lt;/a&gt;.

-Ken</description>
		<content:encoded><![CDATA[<p>Caligula,</p>
<p><a href="http://www.binarymethod.com/content/bghudappkit.php" rel="nofollow">These controls</a> are nice, but they are Cocoa based. Another Cocoa based solution I&#8217;ve stumbled across that pays close attention to detail is Brandon Walkin&#8217;s <a href="http://www.brandonwalkin.com/blog/2008/11/13/introducing-bwtoolkit/" rel="nofollow">BWToolkit</a>.</p>
<p>-Ken</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harald K.</title>
		<link>http://explodingpixels.wordpress.com/2009/01/03/creating-a-hud-style-button/#comment-355</link>
		<dc:creator>Harald K.</dc:creator>
		<pubDate>Mon, 05 Jan 2009 11:56:59 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=535#comment-355</guid>
		<description>As always, it looks good. :-)

What would be nice, was if the UI delegate was automatically installed on the button, when the button is added to a HUD style window.

Another thing that would be nice is a HudTextFieldUI for text fields on HUDs.</description>
		<content:encoded><![CDATA[<p>As always, it looks good. :-)</p>
<p>What would be nice, was if the UI delegate was automatically installed on the button, when the button is added to a HUD style window.</p>
<p>Another thing that would be nice is a HudTextFieldUI for text fields on HUDs.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
