<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-2578</id>
	<title>Nabble - GlazedLists - User</title>
	<updated>2009-11-26T01:08:36Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/GlazedLists---User-f2578.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GlazedLists---User-f2578.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26525302</id>
	<title>Re: re: GlazedLists, JTable and sorting</title>
	<published>2009-11-26T01:08:36Z</published>
	<updated>2009-11-26T01:08:36Z</updated>
	<author>
		<name>Endors</name>
	</author>
	<content type="html">thanks, work out great!</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GlazedLists%2C-JTable-and-sorting-tp26315312p26525302.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26523586</id>
	<title>Re: Formatting of list values using AutoCompleteSupport and combo boxes in tables</title>
	<published>2009-11-25T18:35:51Z</published>
	<updated>2009-11-25T18:35:51Z</updated>
	<author>
		<name>Rickard Öberg-3</name>
	</author>
	<content type="html">On 2009-11-26 01.25, James Lemieux wrote:
&lt;br&gt;&amp;gt; Oops,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It looks like there's not a form of createTableCellEditor that takes a
&lt;br&gt;&amp;gt; Format object. That's probably an oversite on our part. As a stop-gap
&lt;br&gt;&amp;gt; for now, you could copy a bit of code out of createTableCellEditor
&lt;br&gt;&amp;gt; (there's not much) and roll it yourself, calling the 4arg install
&lt;br&gt;&amp;gt; method.
&lt;br&gt;&lt;br&gt;Well, I tried that, but it doesn't work since the TableCellComboBox 
&lt;br&gt;class (and friends) are private static to AutoCompleteSupport.
&lt;br&gt;&lt;br&gt;For now I have changed to using strings in my combo-model, and then 
&lt;br&gt;resolve them back to objects when selected. Works, but is a bit hackish. 
&lt;br&gt;The fix with a provided Format seems like the right thing to do.
&lt;br&gt;&lt;br&gt;/Rickard
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26523586&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26523586&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Formatting-of-list-values-using-AutoCompleteSupport-and-combo-boxes-in-tables-tp26516757p26523586.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26516850</id>
	<title>Re: Formatting of list values using AutoCompleteSupport and combo  boxes in tables</title>
	<published>2009-11-25T09:25:03Z</published>
	<updated>2009-11-25T09:25:03Z</updated>
	<author>
		<name>James Lemieux</name>
	</author>
	<content type="html">Oops,
&lt;br&gt;&lt;br&gt;It looks like there's not a form of createTableCellEditor that takes a
&lt;br&gt;Format object. That's probably an oversite on our part. As a stop-gap
&lt;br&gt;for now, you could copy a bit of code out of createTableCellEditor
&lt;br&gt;(there's not much) and roll it yourself, calling the 4arg install
&lt;br&gt;method.
&lt;br&gt;&lt;br&gt;Sorry for the knee-jerk response earlier.
&lt;br&gt;&lt;br&gt;James
&lt;br&gt;&lt;br&gt;On 11/25/09, James Lemieux &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516850&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jplemieux@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Rickard,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You should use this form of AutoCompleteSupport.install, which allows
&lt;br&gt;&amp;gt; you to specify a Format object for converting back and forth between
&lt;br&gt;&amp;gt; Strings:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://publicobject.com/glazedlists/glazedlists-1.7.0/api/ca/odell/glazedlists/swing/AutoCompleteSupport.html#install%28javax.swing.JComboBox,%20ca.odell.glazedlists.EventList,%20ca.odell.glazedlists.TextFilterator,%20java.text.Format%29&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://publicobject.com/glazedlists/glazedlists-1.7.0/api/ca/odell/glazedlists/swing/AutoCompleteSupport.html#install%28javax.swing.JComboBox,%20ca.odell.glazedlists.EventList,%20ca.odell.glazedlists.TextFilterator,%20java.text.Format%29&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; James
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 11/25/09, Rickard Öberg &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516850&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rickardoberg@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I'm trying out the AutoCompleteSupport for combo boxes in JTables.
&lt;br&gt;&amp;gt;&amp;gt; Basically, I want a combo box with auto-complete that will select values
&lt;br&gt;&amp;gt;&amp;gt; from a given list, and when selected the value should be set in the
&lt;br&gt;&amp;gt;&amp;gt; table model. The only gotcha is that the value is not a string, and so I
&lt;br&gt;&amp;gt;&amp;gt; need to provide a converter between my object in the EventList for the
&lt;br&gt;&amp;gt;&amp;gt; combobox and the auto-complete handling.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; There's lots of methods that do similar things in GlazedLists, but I
&lt;br&gt;&amp;gt;&amp;gt; haven't been able to find any for this particular case. I create my
&lt;br&gt;&amp;gt;&amp;gt; combobox like so:
&lt;br&gt;&amp;gt;&amp;gt; AutoCompleteSupport.AutoCompleteCellEditor editor =
&lt;br&gt;&amp;gt;&amp;gt; AutoCompleteSupport.createTableCellEditor(new Comparator()
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;public int compare( Object o1, Object o2 )
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ListItemValue l1 = (ListItemValue) o1;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ListItemValue l2 = (ListItemValue) o2;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String s1 = l1.description().get();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String s2 = l2.description().get();
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return s1.compareTo( s2 );
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt;&amp;gt; }, new TableFormat&amp;lt;ListItemValue&amp;gt;()
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;public int getColumnCount()
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return 1;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;public String getColumnName( int i )
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;&amp;quot;;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;public Object getColumnValue( ListItemValue listItemValue, int i )
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return listItemValue;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt;&amp;gt; }, list, 0);
&lt;br&gt;&amp;gt;&amp;gt; editor.getAutoCompleteSupport().setStrict( true );
&lt;br&gt;&amp;gt;&amp;gt; ---
&lt;br&gt;&amp;gt;&amp;gt; Where &amp;quot;list&amp;quot; is my custom list of ListItemValues. I can then set a
&lt;br&gt;&amp;gt;&amp;gt; custom renderer to handle them in the listing:
&lt;br&gt;&amp;gt;&amp;gt; JComboBox combo = (JComboBox) editor.getComponent();
&lt;br&gt;&amp;gt;&amp;gt; combo.setRenderer( new ListItemListCellRenderer() );
&lt;br&gt;&amp;gt;&amp;gt; ---
&lt;br&gt;&amp;gt;&amp;gt; But this code has great difficulty in converting between string and my
&lt;br&gt;&amp;gt;&amp;gt; own class, so I get ClassCasts all over the place.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; What I'm missing is a way to create an auto-complete combobox for use as
&lt;br&gt;&amp;gt;&amp;gt; table cell editor where I can supply my own Format. If I understand the
&lt;br&gt;&amp;gt;&amp;gt; API correct that would have fixed it. But there's no way for me to
&lt;br&gt;&amp;gt;&amp;gt; supply it!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; There seems to have been so much thought going into the conversion
&lt;br&gt;&amp;gt;&amp;gt; between string and value in non-table cases that I hope I'm just missing
&lt;br&gt;&amp;gt;&amp;gt; something. What is it?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; /Rickard
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516850&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516850&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516850&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516850&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Formatting-of-list-values-using-AutoCompleteSupport-and-combo-boxes-in-tables-tp26516757p26516850.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26516794</id>
	<title>Re: Formatting of list values using AutoCompleteSupport and combo  boxes in tables</title>
	<published>2009-11-25T09:22:24Z</published>
	<updated>2009-11-25T09:22:24Z</updated>
	<author>
		<name>James Lemieux</name>
	</author>
	<content type="html">Rickard,
&lt;br&gt;&lt;br&gt;You should use this form of AutoCompleteSupport.install, which allows
&lt;br&gt;you to specify a Format object for converting back and forth between
&lt;br&gt;Strings:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://publicobject.com/glazedlists/glazedlists-1.7.0/api/ca/odell/glazedlists/swing/AutoCompleteSupport.html#install%28javax.swing.JComboBox,%20ca.odell.glazedlists.EventList,%20ca.odell.glazedlists.TextFilterator,%20java.text.Format%29&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://publicobject.com/glazedlists/glazedlists-1.7.0/api/ca/odell/glazedlists/swing/AutoCompleteSupport.html#install%28javax.swing.JComboBox,%20ca.odell.glazedlists.EventList,%20ca.odell.glazedlists.TextFilterator,%20java.text.Format%29&lt;/a&gt;&lt;br&gt;&lt;br&gt;James
&lt;br&gt;&lt;br&gt;On 11/25/09, Rickard Öberg &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516794&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rickardoberg@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm trying out the AutoCompleteSupport for combo boxes in JTables.
&lt;br&gt;&amp;gt; Basically, I want a combo box with auto-complete that will select values
&lt;br&gt;&amp;gt; from a given list, and when selected the value should be set in the
&lt;br&gt;&amp;gt; table model. The only gotcha is that the value is not a string, and so I
&lt;br&gt;&amp;gt; need to provide a converter between my object in the EventList for the
&lt;br&gt;&amp;gt; combobox and the auto-complete handling.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; There's lots of methods that do similar things in GlazedLists, but I
&lt;br&gt;&amp;gt; haven't been able to find any for this particular case. I create my
&lt;br&gt;&amp;gt; combobox like so:
&lt;br&gt;&amp;gt; AutoCompleteSupport.AutoCompleteCellEditor editor =
&lt;br&gt;&amp;gt; AutoCompleteSupport.createTableCellEditor(new Comparator()
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;public int compare( Object o1, Object o2 )
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ListItemValue l1 = (ListItemValue) o1;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ListItemValue l2 = (ListItemValue) o2;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String s1 = l1.description().get();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String s2 = l2.description().get();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return s1.compareTo( s2 );
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; }, new TableFormat&amp;lt;ListItemValue&amp;gt;()
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;public int getColumnCount()
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return 1;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;public String getColumnName( int i )
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;&amp;quot;;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;public Object getColumnValue( ListItemValue listItemValue, int i )
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return listItemValue;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; }, list, 0);
&lt;br&gt;&amp;gt; editor.getAutoCompleteSupport().setStrict( true );
&lt;br&gt;&amp;gt; ---
&lt;br&gt;&amp;gt; Where &amp;quot;list&amp;quot; is my custom list of ListItemValues. I can then set a
&lt;br&gt;&amp;gt; custom renderer to handle them in the listing:
&lt;br&gt;&amp;gt; JComboBox combo = (JComboBox) editor.getComponent();
&lt;br&gt;&amp;gt; combo.setRenderer( new ListItemListCellRenderer() );
&lt;br&gt;&amp;gt; ---
&lt;br&gt;&amp;gt; But this code has great difficulty in converting between string and my
&lt;br&gt;&amp;gt; own class, so I get ClassCasts all over the place.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; What I'm missing is a way to create an auto-complete combobox for use as
&lt;br&gt;&amp;gt; table cell editor where I can supply my own Format. If I understand the
&lt;br&gt;&amp;gt; API correct that would have fixed it. But there's no way for me to
&lt;br&gt;&amp;gt; supply it!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; There seems to have been so much thought going into the conversion
&lt;br&gt;&amp;gt; between string and value in non-table cases that I hope I'm just missing
&lt;br&gt;&amp;gt; something. What is it?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /Rickard
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516794&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516794&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516794&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516794&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Formatting-of-list-values-using-AutoCompleteSupport-and-combo-boxes-in-tables-tp26516757p26516794.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26516757</id>
	<title>Formatting of list values using AutoCompleteSupport and combo boxes in tables</title>
	<published>2009-11-25T03:47:06Z</published>
	<updated>2009-11-25T03:47:06Z</updated>
	<author>
		<name>Rickard Öberg-3</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I'm trying out the AutoCompleteSupport for combo boxes in JTables. 
