<?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: Sexy Swing App &#8211; iTunes Table Header</title>
	<atom:link href="http://explodingpixels.wordpress.com/2008/05/11/sexy-swing-app-itunes-table-header/feed/" rel="self" type="application/rss+xml" />
	<link>http://explodingpixels.wordpress.com/2008/05/11/sexy-swing-app-itunes-table-header/</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: ijabz</title>
		<link>http://explodingpixels.wordpress.com/2008/05/11/sexy-swing-app-itunes-table-header/#comment-268</link>
		<dc:creator>ijabz</dc:creator>
		<pubDate>Fri, 17 Oct 2008 12:45:58 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=28#comment-268</guid>
		<description>The key changes are in getTableCellRendererComponent, and I simplified the HeaderClickHandler so that it just identified mouse presses and didnt deal with the sorting.

One additional thing I did do is change your Painter code to implement Swingx painters instead then I could use the same Painter to paint the background of a JXLabel used as the header for my browser genre/artist/album list. So unlike others comments on the list I would actually prefer the dependencies on swingx to be kept so your code can be eaily used in situations that might not have ocurred to you, but I can see why the dependency has been removed.</description>
		<content:encoded><![CDATA[<p>The key changes are in getTableCellRendererComponent, and I simplified the HeaderClickHandler so that it just identified mouse presses and didnt deal with the sorting.</p>
<p>One additional thing I did do is change your Painter code to implement Swingx painters instead then I could use the same Painter to paint the background of a JXLabel used as the header for my browser genre/artist/album list. So unlike others comments on the list I would actually prefer the dependencies on swingx to be kept so your code can be eaily used in situations that might not have ocurred to you, but I can see why the dependency has been removed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://explodingpixels.wordpress.com/2008/05/11/sexy-swing-app-itunes-table-header/#comment-266</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Fri, 17 Oct 2008 12:30:43 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=28#comment-266</guid>
		<description>Looks great Paul! I&#039;ll take a look at your changes and see if I can incorporate them back in. Also note that I&#039;m currently working on iTunes style scroll bars which may be of interest to you.

-Ken</description>
		<content:encoded><![CDATA[<p>Looks great Paul! I&#8217;ll take a look at your changes and see if I can incorporate them back in. Also note that I&#8217;m currently working on iTunes style scroll bars which may be of interest to you.</p>
<p>-Ken</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ijabz</title>
		<link>http://explodingpixels.wordpress.com/2008/05/11/sexy-swing-app-itunes-table-header/#comment-264</link>
		<dc:creator>ijabz</dc:creator>
		<pubDate>Fri, 17 Oct 2008 12:23:16 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=28#comment-264</guid>
		<description>This table header rendering code is great , its something Ive wanted to achieve for quite some time. I actually use Swingx and JXTables so I&#039;ve made modification to your code so that it works with a JXTable with in built sorting on Java 1.5.

Screenshot: http://www.jthink.net/jaikoz/jsp/code/jaikozusingmacwidgets.jpg
Code: http://www.jthink.net/jaikoz/jsp/code/JaikozColumnHeaderRenderer.java</description>
		<content:encoded><![CDATA[<p>This table header rendering code is great , its something Ive wanted to achieve for quite some time. I actually use Swingx and JXTables so I&#8217;ve made modification to your code so that it works with a JXTable with in built sorting on Java 1.5.</p>
<p>Screenshot: <a href="http://www.jthink.net/jaikoz/jsp/code/jaikozusingmacwidgets.jpg" rel="nofollow">http://www.jthink.net/jaikoz/jsp/code/jaikozusingmacwidgets.jpg</a><br />
Code: <a href="http://www.jthink.net/jaikoz/jsp/code/JaikozColumnHeaderRenderer.java" rel="nofollow">http://www.jthink.net/jaikoz/jsp/code/JaikozColumnHeaderRenderer.java</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://explodingpixels.wordpress.com/2008/05/11/sexy-swing-app-itunes-table-header/#comment-147</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Wed, 27 Aug 2008 12:10:14 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=28#comment-147</guid>
		<description>Glad you got it working. I&#039;ll talk to the Glazed Lists guys about maybe integrating with the JDK 6 sort header rendering (not that that would have helped you).</description>
		<content:encoded><![CDATA[<p>Glad you got it working. I&#8217;ll talk to the Glazed Lists guys about maybe integrating with the JDK 6 sort header rendering (not that that would have helped you).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ishkafel</title>
		<link>http://explodingpixels.wordpress.com/2008/05/11/sexy-swing-app-itunes-table-header/#comment-146</link>
		<dc:creator>ishkafel</dc:creator>
		<pubDate>Wed, 27 Aug 2008 05:48:16 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=28#comment-146</guid>
		<description>thanks...
but I finally able to figure out how to draw sorter arrow with your table header, for some reason my table just need ordinary sorting ability and it&#039;s quite easier to just use jdk6 auto sorter ability...

thanks... nice project and awesome Swing tips... can&#039;t wait for your new tips...</description>
		<content:encoded><![CDATA[<p>thanks&#8230;<br />
but I finally able to figure out how to draw sorter arrow with your table header, for some reason my table just need ordinary sorting ability and it&#8217;s quite easier to just use jdk6 auto sorter ability&#8230;</p>
<p>thanks&#8230; nice project and awesome Swing tips&#8230; can&#8217;t wait for your new tips&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://explodingpixels.wordpress.com/2008/05/11/sexy-swing-app-itunes-table-header/#comment-141</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Wed, 13 Aug 2008 10:43:59 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=28#comment-141</guid>
		<description>I should have pointed out that the table sorting and the sorting arrows were provided by &lt;a href=&quot;http://publicobject.com/glazedlists/&quot; rel=&quot;nofollow&quot;&gt;Glazed Lists&lt;/a&gt;. If your interested in using Glazed Lists sorting capabilities, check out this &lt;a href=&quot;http://publicobject.com/glazedlistsdeveloper/screencasts/sortedlist/SortedListExample.java&quot; rel=&quot;nofollow&quot;&gt;demo code&lt;/a&gt;.

Sorry about the confusion.</description>
		<content:encoded><![CDATA[<p>I should have pointed out that the table sorting and the sorting arrows were provided by <a href="http://publicobject.com/glazedlists/" rel="nofollow">Glazed Lists</a>. If your interested in using Glazed Lists sorting capabilities, check out this <a href="http://publicobject.com/glazedlistsdeveloper/screencasts/sortedlist/SortedListExample.java" rel="nofollow">demo code</a>.</p>
<p>Sorry about the confusion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ishkafel</title>
		<link>http://explodingpixels.wordpress.com/2008/05/11/sexy-swing-app-itunes-table-header/#comment-140</link>
		<dc:creator>ishkafel</dc:creator>
		<pubDate>Wed, 13 Aug 2008 07:13:44 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=28#comment-140</guid>
		<description>Hi i read you post at java-dev mailing list, and i tried to use your header renderer, and do some changes, but i don&#039;t know for some reason the sort arrow never drawn even when i just copy paste your code... does it suppose to happen or just in my case?
Can anybody help me with sorter arrow drawing?

thanks...</description>
		<content:encoded><![CDATA[<p>Hi i read you post at java-dev mailing list, and i tried to use your header renderer, and do some changes, but i don&#8217;t know for some reason the sort arrow never drawn even when i just copy paste your code&#8230; does it suppose to happen or just in my case?<br />
Can anybody help me with sorter arrow drawing?</p>
<p>thanks&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rbs</title>
		<link>http://explodingpixels.wordpress.com/2008/05/11/sexy-swing-app-itunes-table-header/#comment-102</link>
		<dc:creator>rbs</dc:creator>
		<pubDate>Mon, 07 Jul 2008 18:52:24 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=28#comment-102</guid>
		<description>Just to be clear... In my case I have a particular table where sorting is not allowed, nor is column selection. Consequently, I do not want _anything_ to happen if the user clicks on a column heading. And that includes changing the color of the header. The stock default header renderer behaves the way I want, and adding the if-then clauses that i suggest causes ITunesTableHeaderRenderer  to do so also.

As for why that&#039;s the case, it&#039;s actually a tree-table with just a few columns. Sorting is automatic, and row selection is preferred.</description>
		<content:encoded><![CDATA[<p>Just to be clear&#8230; In my case I have a particular table where sorting is not allowed, nor is column selection. Consequently, I do not want _anything_ to happen if the user clicks on a column heading. And that includes changing the color of the header. The stock default header renderer behaves the way I want, and adding the if-then clauses that i suggest causes ITunesTableHeaderRenderer  to do so also.</p>
<p>As for why that&#8217;s the case, it&#8217;s actually a tree-table with just a few columns. Sorting is automatic, and row selection is preferred.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://explodingpixels.wordpress.com/2008/05/11/sexy-swing-app-itunes-table-header/#comment-101</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Sun, 06 Jul 2008 10:48:11 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=28#comment-101</guid>
		<description>Hmmm...I don&#039;t know if you&#039;d want to prevent sorting if columns weren&#039;t allowed to be selected. Column selection relates to selecting all the cells in a column, where as clicking the header indicates that a sort operation should be performed. These seem like two distinct things to me.</description>
		<content:encoded><![CDATA[<p>Hmmm&#8230;I don&#8217;t know if you&#8217;d want to prevent sorting if columns weren&#8217;t allowed to be selected. Column selection relates to selecting all the cells in a column, where as clicking the header indicates that a sort operation should be performed. These seem like two distinct things to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rbs</title>
		<link>http://explodingpixels.wordpress.com/2008/05/11/sexy-swing-app-itunes-table-header/#comment-100</link>
		<dc:creator>rbs</dc:creator>
		<pubDate>Sun, 06 Jul 2008 01:25:18 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=28#comment-100</guid>
		<description>THis is pretty nifty, but you need to alter the mouseClicked and mousePressed methods in HeaderClickHandler to test if column selection is allowed in the table. Otherwise is highlights a clicked column heading even when column selection is turned off.

As is, you have in mouseClicked...

final TableColumnModel columnModel = fTable.getColumnModel();
int viewColumn = columnModel.getColumnIndexAtX(mouseEvent.getX());
fSelectedColumn = fTable.convertColumnIndexToModel(viewColumn);


That would be better as...

final TableColumnModel columnModel = fTable.getColumnModel();
if (columnModel.getColumnSelectionAllowed ( ))
{
  int viewColumn = columnModel.getColumnIndexAtX(mouseEvent.getX());
  fSelectedColumn = fTable.convertColumnIndexToModel(viewColumn);
}</description>
		<content:encoded><![CDATA[<p>THis is pretty nifty, but you need to alter the mouseClicked and mousePressed methods in HeaderClickHandler to test if column selection is allowed in the table. Otherwise is highlights a clicked column heading even when column selection is turned off.</p>
<p>As is, you have in mouseClicked&#8230;</p>
<p>final TableColumnModel columnModel = fTable.getColumnModel();<br />
int viewColumn = columnModel.getColumnIndexAtX(mouseEvent.getX());<br />
fSelectedColumn = fTable.convertColumnIndexToModel(viewColumn);</p>
<p>That would be better as&#8230;</p>
<p>final TableColumnModel columnModel = fTable.getColumnModel();<br />
if (columnModel.getColumnSelectionAllowed ( ))<br />
{<br />
  int viewColumn = columnModel.getColumnIndexAtX(mouseEvent.getX());<br />
  fSelectedColumn = fTable.convertColumnIndexToModel(viewColumn);<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