&lt;br&gt;Basically, I want a combo box with auto-complete that will select values 
&lt;br&gt;from a given list, and when selected the value should be set in the 
&lt;br&gt;table model. The only gotcha is that the value is not a string, and so I 
&lt;br&gt;need to provide a converter between my object in the EventList for the 
&lt;br&gt;combobox and the auto-complete handling.
&lt;br&gt;&lt;br&gt;There's lots of methods that do similar things in GlazedLists, but I 
&lt;br&gt;haven't been able to find any for this particular case. I create my 
&lt;br&gt;combobox like so:
&lt;br&gt;AutoCompleteSupport.AutoCompleteCellEditor editor = 
&lt;br&gt;AutoCompleteSupport.createTableCellEditor(new Comparator()
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;public int compare( Object o1, Object o2 )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ListItemValue l1 = (ListItemValue) o1;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ListItemValue l2 = (ListItemValue) o2;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String s1 = l1.description().get();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String s2 = l2.description().get();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return s1.compareTo( s2 );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;}, new TableFormat&amp;lt;ListItemValue&amp;gt;()
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;public int getColumnCount()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return 1;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;public String getColumnName( int i )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;public Object getColumnValue( ListItemValue listItemValue, int i )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return listItemValue;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;}, list, 0);
&lt;br&gt;editor.getAutoCompleteSupport().setStrict( true );
&lt;br&gt;---
&lt;br&gt;Where &amp;quot;list&amp;quot; is my custom list of ListItemValues. I can then set a 
&lt;br&gt;custom renderer to handle them in the listing:
&lt;br&gt;JComboBox combo = (JComboBox) editor.getComponent();
&lt;br&gt;combo.setRenderer( new ListItemListCellRenderer() );
&lt;br&gt;---
&lt;br&gt;But this code has great difficulty in converting between string and my 
&lt;br&gt;own class, so I get ClassCasts all over the place.
&lt;br&gt;&lt;br&gt;What I'm missing is a way to create an auto-complete combobox for use as 
&lt;br&gt;table cell editor where I can supply my own Format. If I understand the 
&lt;br&gt;API correct that would have fixed it. But there's no way for me to 
&lt;br&gt;supply it!
&lt;br&gt;&lt;br&gt;There seems to have been so much thought going into the conversion 
&lt;br&gt;between string and value in non-table cases that I hope I'm just missing 
&lt;br&gt;something. What is it?
&lt;br&gt;&lt;br&gt;/Rickard
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516757&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516757&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Formatting-of-list-values-using-AutoCompleteSupport-and-combo-boxes-in-tables-tp26516757p26516757.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26499025</id>
	<title>SWT/JFace TableViewer with GlazedLists</title>
	<published>2009-11-24T09:35:16Z</published>
	<updated>2009-11-24T09:35:16Z</updated>
	<author>
		<name>philk</name>
	</author>
	<content type="html">As seen in this example &lt;a href=&quot;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&lt;/a&gt;&amp;nbsp;you can use GL with JFace Viewers. I wonder if that is an efficient way to use GL? I would like to facilitate the JFace Viewers in my project too, as they are easily extensible with custom drawing and column formatters (especially inside the Eclipse RCP Framework). Any thoughts on that?
&lt;br&gt;&lt;br&gt;I think it might not perform so well speed and memory wise, as the GL filtering would need the viewer to update its internal item state.</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SWT-JFace-TableViewer-with-GlazedLists-tp26499025p26499025.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26458175</id>
	<title>Force re-sort of TableComparatorChooser</title>
	<published>2009-11-21T08:39:59Z</published>
	<updated>2009-11-21T08:39:59Z</updated>
	<author>
		<name>fab|an</name>
	</author>
	<content type="html">Hi, 
&lt;br&gt;&lt;br&gt;&amp;nbsp;I have a SWT-Table which displays me data and I sort it by installing a TableComparatorChooser.
&lt;br&gt;I have viewoptions which changes the way data in the Table is displayed by setting a new TableFormat on the EventTableViewer (I implemented that). TableComparatorChooser still sorts based on the old TableFormat, so I made the protected method &amp;quot;setTableFormat&amp;quot; in AbstractTableComparatorChooser public and called it.
&lt;br&gt;The problem left is, that my columns don't change normally and I want to set the sortingcolumn to the old column. I tried table.setSortColumn but that doesn't work. Has the chooser some ability to set a column?
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Force-re-sort-of-TableComparatorChooser-tp26458175p26458175.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26451237</id>
	<title>Re: EventTableModel.getRowCount always returns 0</title>
	<published>2009-11-20T13:51:24Z</published>
	<updated>2009-11-20T13:51:24Z</updated>
	<author>
		<name>Ted Zlatanov</name>
	</author>
	<content type="html">On Thu, 19 Nov 2009 08:57:50 -0800 (PST) newmanw &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451237&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;newmanw10@...&lt;/a&gt;&amp;gt; wrote: 
&lt;br&gt;&lt;br&gt;n&amp;gt; I want to display the number of rows in my table but no matter how many rows
&lt;br&gt;n&amp;gt; I have in the table the call to getRowCount always returns 0. &amp;nbsp;Am I doing
&lt;br&gt;n&amp;gt; something wrong or is this a bug?
&lt;br&gt;&lt;br&gt;You're doing something wrong, I think. &amp;nbsp;Can you show a minimal example
&lt;br&gt;with source code?
&lt;br&gt;&lt;br&gt;Ted
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451237&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26451237&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/EventTableModel.getRowCount-always-returns-0-tp26421389p26451237.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26433774</id>
	<title>EventTableModel default sort order</title>
	<published>2009-11-19T12:42:52Z</published>
	<updated>2009-11-19T12:42:52Z</updated>
	<author>
		<name>Kevin Day-7</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;


&lt;META name=GENERATOR content=&quot;MSHTML 8.00.6001.18812&quot;&gt;&lt;/HEAD&gt;
&lt;BODY leftMargin=1 rightMargin=1 topMargin=1&gt;&lt;FONT size=2 face=Arial&gt;
&lt;DIV&gt;Just noticed an interesting behavior:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I have a sorted list with a default ordering, attached to a TableComparitorChooser.&amp;nbsp; The comparator for the list constructor does natural ordering on the member in the list element that is displayed in column 0.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I'm using AdvancedTableFormat, and the comparator that I return for column 0 perfroms natural ordering.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The table comparitor chooser is installed with &lt;FONT color=#0000c0 size=2&gt;&lt;FONT color=#0000c0 size=2&gt;MULTIPLE_COLUMN_MOUSE_WITH_UNDO&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I bring up the table, and the list is ordered using natural ordering.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I click on column 0 heading, and the list orders natural ordering ascending&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I click on column 0 again, and the list orders natural ordering descending&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I click on column 0 again, and the list becomes unsorted&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;So it looks like my default ordering isn't being preserved, and I'm not seeing a way to enforce it (I suppose that I could put another sorted list in the pipeline that forces the default sort, but that&amp;nbsp;seems unreasonable).&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Digging into the source, it seems like the issue is in&amp;nbsp;&lt;FONT size=2&gt;AbstractTableComparatorChooser &lt;/FONT&gt;here:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Updates the comparator in use and applies it to the table.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void rebuildComparator() {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; final Comparator&amp;lt;E&amp;gt; rebuiltComparator = sortingState.buildComparator();&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // select the new comparator&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sortedList.getReadWriteLock().writeLock().lock();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sortedListComparator = rebuiltComparator;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sortedList.setComparator(rebuiltComparator);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } finally {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sortedList.getReadWriteLock().writeLock().unlock();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;There should be:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;1.&amp;nbsp; Caching of the original comparator on the list&lt;/DIV&gt;
&lt;DIV&gt;2.&amp;nbsp; A check for if rebuiltComparator == null that sets the original list comparator&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;If this sounds good, I'll put together a patch that does the above - please let me know.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Cheers,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;- K&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/FONT&gt;&lt;/BODY&gt;&lt;/HTML&gt;


---------------------------------------------------------------------
To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26433774&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26433774&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/EventTableModel-default-sort-order-tp26433774p26433774.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26421389</id>
	<title>EventTableModel.getRowCount always returns 0</title>
	<published>2009-11-19T08:57:48Z</published>
	<updated>2009-11-19T08:57:48Z</updated>
	<author>
		<name>newmanw</name>
	</author>
	<content type="html">I want to display the number of rows in my table but no matter how many rows I have in the table the call to getRowCount always returns 0. &amp;nbsp;Am I doing something wrong or is this a bug?</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/EventTableModel.getRowCount-always-returns-0-tp26421389p26421389.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26318879</id>
	<title>re: BasicEventList's ListEvent has no information</title>
	<published>2009-11-12T05:43:17Z</published>
	<updated>2009-11-12T05:43:17Z</updated>
	<author>
		<name>Kevin Day-7</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;


&lt;META name=GENERATOR content=&quot;MSHTML 8.00.6001.18812&quot;&gt;&lt;/HEAD&gt;
&lt;BODY leftMargin=1 rightMargin=1 topMargin=1&gt;&lt;FONT size=2 face=Arial&gt;
&lt;DIV&gt;Not sure if you are still having issues here or not.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;It's possible that the ListEvent is only a valid object in the context of the event itself.&amp;nbsp; If you do your tests inside the listChanged() method, do they still fail?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;- K&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/FONT&gt;
&lt;DIV style=&quot;FONT-FAMILY: Tahoma; FONT-SIZE: x-small&quot;&gt;
&lt;DIV&gt;----------------------- &lt;B&gt;Original Message&lt;/B&gt; -----------------------&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;From:&lt;/B&gt;&amp;nbsp;reibans &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318879&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;esticbo@...&lt;/a&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;To:&lt;/B&gt;&amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318879&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Cc:&lt;/B&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Date:&lt;/B&gt;&amp;nbsp;Tue, 3 Nov 2009 09:37:19 -0800 (PST)&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Subject:&amp;nbsp;&lt;U&gt;BasicEventList's ListEvent has no information&lt;/U&gt;&lt;/B&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;FONT size=2 face=Tahoma&gt;
&lt;DIV&gt;&lt;BR&gt;I want to use glazedlists-1.8.0_java15 in my project and I wrote a little&lt;BR&gt;unit test beforehand to play with the API and get to know how it works. In&lt;BR&gt;the test, I'm using a BasicEventList and I register a mock listener. When I&lt;BR&gt;add one element to the list, the listener is called but the resulting&lt;BR&gt;ListEvent has no info. The test is failing in the first assert because&lt;BR&gt;ListEvent.next() method is returning false. Could somebody tell me what I'm&lt;BR&gt;doing wrong? Here is the test code:&lt;BR&gt;&lt;BR&gt;package checklist;&lt;BR&gt;&lt;BR&gt;import ca.odell.glazedlists.BasicEventList;&lt;BR&gt;import ca.odell.glazedlists.EventList;&lt;BR&gt;import ca.odell.glazedlists.event.ListEvent;&lt;BR&gt;import ca.odell.glazedlists.event.ListEventListener;&lt;BR&gt;import org.junit.Test;&lt;BR&gt;import static org.junit.Assert.*;&lt;BR&gt;&lt;BR&gt;public class BasicEventListTest {&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Test&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void addElement() {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EventList&amp;lt;String&amp;gt; eventList = new BasicEventList&amp;lt;String&amp;gt;();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MockListEventListener&amp;lt;String&amp;gt; listener = new&lt;BR&gt;MockListEventListener&amp;lt;String&amp;gt;();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;eventList.addListEventListener(listener);&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;eventList.add(&quot;hello&quot;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;assertEquals(1, listener.callCount);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;assertTrue(&quot;true expected&quot;, listener.event.next());&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;assertEquals(ListEvent.INSERT, listener.event.getType());&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;assertEquals(0, listener.event.getIndex());&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;private static class MockListEventListener&amp;lt;E&amp;gt; implements&lt;BR&gt;ListEventListener&amp;lt;E&amp;gt; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int callCount;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ListEvent&amp;lt;E&amp;gt; event;&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void listChanged(ListEvent&amp;lt;E&amp;gt; listChanges) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;callCount++;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;event = listChanges;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;Many thanks,&lt;BR&gt;-- &lt;BR&gt;View this message in context: &lt;A href=&quot;http://old.nabble.com/BasicEventList%27s-ListEvent-has-no-information-tp26160593p26160593.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;&lt;FONT color=#0000ff&gt;http://old.nabble.com/BasicEventList%27s-ListEvent-has-no-information-tp26160593p26160593.html&lt;/FONT&gt;&lt;/A&gt;&lt;BR&gt;Sent from the GlazedLists - User mailing list archive at Nabble.com.&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;---------------------------------------------------------------------&lt;BR&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318879&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;&lt;BR&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318879&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;/FONT&gt;&lt;/BODY&gt;&lt;/HTML&gt;


---------------------------------------------------------------------
To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318879&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318879&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/re%3A-BasicEventList%27s-ListEvent-has-no-information-tp26318879p26318879.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26318374</id>
	<title>re: GlazedLists, JTable and sorting</title>
	<published>2009-11-12T05:10:19Z</published>
	<updated>2009-11-12T05:10:19Z</updated>
	<author>
		<name>Kevin Day-7</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;


&lt;META name=GENERATOR content=&quot;MSHTML 8.00.6001.18812&quot;&gt;&lt;/HEAD&gt;
&lt;BODY leftMargin=1 rightMargin=1 topMargin=1&gt;&lt;FONT size=2 face=Arial&gt;
&lt;DIV&gt;Create a FunctionList that transforms the File object into an object with the fields you wish to have.&amp;nbsp; Then build your table format around this intermediate object.&amp;nbsp; This effectively caches your transform so downstream operations (filtering, sorting, etc...) won't result in re-calculation.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;- K&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/FONT&gt;
&lt;DIV style=&quot;FONT-FAMILY: Tahoma; FONT-SIZE: x-small&quot;&gt;
&lt;DIV&gt;----------------------- &lt;B&gt;Original Message&lt;/B&gt; -----------------------&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;From:&lt;/B&gt;&amp;nbsp;Endors &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318374&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;endors84@...&lt;/a&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;To:&lt;/B&gt;&amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318374&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Cc:&lt;/B&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Date:&lt;/B&gt;&amp;nbsp;Thu, 12 Nov 2009 03:17:10 -0800 (PST)&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Subject:&amp;nbsp;&lt;U&gt;GlazedLists, JTable and sorting&lt;/U&gt;&lt;/B&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;FONT size=2 face=Tahoma&gt;
&lt;DIV&gt;&lt;BR&gt;Hello,&lt;BR&gt;&lt;BR&gt;I have currently implemented glazed lists to use with JTable. It works&lt;BR&gt;pretty good except for the sorting of columns. The problem is that i use the&lt;BR&gt;java File object and my tableformat returns different variables from this&lt;BR&gt;object. I have observed that when im sorting the table with GL the method&lt;BR&gt;getColumnValue will run again for each element in the EventList. 2 of my&lt;BR&gt;values getColumnValue returns take som time to process. Is it possible to&lt;BR&gt;only sort on the current data in the JTable?&lt;BR&gt;&lt;BR&gt;Some sample code:&lt;BR&gt;&lt;BR&gt;@Override&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public Object getColumnValue(Object baseObject, int column) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;File file = (File) baseObject;&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;switch (column) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case 0:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return file.getName();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case 1:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String date = FileTools.getLastModifiedDate(file);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return date;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case 2:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String extension = !file.isDirectory() ?&lt;BR&gt;FilenameUtils.getExtension(file.getName()) : &quot;Folder&quot;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return extension;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case 3:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return FileTools.getFileSize(file.length(), fileSizeUnit);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case 4:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return file.getAbsolutePath();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;default:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return null;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;Thanks in advance!&lt;BR&gt;-- &lt;BR&gt;View this message in context: &lt;A href=&quot;http://old.nabble.com/GlazedLists%2C-JTable-and-sorting-tp26315312p26315312.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;&lt;FONT color=#0000ff&gt;http://old.nabble.com/GlazedLists%2C-JTable-and-sorting-tp26315312p26315312.html&lt;/FONT&gt;&lt;/A&gt;&lt;BR&gt;Sent from the GlazedLists - User mailing list archive at Nabble.com.&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;---------------------------------------------------------------------&lt;BR&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318374&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;&lt;BR&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318374&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;/FONT&gt;&lt;/BODY&gt;&lt;/HTML&gt;


---------------------------------------------------------------------
To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318374&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318374&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GlazedLists%2C-JTable-and-sorting-tp26315312p26318374.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26315312</id>
	<title>GlazedLists, JTable and sorting</title>
	<published>2009-11-12T03:17:09Z</published>
	<updated>2009-11-12T03:17:09Z</updated>
	<author>
		<name>Endors</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;I have currently implemented glazed lists to use with JTable. It works pretty good except for the sorting of columns. The problem is that i use the java File object and my tableformat returns different variables from this object. I have observed that when im sorting the table with GL the method getColumnValue will run again for each element in the EventList. 2 of my values getColumnValue returns take som time to process. Is it possible to only sort on the current data in the JTable?
&lt;br&gt;&lt;br&gt;Some sample code:
&lt;br&gt;&lt;br&gt;@Override
&lt;br&gt;&amp;nbsp; &amp;nbsp; public Object getColumnValue(Object baseObject, int column) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; File file = (File) baseObject;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch (column) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case 0:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return file.getName();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case 1:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String date = FileTools.getLastModifiedDate(file);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return date;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case 2:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String extension = !file.isDirectory() ? FilenameUtils.getExtension(file.getName()) : &amp;quot;Folder&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return extension;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case 3:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return FileTools.getFileSize(file.length(), fileSizeUnit);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case 4:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return file.getAbsolutePath();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks in advance!</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GlazedLists%2C-JTable-and-sorting-tp26315312p26315312.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26183469</id>
	<title>BasicEventList's ListEvent has no information</title>
	<published>2009-11-03T09:37:19Z</published>
	<updated>2009-11-03T09:37:19Z</updated>
	<author>
		<name>reibans</name>
	</author>
	<content type="html">&lt;br&gt;I want to use glazedlists-1.8.0_java15 in my project and I wrote a little
&lt;br&gt;unit test beforehand to play with the API and get to know how it works. In
&lt;br&gt;the test, I'm using a BasicEventList and I register a mock listener. When I
&lt;br&gt;add one element to the list, the listener is called but the resulting
&lt;br&gt;ListEvent has no info. The test is failing in the first assert because
&lt;br&gt;ListEvent.next() method is returning false. Could somebody tell me what I'm
&lt;br&gt;doing wrong? Here is the test code:
&lt;br&gt;&lt;br&gt;package checklist;
&lt;br&gt;&lt;br&gt;import ca.odell.glazedlists.BasicEventList;
&lt;br&gt;import ca.odell.glazedlists.EventList;
&lt;br&gt;import ca.odell.glazedlists.event.ListEvent;
&lt;br&gt;import ca.odell.glazedlists.event.ListEventListener;
&lt;br&gt;import org.junit.Test;
&lt;br&gt;import static org.junit.Assert.*;
&lt;br&gt;&lt;br&gt;public class BasicEventListTest {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; @Test
&lt;br&gt;&amp;nbsp; &amp;nbsp; public void addElement() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EventList&amp;lt;String&amp;gt; eventList = new BasicEventList&amp;lt;String&amp;gt;();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MockListEventListener&amp;lt;String&amp;gt; listener = new
&lt;br&gt;MockListEventListener&amp;lt;String&amp;gt;();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; eventList.addListEventListener(listener);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; eventList.add(&amp;quot;hello&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(1, listener.callCount);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertTrue(&amp;quot;true expected&amp;quot;, listener.event.next());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(ListEvent.INSERT, listener.event.getType());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(0, listener.event.getIndex());
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; private static class MockListEventListener&amp;lt;E&amp;gt; implements
&lt;br&gt;ListEventListener&amp;lt;E&amp;gt; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int callCount;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ListEvent&amp;lt;E&amp;gt; event;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void listChanged(ListEvent&amp;lt;E&amp;gt; listChanges) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; callCount++;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; event = listChanges;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;Many thanks,
&lt;br&gt;-- 
&lt;br&gt;View this message in context: &lt;a href=&quot;http://old.nabble.com/BasicEventList%27s-ListEvent-has-no-information-tp26160593p26160593.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/BasicEventList%27s-ListEvent-has-no-information-tp26160593p26160593.html&lt;/a&gt;&lt;br&gt;Sent from the GlazedLists - User mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26183469&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26183469&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/BasicEventList%27s-ListEvent-has-no-information-tp26183469p26183469.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26183452</id>
	<title>BasicEventList's ListEvent has no information</title>
	<published>2009-11-03T09:36:30Z</published>
	<updated>2009-11-03T09:36:30Z</updated>
	<author>
		<name>reibans</name>
	</author>
	<content type="html">&lt;br&gt;I want to use glazedlists-1.8.0_java15 in my project and I wrote a little
&lt;br&gt;unit test beforehand to play with the API and get to know how it works. In
&lt;br&gt;the test, I'm using a BasicEventList and I register a mock listener. When I
&lt;br&gt;add one element to the list, the listener is called but the resulting
&lt;br&gt;ListEvent has no info. The test is failing in the first assert because
&lt;br&gt;ListEvent.next() method is returning false. Could somebody tell me what I'm
&lt;br&gt;doing wrong? Here is the test code:
&lt;br&gt;&lt;br&gt;package checklist;
&lt;br&gt;&lt;br&gt;import ca.odell.glazedlists.BasicEventList;
&lt;br&gt;import ca.odell.glazedlists.EventList;
&lt;br&gt;import ca.odell.glazedlists.event.ListEvent;
&lt;br&gt;import ca.odell.glazedlists.event.ListEventListener;
&lt;br&gt;import org.junit.Test;
&lt;br&gt;import static org.junit.Assert.*;
&lt;br&gt;&lt;br&gt;public class BasicEventListTest {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; @Test
&lt;br&gt;&amp;nbsp; &amp;nbsp; public void addElement() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EventList&amp;lt;String&amp;gt; eventList = new BasicEventList&amp;lt;String&amp;gt;();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MockListEventListener&amp;lt;String&amp;gt; listener = new
&lt;br&gt;MockListEventListener&amp;lt;String&amp;gt;();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; eventList.addListEventListener(listener);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; eventList.add(&amp;quot;hello&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(1, listener.callCount);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertTrue(&amp;quot;true expected&amp;quot;, listener.event.next());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(ListEvent.INSERT, listener.event.getType());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(0, listener.event.getIndex());
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; private static class MockListEventListener&amp;lt;E&amp;gt; implements
&lt;br&gt;ListEventListener&amp;lt;E&amp;gt; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int callCount;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ListEvent&amp;lt;E&amp;gt; event;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void listChanged(ListEvent&amp;lt;E&amp;gt; listChanges) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; callCount++;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; event = listChanges;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;Many thanks,
&lt;br&gt;-- 
&lt;br&gt;View this message in context: &lt;a href=&quot;http://old.nabble.com/BasicEventList%27s-ListEvent-has-no-information-tp26160591p26160591.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/BasicEventList%27s-ListEvent-has-no-information-tp26160591p26160591.html&lt;/a&gt;&lt;br&gt;Sent from the GlazedLists - User mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26183452&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26183452&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/BasicEventList%27s-ListEvent-has-no-information-tp26183452p26183452.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26160208</id>
	<title>Re: Request for an SWT Glazedlists &quot;gentil&quot; tutorial</title>
	<published>2009-11-03T07:44:07Z</published>
	<updated>2009-11-03T07:44:07Z</updated>
	<author>
		<name>Oceanys</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;Thanks a lot for your valuable help.
&lt;br&gt;I'm really happy to find this source code because it's useful for my work.
&lt;br&gt;All my best regards and good luck.
&lt;br&gt;God bless.
&lt;br&gt;&lt;quote author=&quot;fab|an&quot;&gt;&lt;br&gt;Ok, here's a running example.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://github.com/fab1an/gl-addons/blob/master/src/at/busta/glazedlists/test/swt/EventTableViewerDemo.java&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/fab1an/gl-addons/blob/master/src/at/busta/glazedlists/test/swt/EventTableViewerDemo.java&lt;/a&gt;&lt;br&gt;&lt;br&gt;you can checkout the whole repo or just this file to build it.
&lt;br&gt;&lt;br&gt;It shows:
&lt;br&gt;* population of Table via a background thread
&lt;br&gt;* locking which is needed in this case
&lt;br&gt;* &amp;quot;filtering via Buttons&amp;quot;
&lt;br&gt;* filtering by a Text-input
&lt;br&gt;* sorting of the table
&lt;br&gt;* selection
&lt;br&gt;&lt;br&gt;HTH
&lt;br&gt;fabian
&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;Oceanys&quot;&gt;&lt;br&gt;Hi,
&lt;br&gt;Thank you for the replay, but the example is still incomplete (for me as a beginner in the GlazedList API).
&lt;br&gt;All that I need is a clear snippet where an SWT table is created and populated and then the sort and filter feature is added.
&lt;br&gt;Thanks in advance and good luck.
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;fab|an wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi,
&lt;br&gt;&lt;br&gt;&amp;nbsp;here's something I quickly copy'n'pasted together: &lt;a href=&quot;http://gist.github.com/224365&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gist.github.com/224365&lt;/a&gt;&lt;br&gt;&lt;br&gt;HTH
&lt;br&gt;fabian
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Oceanys wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;Hi, I'm new to the good GlazedLists API and I'm using SWT tables.
&lt;br&gt;&lt;br&gt;I was happy when I found the GlazedLists API. I have a problem with SWT GlazedLists integration because the majority of the available tutorials are written for Swing or for other SWT widgets (I mean the pixel example in the link 
&lt;br&gt;&lt;a href=&quot;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&lt;/a&gt;).
&lt;br&gt;&lt;br&gt;Is anyone have a simple source code or snippet to start with a simple SWT table and Glazed lists in order to show how we can sort and filter it.
&lt;br&gt;Thanks in advance and cordially.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Request-for-an-SWT-Glazedlists-%22gentil%22-tutorial-tp26157774p26160208.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26160203</id>
	<title>Re: Request for an SWT Glazedlists &quot;gentil&quot; tutorial</title>
	<published>2009-11-03T07:41:49Z</published>
	<updated>2009-11-03T07:41:49Z</updated>
	<author>
		<name>Oceanys</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;Thanks a lot for your valuable help.
&lt;br&gt;I'm really happy to find this source code because it's useful for my work.
&lt;br&gt;All my best regards and good luck.
&lt;br&gt;God bless.
&lt;br&gt;&lt;quote author=&quot;fab|an&quot;&gt;&lt;br&gt;Ok, here's a running example.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://github.com/fab1an/gl-addons/blob/master/src/at/busta/glazedlists/test/swt/EventTableViewerDemo.java&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/fab1an/gl-addons/blob/master/src/at/busta/glazedlists/test/swt/EventTableViewerDemo.java&lt;/a&gt;&lt;br&gt;&lt;br&gt;you can checkout the whole repo or just this file to build it.
&lt;br&gt;&lt;br&gt;It shows:
&lt;br&gt;* population of Table via a background thread
&lt;br&gt;* locking which is needed in this case
&lt;br&gt;* &amp;quot;filtering via Buttons&amp;quot;
&lt;br&gt;* filtering by a Text-input
&lt;br&gt;* sorting of the table
&lt;br&gt;* selection
&lt;br&gt;&lt;br&gt;HTH
&lt;br&gt;fabian
&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;Oceanys&quot;&gt;&lt;br&gt;Hi,
&lt;br&gt;Thank you for the replay, but the example is still incomplete (for me as a beginner in the GlazedList API).
&lt;br&gt;All that I need is a clear snippet where an SWT table is created and populated and then the sort and filter feature is added.
&lt;br&gt;Thanks in advance and good luck.
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;fab|an wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi,
&lt;br&gt;&lt;br&gt;&amp;nbsp;here's something I quickly copy'n'pasted together: &lt;a href=&quot;http://gist.github.com/224365&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gist.github.com/224365&lt;/a&gt;&lt;br&gt;&lt;br&gt;HTH
&lt;br&gt;fabian
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Oceanys wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;Hi, I'm new to the good GlazedLists API and I'm using SWT tables.
&lt;br&gt;&lt;br&gt;I was happy when I found the GlazedLists API. I have a problem with SWT GlazedLists integration because the majority of the available tutorials are written for Swing or for other SWT widgets (I mean the pixel example in the link 
&lt;br&gt;&lt;a href=&quot;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&lt;/a&gt;).
&lt;br&gt;&lt;br&gt;Is anyone have a simple source code or snippet to start with a simple SWT table and Glazed lists in order to show how we can sort and filter it.
&lt;br&gt;Thanks in advance and cordially.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Request-for-an-SWT-Glazedlists-%22gentil%22-tutorial-tp26157774p26160203.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26160150</id>
	<title>Re: Request for an SWT Glazedlists &quot;gentil&quot; tutorial</title>
	<published>2009-11-03T06:13:37Z</published>
	<updated>2009-11-03T06:13:37Z</updated>
	<author>
		<name>fab|an</name>
	</author>
	<content type="html">Ok, here's a running example.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://github.com/fab1an/gl-addons/blob/master/src/at/busta/glazedlists/test/swt/EventTableViewerDemo.java&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/fab1an/gl-addons/blob/master/src/at/busta/glazedlists/test/swt/EventTableViewerDemo.java&lt;/a&gt;&lt;br&gt;&lt;br&gt;you can checkout the whole repo or just this file to build it.
&lt;br&gt;&lt;br&gt;It shows:
&lt;br&gt;* population of Table via a background thread
&lt;br&gt;* locking which is needed in this case
&lt;br&gt;* &amp;quot;filtering via Buttons&amp;quot;
&lt;br&gt;* filtering by a Text-input
&lt;br&gt;* sorting of the table
&lt;br&gt;* selection
&lt;br&gt;&lt;br&gt;HTH
&lt;br&gt;fabian
&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;Oceanys&quot;&gt;&lt;br&gt;Hi,
&lt;br&gt;Thank you for the replay, but the example is still incomplete (for me as a beginner in the GlazedList API).
&lt;br&gt;All that I need is a clear snippet where an SWT table is created and populated and then the sort and filter feature is added.
&lt;br&gt;Thanks in advance and good luck.
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;fab|an wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi,
&lt;br&gt;&lt;br&gt;&amp;nbsp;here's something I quickly copy'n'pasted together: &lt;a href=&quot;http://gist.github.com/224365&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gist.github.com/224365&lt;/a&gt;&lt;br&gt;&lt;br&gt;HTH
&lt;br&gt;fabian
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Oceanys wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;Hi, I'm new to the good GlazedLists API and I'm using SWT tables.
&lt;br&gt;&lt;br&gt;I was happy when I found the GlazedLists API. I have a problem with SWT GlazedLists integration because the majority of the available tutorials are written for Swing or for other SWT widgets (I mean the pixel example in the link 
&lt;br&gt;&lt;a href=&quot;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&lt;/a&gt;).
&lt;br&gt;&lt;br&gt;Is anyone have a simple source code or snippet to start with a simple SWT table and Glazed lists in order to show how we can sort and filter it.
&lt;br&gt;Thanks in advance and cordially.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Request-for-an-SWT-Glazedlists-%22gentil%22-tutorial-tp26157774p26160150.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26160022</id>
	<title>Re: Request for an SWT Glazedlists &quot;gentil&quot; tutorial</title>
	<published>2009-11-03T00:13:37Z</published>
	<updated>2009-11-03T00:13:37Z</updated>
	<author>
		<name>Oceanys</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;Thank you for the replay, but the example is still incomplete (for me as a beginner in the GlazedList API).
&lt;br&gt;All that I need is a clear snippet where an SWT table is created and populated and then the sort and filter feature is added.
&lt;br&gt;Thanks in advance and good luck.
&lt;br&gt;&lt;quote author=&quot;fab|an&quot;&gt;&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;&amp;nbsp;here's something I quickly copy'n'pasted together: &lt;a href=&quot;http://gist.github.com/224365&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gist.github.com/224365&lt;/a&gt;&lt;br&gt;&lt;br&gt;HTH
&lt;br&gt;fabian
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Oceanys wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;Hi, I'm new to the good GlazedLists API and I'm using SWT tables.
&lt;br&gt;&lt;br&gt;I was happy when I found the GlazedLists API. I have a problem with SWT GlazedLists integration because the majority of the available tutorials are written for Swing or for other SWT widgets (I mean the pixel example in the link 
&lt;br&gt;&lt;a href=&quot;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&lt;/a&gt;).
&lt;br&gt;&lt;br&gt;Is anyone have a simple source code or snippet to start with a simple SWT table and Glazed lists in order to show how we can sort and filter it.
&lt;br&gt;Thanks in advance and cordially.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Request-for-an-SWT-Glazedlists-%22gentil%22-tutorial-tp26157774p26160022.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26160021</id>
	<title>Re: Request for an SWT Glazedlists &quot;gentil&quot; tutorial</title>
	<published>2009-11-03T00:08:03Z</published>
	<updated>2009-11-03T00:08:03Z</updated>
	<author>
		<name>Oceanys</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;Thank you for the replay, but the example is still incomplete (for me as a beginner in the GlazedList API).
&lt;br&gt;All that I need is a clear snippet where an SWT table is created and populated and then the sort and filter feature is added.
&lt;br&gt;Thanks in advance and good luck.
&lt;br&gt;&lt;quote author=&quot;fab|an&quot;&gt;&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;&amp;nbsp;here's something I quickly copy'n'pasted together: &lt;a href=&quot;http://gist.github.com/224365&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gist.github.com/224365&lt;/a&gt;&lt;br&gt;&lt;br&gt;HTH
&lt;br&gt;fabian
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Oceanys wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;Hi, I'm new to the good GlazedLists API and I'm using SWT tables.
&lt;br&gt;&lt;br&gt;I was happy when I found the GlazedLists API. I have a problem with SWT GlazedLists integration because the majority of the available tutorials are written for Swing or for other SWT widgets (I mean the pixel example in the link 
&lt;br&gt;&lt;a href=&quot;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&lt;/a&gt;).
&lt;br&gt;&lt;br&gt;Is anyone have a simple source code or snippet to start with a simple SWT table and Glazed lists in order to show how we can sort and filter it.
&lt;br&gt;Thanks in advance and cordially.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Request-for-an-SWT-Glazedlists-%22gentil%22-tutorial-tp26157774p26160021.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26157789</id>
	<title>Re: Request for an SWT Glazedlists &quot;gentil&quot; tutorial</title>
	<published>2009-11-02T11:21:04Z</published>
	<updated>2009-11-02T11:21:04Z</updated>
	<author>
		<name>fab|an</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;&amp;nbsp;here's something I quickly copy'n'pasted together: &lt;a href=&quot;http://gist.github.com/224365&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gist.github.com/224365&lt;/a&gt;&lt;br&gt;&lt;br&gt;HTH
&lt;br&gt;fabian
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Oceanys wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;Hi, I'm new to the good GlazedLists API and I'm using SWT tables.
&lt;br&gt;&lt;br&gt;I was happy when I found the GlazedLists API. I have a problem with SWT GlazedLists integration because the majority of the available tutorials are written for Swing or for other SWT widgets (I mean the pixel example in the link 
&lt;br&gt;&lt;a href=&quot;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&lt;/a&gt;).
&lt;br&gt;&lt;br&gt;Is anyone have a simple source code or snippet to start with a simple SWT table and Glazed lists in order to show how we can sort and filter it.
&lt;br&gt;Thanks in advance and cordially.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Request-for-an-SWT-Glazedlists-%22gentil%22-tutorial-tp26157774p26157789.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26157774</id>
	<title>Request for an SWT Glazedlists &quot;gentil&quot; tutorial</title>
	<published>2009-11-02T10:54:33Z</published>
	<updated>2009-11-02T10:54:33Z</updated>
	<author>
		<name>Oceanys</name>
	</author>
	<content type="html">Hi, I'm new to the good GlazedLists API and I'm using SWT tables.
&lt;br&gt;&lt;br&gt;I was happy when I found the GlazedLists API. I have a problem with SWT GlazedLists integration because the majority of the available tutorials are written for Swing or for other SWT widgets (I mean the pixel example in the link 
&lt;br&gt;&lt;a href=&quot;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hexapixel.com/2009/01/02/glazed-lists-swt-tables-true&lt;/a&gt;).
&lt;br&gt;&lt;br&gt;Is anyone have a simple source code or snippet to start with a simple SWT table and Glazed lists in order to show how we can sort and filter it.
&lt;br&gt;Thanks in advance and cordially.</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Request-for-an-SWT-Glazedlists-%22gentil%22-tutorial-tp26157774p26157774.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26134792</id>
	<title>GoogleWave invitation</title>
	<published>2009-10-30T11:19:27Z</published>
	<updated>2009-10-30T11:19:27Z</updated>
	<author>
		<name>fab|an</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;&amp;nbsp;sorry if you consider this mail spam, but has anyone access to GW yet? I'm interested but didn't get an invitation.
&lt;br&gt;&lt;br&gt;fabian</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GoogleWave-invitation-tp26134792p26134792.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25952989</id>
	<title>re[3]: SequenceList</title>
	<published>2009-10-18T20:46:43Z</published>
	<updated>2009-10-18T20:46:43Z</updated>
	<author>
		<name>Kevin Day-7</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;


&lt;META name=GENERATOR content=&quot;MSHTML 8.00.6001.18812&quot;&gt;&lt;/HEAD&gt;
&lt;BODY leftMargin=1 rightMargin=1 topMargin=1&gt;&lt;FONT size=2 face=Arial&gt;
&lt;DIV&gt;The use case here is fairly common (we do something similar frequently)&amp;nbsp;- but I think the suggested solution is sufficient for the bulk of cases.&amp;nbsp; It would be *much* more useful to have access to the deleted element in delete events (this would allow effective caching of computed values).&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;- K&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/FONT&gt;
&lt;DIV style=&quot;FONT-FAMILY: Tahoma; FONT-SIZE: x-small&quot;&gt;
&lt;DIV&gt;----------------------- &lt;B&gt;Original Message&lt;/B&gt; -----------------------&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;From:&lt;/B&gt;&amp;nbsp;cocoa &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25952989&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cocoa@...&lt;/a&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;To:&lt;/B&gt;&amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25952989&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Cc:&lt;/B&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Date:&lt;/B&gt;&amp;nbsp;Mon, 12 Oct 2009 13:47:10 -0700 (PDT)&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Subject:&amp;nbsp;&lt;U&gt;Re: re: SequenceList&lt;/U&gt;&lt;/B&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;FONT size=2 face=Tahoma&gt;
&lt;DIV&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&amp;gt; The SequenceList problem you mention is a legit bug in my opinion. Would&lt;BR&gt;&amp;gt; you mind filing a bug in our bugtracker?&lt;BR&gt;&amp;gt; &lt;BR&gt;&lt;BR&gt;I've filed a bug, see &lt;BR&gt;&lt;A href=&quot;https://glazedlists.dev.java.net/issues/show_bug.cgi?id=482&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;&lt;FONT color=#0000ff&gt;https://glazedlists.dev.java.net/issues/show_bug.cgi?id=482&lt;/FONT&gt;&lt;/A&gt;&lt;BR&gt;&lt;A href=&quot;https://glazedlists.dev.java.net/issues/show_bug.cgi?id=482&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;&lt;FONT color=#0000ff&gt;https://glazedlists.dev.java.net/issues/show_bug.cgi?id=482&lt;/FONT&gt;&lt;/A&gt; . A bug&lt;BR&gt;attachment contains a failing unit test.&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&amp;gt; As for the approach to your problem (inserting sequence placeholders into&lt;BR&gt;&amp;gt; a list), that's something that isn't trivial to do with our existing&lt;BR&gt;&amp;gt; transformations. If I was in your shoes, I'd consider extending&lt;BR&gt;&amp;gt; TransformedList and implementing that transformation myself from the&lt;BR&gt;&amp;gt; ground up. It actually shouldn't be that hard to implement, overall.&lt;BR&gt;&amp;gt; &lt;BR&gt;&lt;BR&gt;Implementing my own TransformedList seems daunting :S. I've had a quick look&lt;BR&gt;at some TransformedList implementations. The current solution with the&lt;BR&gt;CompositeList seems to work so far. As long as it works I abstain from&lt;BR&gt;implementing any TransformedList ;). Unless somebody is willing to help me&lt;BR&gt;get up to speed with all those internal details of glazed lists.&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&amp;gt; We probably could dream up some type of transformation in the core that,&lt;BR&gt;&amp;gt; given two adjacent items in the source EventList, delegated to a Sequencer&lt;BR&gt;&amp;gt; type of object that filled in the gaps... I'm unsure of how useful that is&lt;BR&gt;&amp;gt; to our general audience.&lt;BR&gt;&amp;gt; &lt;BR&gt;&lt;BR&gt;My use case is to generate a report that shows the total time (or distance)&lt;BR&gt;of activities grouped by a time period (e.g. week, month, ...). Obviously,&lt;BR&gt;it is possible that some period does not contain any activity. So, the&lt;BR&gt;bucket is missing in the GroupingList, which is not acceptable. The missing&lt;BR&gt;bucket is important information by itself (i.e. the user did not perform any&lt;BR&gt;sport activity).&lt;BR&gt;-- &lt;BR&gt;View this message in context: &lt;A href=&quot;http://www.nabble.com/SequenceList-tp25838609p25862874.html&quot; target=&quot;_top&quot;&gt;&lt;FONT color=#0000ff&gt;http://www.nabble.com/SequenceList-tp25838609p25862874.html&lt;/FONT&gt;&lt;/A&gt;&lt;BR&gt;Sent from the GlazedLists - User mailing list archive at Nabble.com.&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;---------------------------------------------------------------------&lt;BR&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25952989&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;&lt;BR&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25952989&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;/FONT&gt;&lt;/BODY&gt;&lt;/HTML&gt;


---------------------------------------------------------------------
To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25952989&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25952989&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SequenceList-tp25838609p25952989.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25875817</id>
	<title>TreeList help</title>
	<published>2009-10-13T02:49:13Z</published>
	<updated>2009-10-13T02:49:13Z</updated>
	<author>
		<name>GalSav</name>
	</author>
	<content type="html">&lt;div dir=&quot;ltr&quot;&gt;&lt;div&gt;Hi to all,&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;I&amp;#39;m using TreeList with JTree. &lt;/div&gt;
&lt;div&gt;Its seems like there is no support for  ExpansionModel in JTree.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;my questions are&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt; 1) Am i right? &lt;/div&gt;
&lt;div&gt; 2) What UI componet has a support for this feature? (maybe TreeTable)&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;thanks, &lt;/div&gt;
&lt;div&gt;Gal.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/TreeList-help-tp25875817p25875817.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25862874</id>
	<title>Re: re: SequenceList</title>
	<published>2009-10-12T13:47:08Z</published>
	<updated>2009-10-12T13:47:08Z</updated>
	<author>
		<name>cocoa</name>
	</author>
	<content type="html">&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-message&quot;&gt;The SequenceList problem you mention is a legit bug in my opinion. Would you mind filing a bug in our bugtracker?
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
I've filed a bug, see &lt;a href=&quot;https://glazedlists.dev.java.net/issues/show_bug.cgi?id=482&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://glazedlists.dev.java.net/issues/show_bug.cgi?id=482&lt;/a&gt;. A bug attachment contains a failing unit test.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-message&quot;&gt;As for the approach to your problem (inserting sequence placeholders into a list), that's something that isn't trivial to do with our existing transformations. If I was in your shoes, I'd consider extending TransformedList and implementing that transformation myself from the ground up. It actually shouldn't be that hard to implement, overall.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
Implementing my own TransformedList seems daunting :S. I've had a quick look at some TransformedList implementations. The current solution with the CompositeList seems to work so far. As long as it works I abstain from implementing any TransformedList ;). Unless somebody is willing to help me get up to speed with all those internal details of glazed lists.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-message&quot;&gt;We probably could dream up some type of transformation in the core that, given two adjacent items in the source EventList, delegated to a Sequencer type of object that filled in the gaps... I'm unsure of how useful that is to our general audience.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
My use case is to generate a report that shows the total time (or distance) of activities grouped by a time period (e.g. week, month, ...). Obviously, it is possible that some period does not contain any activity. So, the bucket is missing in the GroupingList, which is not acceptable. The missing bucket is important information by itself (i.e. the user did not perform any sport activity).</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SequenceList-tp25838609p25862874.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25858893</id>
	<title>Re: re: SequenceList</title>
	<published>2009-10-12T09:29:28Z</published>
	<updated>2009-10-12T09:29:28Z</updated>
	<author>
		<name>James Lemieux</name>
	</author>
	<content type="html">Simon,&lt;br&gt;&lt;br&gt;The SequenceList problem you mention is a legit bug in my opinion. Would you mind filing a bug in our bugtracker?&lt;br&gt;&lt;br&gt;As for the approach to your problem (inserting sequence placeholders into a list), that&amp;#39;s something that isn&amp;#39;t trivial to do with our existing transformations. If I was in your shoes, I&amp;#39;d consider extending TransformedList and implementing that transformation myself from the ground up. It actually shouldn&amp;#39;t be that hard to implement, overall.&lt;br&gt;
&lt;br&gt;We probably could dream up some type of transformation in the core that, given two adjacent items in the source EventList, delegated to a Sequencer type of object that filled in the gaps... I&amp;#39;m unsure of how useful that is to our general audience.&lt;br&gt;
&lt;br&gt;Good Luck,&lt;br&gt;&lt;br&gt;James&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Sun, Oct 11, 2009 at 3:02 PM, cocoa &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25858893&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cocoa@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;br&gt;
I soon saw that my initial approach does not work. The map, as you mentioned,&lt;br&gt;
is not updated so the approach is broken. Next I&amp;#39;ve tried the proposed&lt;br&gt;
approach using a CompositeList.&lt;br&gt;
&lt;br&gt;
The first list is a SequenceList that produces PlaceholderActivity objects&lt;br&gt;
with a Sequencer. However, I&amp;#39;ve run into an issue with the SequenceList. It&lt;br&gt;
adds the source Activity objects to the SequenceList (not the placeholder&lt;br&gt;
activity objects). This results in incorrect duration totals (i.e. the first&lt;br&gt;
one is twice as large as it should be). So I&amp;#39;ve added a&lt;br&gt;
FunctionList&amp;lt;Activity, PlaceholderActivity&amp;gt; to the source list. That way, I&lt;br&gt;
get the expected sequence lists consisting only of PlaceholderActivity.&lt;br&gt;
&lt;br&gt;
The CompositeList stuff works as advertised. I get the missing buckets with&lt;br&gt;
a 0 total duration.&lt;br&gt;
&lt;br&gt;
Simon&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
PS: I&amp;#39;m not groking why the first value of the SequenceList is duplicated.&lt;br&gt;
It does not hurt in my case, because placeholder activities are not used for&lt;br&gt;
the calculations. Below is a simple snipped that shows what I mean:&lt;br&gt;
&lt;br&gt;
EventList&amp;lt;Integer&amp;gt; src = new BasicEventList&amp;lt;Integer&amp;gt;();&lt;br&gt;
src.add(1);&lt;br&gt;
src.add(3);&lt;br&gt;
&lt;br&gt;
SequenceList&amp;lt;Integer&amp;gt; integers = new SequenceList&amp;lt;Integer&amp;gt;(src, new&lt;br&gt;
Sequencer&amp;lt;Integer&amp;gt;() {&lt;br&gt;
        public Integer next(Integer value) {&lt;br&gt;
                return value + 1;&lt;br&gt;
        }&lt;br&gt;
        public Integer previous(Integer value) {&lt;br&gt;
                return value - 1;&lt;br&gt;
        }&lt;br&gt;
});&lt;br&gt;
&lt;br&gt;
for (Integer value : integers) {&lt;br&gt;
        System.out.println(value);&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
Output is :&lt;br&gt;
1&lt;br&gt;
1&lt;br&gt;
2&lt;br&gt;
3&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;
--&lt;br&gt;
View this message in context: &lt;a href=&quot;http://www.nabble.com/SequenceList-tp25838609p25848064.html&quot; target=&quot;_blank&quot;&gt;http://www.nabble.com/SequenceList-tp25838609p25848064.html&lt;/a&gt;&lt;br&gt;
&lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;Sent from the GlazedLists - User mailing list archive at Nabble.com.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25858893&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;&lt;br&gt;
For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25858893&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SequenceList-tp25838609p25858893.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25848064</id>
	<title>Re: re: SequenceList</title>
	<published>2009-10-11T15:01:59Z</published>
	<updated>2009-10-11T15:01:59Z</updated>
	<author>
		<name>cocoa</name>
	</author>
	<content type="html">I soon saw that my initial approach does not work. The map, as you mentioned, is not updated so the approach is broken. Next I've tried the proposed approach using a CompositeList. 
&lt;br&gt;&lt;br&gt;The first list is a SequenceList that produces PlaceholderActivity objects with a Sequencer. However, I've run into an issue with the SequenceList. It adds the source Activity objects to the SequenceList (not the placeholder activity objects). This results in incorrect duration totals (i.e. the first one is twice as large as it should be). So I've added a FunctionList&amp;lt;Activity, PlaceholderActivity&amp;gt; to the source list. That way, I get the expected sequence lists consisting only of PlaceholderActivity. 
&lt;br&gt;&lt;br&gt;The CompositeList stuff works as advertised. I get the missing buckets with a 0 total duration.
&lt;br&gt;&lt;br&gt;Simon
&lt;br&gt;&lt;br&gt;&lt;br&gt;PS: I'm not groking why the first value of the SequenceList is duplicated. It does not hurt in my case, because placeholder activities are not used for the calculations. Below is a simple snipped that shows what I mean:
&lt;br&gt;&lt;br&gt;EventList&amp;lt;Integer&amp;gt; src = new BasicEventList&amp;lt;Integer&amp;gt;();
&lt;br&gt;src.add(1);
&lt;br&gt;src.add(3);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;SequenceList&amp;lt;Integer&amp;gt; integers = new SequenceList&amp;lt;Integer&amp;gt;(src, new Sequencer&amp;lt;Integer&amp;gt;() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Integer next(Integer value) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return value + 1;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Integer previous(Integer value) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return value - 1;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;});
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;for (Integer value : integers) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(value);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Output is : 
&lt;br&gt;1
&lt;br&gt;1
&lt;br&gt;2
&lt;br&gt;3
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SequenceList-tp25838609p25848064.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25840628</id>
	<title>re: SequenceList</title>
	<published>2009-10-10T21:08:50Z</published>
	<updated>2009-10-10T21:08:50Z</updated>
	<author>
		<name>Kevin Day-7</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;


&lt;META name=GENERATOR content=&quot;MSHTML 8.00.6001.18812&quot;&gt;&lt;/HEAD&gt;
&lt;BODY leftMargin=1 rightMargin=1 topMargin=1&gt;&lt;FONT size=2 face=Arial&gt;
&lt;DIV&gt;I think you may run into some problems with this approach - the map is not a live map.&amp;nbsp; Be sure to test the following scenario:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;1.&amp;nbsp; Initial condition is a setup that is missing data in week3&lt;/DIV&gt;
&lt;DIV&gt;2.&amp;nbsp; Add an element for week 3 - did the summary get re-constructed?&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Repeat, but instead of adding an element for week 3, change an existing element so that it now resides in week 3.&amp;nbsp; Same test.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;There is a lot of nastiness with event publication and dependant listeners that you have to deal with when you introduce a map that is driving another list's behavior.&amp;nbsp; It *can* be done, but the opportunity for error and odd little corner cases (that are really hard to debug) is very high.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Another approach to this problem that doesn't use maps would be to construct a list of dummy PlaceHolderActivity objects - these will not get added to your totals if they appear in a list that a summary operates against.&amp;nbsp; Create one PlaceHolderActivity for each bucket you want to appear in the output (so if you are doing 52 weeks, you'd have 52).&amp;nbsp; Now, composite this list with the source list using CompositeList, then pipe it into your grouping list.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Also, it will simplify things if you make the EventList&amp;lt;PlaceHolderActivity&amp;gt; be a SequenceList built from the source list.&amp;nbsp; Cool, eh?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;placeHolders = new SequenceList&amp;lt;Activity&amp;gt;(source, sequencer); // sequencer returns a sub-class of Activity - PlaceHolderActivity&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;composite = new CompositeList&amp;lt;Activity&amp;gt;(source.getPubliser(), source.getReadWriteLock());&lt;/DIV&gt;
&lt;DIV&gt;composite.addMemberList(source);&lt;/DIV&gt;
&lt;DIV&gt;composite.addMemberList(placeHolders);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;grouped = new GroupingList&amp;lt;Activity&amp;gt;(composite);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;// then comes a function list whose function calculates the summaries&lt;BR&gt;FunctionList&amp;lt;List&amp;lt;Activity&amp;gt;, SummaryRecord&amp;gt; summaries = ...; // function ignores list entries that are PlaceHolderActivities&lt;BR&gt;&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;summaries now contains the list that you want, including the 'missing' buckets, and you don't have the messy event publisher stuff from the map to deal with.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;- K&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/FONT&gt;
&lt;DIV style=&quot;FONT-FAMILY: Tahoma; FONT-SIZE: x-small&quot;&gt;
&lt;DIV&gt;----------------------- &lt;B&gt;Original Message&lt;/B&gt; -----------------------&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;From:&lt;/B&gt;&amp;nbsp;cocoa &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25840628&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cocoa@...&lt;/a&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;To:&lt;/B&gt;&amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25840628&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Cc:&lt;/B&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Date:&lt;/B&gt;&amp;nbsp;Sat, 10 Oct 2009 15:51:53 -0700 (PDT)&lt;/DIV&gt;
&lt;DIV&gt;&lt;B&gt;Subject:&amp;nbsp;&lt;U&gt;SequenceList&lt;/U&gt;&lt;/B&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;FONT size=2 face=Tahoma&gt;
&lt;DIV&gt;&lt;BR&gt;In my application a list of sport activities can be tracked and analyzed. I&lt;BR&gt;want to provide a summary view that shows the total time or distance of all&lt;BR&gt;activities within a certain time period (e.g. week) over some time (e.g. the&lt;BR&gt;last year). Below is the basic list setup I use.&lt;BR&gt;&lt;BR&gt;// list of activities&lt;BR&gt;EventList&amp;lt;Activity&amp;gt; source = ...; &lt;BR&gt;&lt;BR&gt;// observe property change events&lt;BR&gt;EventList&amp;lt;Activity&amp;gt; observed = new ObservableElementList(source, ...);&lt;BR&gt;&lt;BR&gt;// group the activities by time period, e.g. per week&lt;BR&gt;GroupingList&amp;lt;Activity&amp;gt; grouped = new&lt;BR&gt;GroupingList&amp;lt;Activity&amp;gt;(observedElementList, ...);&lt;BR&gt;&lt;BR&gt;// then comes a function list whose function calculates the summaries&lt;BR&gt;FunctionList&amp;lt;List&amp;lt;Activity&amp;gt;, SummaryRecord&amp;gt; summaries = ...;&lt;BR&gt;&lt;BR&gt;As GroupingList does not return any empty groups, it happens that the&lt;BR&gt;summaries contains gaps, i.e. time periods for which no group exists. Then I&lt;BR&gt;stumbled upon the SequenceList, which I thought might be of some help. First&lt;BR&gt;I had some problems with the sequencer implementation (the summaries after&lt;BR&gt;the first element where lost). But here is with what I came up with.&lt;BR&gt;&lt;BR&gt;// first create a map that maps a time period to the list of summaries&lt;BR&gt;DisposableMap&amp;lt;Week, List&amp;lt;SummaryRecord&amp;gt;&amp;gt; map =&lt;BR&gt;GlazedLists.syncEventListToMultiMap(summaries, keyMaker());&lt;BR&gt;&lt;BR&gt;// then pass this map to the sequencer implementation&lt;BR&gt;SequenceList&amp;lt;SummaryRecord&amp;gt; sequence = new&lt;BR&gt;SequenceList&amp;lt;SummaryRecord&amp;gt;(summaries, new RecordSequencer(map));&lt;BR&gt;&lt;BR&gt;The sequencer uses the map to implement next and previous so that if there&lt;BR&gt;is already a SummaryRecord for a time period then that SummaryRecord is&lt;BR&gt;returned (otherwise, an empty SummaryRecord). See the implementation of&lt;BR&gt;next().&lt;BR&gt;&lt;BR&gt;public Record next(SummaryRecord value) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Week week = value.week.next();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;List&amp;lt;SummaryRecord&amp;gt; existing = map.get(week);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return existing != null ? existing.get(0) : new SummaryRecord(week, 0);&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;So far, this seems to work. I am just wondering whether there is a simpler&lt;BR&gt;way to achieve the same thing. I'm sure others have done this kind of&lt;BR&gt;reporting over a data set. There is also precious few documentation for&lt;BR&gt;SequenceList, so I'm not sure that this is a supported way of using it&lt;BR&gt;(especially the Sequencer implementation).&lt;BR&gt;&lt;BR&gt;Any suggestions?&lt;BR&gt;Simon&lt;BR&gt;&lt;BR&gt;PS: SequenceList seems to have a bug if the earliest source value is a&lt;BR&gt;sequence value. In that case, the earliest sequence value is duplicated in&lt;BR&gt;the result list (can easily be shown with month sequencer).&lt;BR&gt;&lt;BR&gt;PS: glazedlists is amazing :clap:&lt;BR&gt;-- &lt;BR&gt;View this message in context: &lt;A href=&quot;http://www.nabble.com/SequenceList-tp25838609p25838609.html&quot; target=&quot;_top&quot;&gt;&lt;FONT color=#0000ff&gt;http://www.nabble.com/SequenceList-tp25838609p25838609.html&lt;/FONT&gt;&lt;/A&gt;&lt;BR&gt;Sent from the GlazedLists - User mailing list archive at Nabble.com.&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;---------------------------------------------------------------------&lt;BR&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25840628&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;&lt;BR&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25840628&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;/FONT&gt;&lt;/BODY&gt;&lt;/HTML&gt;


---------------------------------------------------------------------
To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25840628&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25840628&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SequenceList-tp25838609p25840628.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25838609</id>
	<title>SequenceList</title>
	<published>2009-10-10T15:51:50Z</published>
	<updated>2009-10-10T15:51:50Z</updated>
	<author>
		<name>cocoa</name>
	</author>
	<content type="html">In my application a list of sport activities can be tracked and analyzed. I want to provide a summary view that shows the total time or distance of all activities within a certain time period (e.g. week) over some time (e.g. the last year). Below is the basic list setup I use.
&lt;br&gt;&lt;br&gt;// list of activities
&lt;br&gt;EventList&amp;lt;Activity&amp;gt; source = ...; 
&lt;br&gt;&lt;br&gt;// observe property change events
&lt;br&gt;EventList&amp;lt;Activity&amp;gt; observed = new ObservableElementList(source, ...);
&lt;br&gt;&lt;br&gt;// group the activities by time period, e.g. per week
&lt;br&gt;GroupingList&amp;lt;Activity&amp;gt; grouped = new GroupingList&amp;lt;Activity&amp;gt;(observedElementList, ...);
&lt;br&gt;&lt;br&gt;// then comes a function list whose function calculates the summaries
&lt;br&gt;FunctionList&amp;lt;List&amp;lt;Activity&amp;gt;, SummaryRecord&amp;gt; summaries = ...;
&lt;br&gt;&lt;br&gt;As GroupingList does not return any empty groups, it happens that the summaries contains gaps, i.e. time periods for which no group exists. Then I stumbled upon the SequenceList, which I thought might be of some help. First I had some problems with the sequencer implementation (the summaries after the first element where lost). But here is with what I came up with.
&lt;br&gt;&lt;br&gt;// first create a map that maps a time period to the list of summaries
&lt;br&gt;DisposableMap&amp;lt;Week, List&amp;lt;SummaryRecord&amp;gt;&amp;gt; map = GlazedLists.syncEventListToMultiMap(summaries, keyMaker());
&lt;br&gt;&lt;br&gt;// then pass this map to the sequencer implementation
&lt;br&gt;SequenceList&amp;lt;SummaryRecord&amp;gt; sequence = new SequenceList&amp;lt;SummaryRecord&amp;gt;(summaries, new RecordSequencer(map));
&lt;br&gt;&lt;br&gt;The sequencer uses the map to implement next and previous so that if there is already a SummaryRecord for a time period then that SummaryRecord is returned (otherwise, an empty SummaryRecord). See the implementation of next().
&lt;br&gt;&lt;br&gt;public Record next(SummaryRecord value) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; Week week = value.week.next();
&lt;br&gt;&amp;nbsp; &amp;nbsp; List&amp;lt;SummaryRecord&amp;gt; existing = map.get(week);
&lt;br&gt;&amp;nbsp; &amp;nbsp; return existing != null ? existing.get(0) : new SummaryRecord(week, 0);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;So far, this seems to work. I am just wondering whether there is a simpler way to achieve the same thing. I'm sure others have done this kind of reporting over a data set. There is also precious few documentation for SequenceList, so I'm not sure that this is a supported way of using it (especially the Sequencer implementation).
&lt;br&gt;&lt;br&gt;Any suggestions?
&lt;br&gt;Simon
&lt;br&gt;&lt;br&gt;PS: SequenceList seems to have a bug if the earliest source value is a sequence value. In that case, the earliest sequence value is duplicated in the result list (can easily be shown with month sequencer).
&lt;br&gt;&lt;br&gt;PS: glazedlists is amazing &lt;img class='smiley' src='http://old.nabble.com/images/smiley/anim_claps.gif' /&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SequenceList-tp25838609p25838609.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25773181</id>
	<title>Re: gl-addons</title>
	<published>2009-10-06T10:29:01Z</published>
	<updated>2009-10-06T10:29:01Z</updated>
	<author>
		<name>fab|an</name>
	</author>
	<content type="html">Forgot, the link: &lt;a href=&quot;http://github.com/fab1an/gl-addons&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/fab1an/gl-addons&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;fab|an wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;I have a nice little repository with stuff i wrote for glazedlists.
&lt;br&gt;May it be of use for anyone.
&lt;br&gt;&lt;br&gt;EventTreeViewer
&lt;br&gt;SWT Viewer for TreeList. Works for me, but lacks VIRTUAL support.
&lt;br&gt;I need comments on &lt;a href=&quot;http://www.nabble.com/2-TreeList-bugs--td24557579.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/2-TreeList-bugs--td24557579.html&lt;/a&gt;&amp;nbsp;though...
&lt;br&gt;&lt;br&gt;Set/ClassSetMatcherEditor
&lt;br&gt;MatcherEditor which tests an (function-)extracted enum property against a set of provided enums. I found that I could generalize much filter-scenarios this way.
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/gl-addons-tp25755998p25773181.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25757033</id>
	<title>Bug in ThresholdMatcherEditor</title>
	<published>2009-10-05T14:44:18Z</published>
	<updated>2009-10-05T14:44:18Z</updated>
	<author>
		<name>Baljeet</name>
	</author>
	<content type="html">Hi all
&lt;br&gt;&lt;br&gt;ThresholdMatcherEditor extends from AbstractMatcherEditor.
&lt;br&gt;Both the classes have a variable named 'currentMatcher'.
&lt;br&gt;&lt;br&gt;ThresholdMatcherEditor sets its private variable 'currentMatcher' which is not propagated to super.
&lt;br&gt;Also it does not override the getMatcher() method, hence the variable from AbstractMatcherEditor gets picked up. This is incorrect.
&lt;br&gt;&lt;br&gt;Small but caused my CompositeMatcher to behave erratically.
&lt;br&gt;&lt;br&gt;Baljeet</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Bug-in-ThresholdMatcherEditor-tp25757033p25757033.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25755998</id>
	<title>gl-addons</title>
	<published>2009-10-05T12:35:20Z</published>
	<updated>2009-10-05T12:35:20Z</updated>
	<author>
		<name>fab|an</name>
	</author>
	<content type="html">I have a nice little repository with stuff i wrote for glazedlists.
&lt;br&gt;May it be of use for anyone.
&lt;br&gt;&lt;br&gt;EventTreeViewer
&lt;br&gt;SWT Viewer for TreeList. Works for me, but lacks VIRTUAL support.
&lt;br&gt;I need comments on &lt;a href=&quot;http://www.nabble.com/2-TreeList-bugs--td24557579.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/2-TreeList-bugs--td24557579.html&lt;/a&gt;&amp;nbsp;though...
&lt;br&gt;&lt;br&gt;Set/ClassSetMatcherEditor
&lt;br&gt;MatcherEditor which tests an (function-)extracted enum property against a set of provided enums. I found that I could generalize much filter-scenarios this way.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/gl-addons-tp25755998p25755998.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25648685</id>
	<title>Re: Updates off the Swing EDT</title>
	<published>2009-09-28T09:37:29Z</published>
	<updated>2009-09-28T09:37:29Z</updated>
	<author>
		<name>James Lemieux</name>
	</author>
	<content type="html">Richard,&lt;br&gt;&lt;br&gt;   Your 3 points are all spot-on. If you can achieve immutability with your elements, I think that produces the sexiest result, but of course you&amp;#39;ll need to consider code already written.&lt;br&gt;&lt;br&gt;   One note of caution: ThreadSafeList is fine for single-method interactions with an EventList, but keep in mind that you must still manually lock and unlock the list for larger units of atomicity. For example:&lt;br&gt;
&lt;br&gt;Object firstElement = null;&lt;br&gt;if (!myEventList.isEmpty())&lt;br&gt;   firstElement = myEventList.get(0);&lt;br&gt;&lt;br&gt;isn&amp;#39;t concurrently correct, even if myEventList is a ThreadSafeList, since the lock of the list pipeline is unlocked between the calls to isEmpty() and get(). So, this should really be written as:&lt;br&gt;
&lt;br&gt;&lt;br&gt;
Object firstElement = null;&lt;br&gt;myEventList.getReadWriteLock().lock();&lt;br&gt;try {&lt;br&gt;  if (!myEventList.isEmpty())&lt;br&gt;
     firstElement = myEventList.get(0);&lt;br&gt;} finally {&lt;br&gt;  myEventList.getReadWriteLock().unlock();&lt;br&gt;}&lt;br&gt;&lt;br&gt;Keep on Glazin&amp;#39; in the free world,&lt;br&gt;&lt;br&gt;James&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Mon, Sep 28, 2009 at 7:30 AM, Richard &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25648685&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;numberoneskier@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;Hi Gerrit,&lt;br&gt;
&lt;br&gt;
thanks for your response, it does help because it made me aware of FunctionList&lt;br&gt;
and confirmed my suspicion that &amp;#39;something else&amp;#39; needs to be done.&lt;br&gt;
&lt;br&gt;
Cloning is OK for most of my use cases, but i&amp;#39;ve got one case where i&amp;#39;ve got in&lt;br&gt;
the order of 10-15 thousand items in the list and the user has multiple&lt;br&gt;
views over those items... not sure if i want to clone all that multiple times!&lt;br&gt;
Luckily in this case i control the entire code so i might make things immutable&lt;br&gt;
so updates are really forced to be replacements which should make the race&lt;br&gt;
conditions go away.&lt;br&gt;
&lt;br&gt;
Anyway, putting aside specific cases, i&amp;#39;d like to confirm my general&lt;br&gt;
understanding of the situation:&lt;br&gt;
&lt;br&gt;
(1) if you have a mutable list (insertions/deletions) then wrapping it in&lt;br&gt;
ThreadSafeList and using EventTableModel is enough to satisfy Swings EDT rules&lt;br&gt;
even if the mutations to the list are happening OFF the EDT.&lt;br&gt;
&lt;br&gt;
(2) if you have mutable items in the list and the items are being mutated ON&lt;br&gt;
the EDT then you can contain them in an ObservableElementList, wrap that in a&lt;br&gt;
ThreadSafeList and use EventTableModel, you will be safe (allows the list to be&lt;br&gt;
changed off EDT, but items must be changed on EDT).&lt;br&gt;
&lt;br&gt;
(3) if you have mutable items in the list and the items are being mutated OFF&lt;br&gt;
the EDT then this will cause race conditions in JTable painting unless you do&lt;br&gt;
&amp;#39;something else&amp;#39;, such as cloning, or... actually i can&amp;#39;t think of anything&lt;br&gt;
else!?!&lt;br&gt;
&lt;br&gt;
Would that be a fair synopsis?&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25648685&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;&lt;br&gt;
For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25648685&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Updates-off-the-Swing-EDT-tp25631193p25648685.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25646626</id>
	<title>Re: Updates off the Swing EDT</title>
	<published>2009-09-28T07:30:01Z</published>
	<updated>2009-09-28T07:30:01Z</updated>
	<author>
		<name>Richard-332</name>
	</author>
	<content type="html">Hi Gerrit,
&lt;br&gt;&lt;br&gt;thanks for your response, it does help because it made me aware of FunctionList 
&lt;br&gt;and confirmed my suspicion that 'something else' needs to be done.
&lt;br&gt;&lt;br&gt;Cloning is OK for most of my use cases, but i've got one case where i've got in 
&lt;br&gt;the order of 10-15 thousand items in the list and the user has multiple
&lt;br&gt;views over those items... not sure if i want to clone all that multiple times! 
&lt;br&gt;Luckily in this case i control the entire code so i might make things immutable
&lt;br&gt;so updates are really forced to be replacements which should make the race 
&lt;br&gt;conditions go away.
&lt;br&gt;&lt;br&gt;Anyway, putting aside specific cases, i'd like to confirm my general 
&lt;br&gt;understanding of the situation:
&lt;br&gt;&lt;br&gt;(1) if you have a mutable list (insertions/deletions) then wrapping it in 
&lt;br&gt;ThreadSafeList and using EventTableModel is enough to satisfy Swings EDT rules
&lt;br&gt;even if the mutations to the list are happening OFF the EDT.
&lt;br&gt;&lt;br&gt;(2) if you have mutable items in the list and the items are being mutated ON 
&lt;br&gt;the EDT then you can contain them in an ObservableElementList, wrap that in a 
&lt;br&gt;ThreadSafeList and use EventTableModel, you will be safe (allows the list to be 
&lt;br&gt;changed off EDT, but items must be changed on EDT).
&lt;br&gt;&lt;br&gt;(3) if you have mutable items in the list and the items are being mutated OFF 
&lt;br&gt;the EDT then this will cause race conditions in JTable painting unless you do 
&lt;br&gt;'something else', such as cloning, or... actually i can't think of anything 
&lt;br&gt;else!?!
&lt;br&gt;&lt;br&gt;Would that be a fair synopsis?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25646626&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25646626&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Updates-off-the-Swing-EDT-tp25631193p25646626.html" />
</entry>

</feed>
