<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-2577</id>
	<title>Nabble - GlazedLists - Dev</title>
	<updated>2009-11-15T05:03:24Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/GlazedLists---Dev-f2577.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GlazedLists---Dev-f2577.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26358955</id>
	<title>Re: IllegalStateException when sorting via table headers</title>
	<published>2009-11-15T05:03:24Z</published>
	<updated>2009-11-15T05:03:24Z</updated>
	<author>
		<name>JohnPM</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-author&quot; style=&quot;font-weight: bold;&quot;&gt;JohnPM wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;I am getting java.lang.IllegalStateException: Cannot combine reorder with other change events when sorting a list via the table headers. I found an old post with this problem, which implied it was resolved by avoiding accessing the list selection model, but I'm not clear how I can use the list if I don't use the selection model! The exception appears to be trigggered by processing of a ListSelectionEvent, i.e.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public void valueChanged(ListSelectionEvent lse){
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (lse.getSource() == myListSelectionModel){
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!lse.getValueIsAdjusting()){
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /** React to changes in the selected entries */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; selectedEntries = myListSelectionModel.getSelected();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;If I comment out the access to getSelected() the exception no longer occurs, but of course I then do not get the selected entries. Any idea how I resolve this? I have tried the latest dev build and it has the same behaviour.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
Problem solved - another event processing path was (wrongly) triggering a clearSelection(). &lt;img class='smiley' src='http://old.nabble.com/images/smiley/smiley_blush.gif' /&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IllegalStateException-when-sorting-via-table-headers-tp26355137p26358955.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26357172</id>
	<title>Using EventList with JTree</title>
	<published>2009-11-14T23:53:47Z</published>
	<updated>2009-11-14T23:53:47Z</updated>
	<author>
		<name>GalSav</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I've tried to use the TreeList with Jtree.
&lt;br&gt;To the bean which i use in the TreeList &amp;nbsp;(the base class of the list) , i added a BeanChange Support(Like in the screencast example).
&lt;br&gt;&lt;br&gt;The problem is : when i change a property (and fire an appropriate event through the bean change support) the tree get a structure change event , and i'm intersted in a smaller change in the tree (like node change ) . Another problem: &amp;nbsp;it doesnt react to the expanding policy.
&lt;br&gt;&lt;br&gt;This all &amp;nbsp;seems to work great with a TreeTable .
&lt;br&gt;&lt;br&gt;My conclusion is that it is not supported by Jtree, am I Right?
&lt;br&gt;&lt;br&gt;If the answear is yes, what should i do &amp;nbsp;to add support for this feature?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Gal</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Using-EventList-with-JTree-tp26357172p26357172.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26355137</id>
	<title>IllegalStateException when sorting via table headers</title>
	<published>2009-11-14T16:15:59Z</published>
	<updated>2009-11-14T16:15:59Z</updated>
	<author>
		<name>JohnPM</name>
	</author>
	<content type="html">I am getting java.lang.IllegalStateException: Cannot combine reorder with other change events when sorting a list via the table headers. I found an old post with this problem, which implied it was resolved by avoiding accessing the list selection model, but I'm not clear how I can use the list if I don't use the selection model! The exception appears to be trigggered by processing of a ListSelectionEvent, i.e.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public void valueChanged(ListSelectionEvent lse){
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (lse.getSource() == myListSelectionModel){
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!lse.getValueIsAdjusting()){
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /** React to changes in the selected entries */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; selectedEntries = myListSelectionModel.getSelected();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;If I comment out the access to getSelected() the exception no longer occurs, but of course I then do not get the selected entries. Any idea how I resolve this? I have tried the latest dev build and it has the same behaviour.
&lt;br&gt;&lt;br&gt;Edit: Here are the exception details:
&lt;br&gt;&lt;br&gt;Exception in thread &amp;quot;AWT-EventQueue-0&amp;quot; java.lang.IllegalStateException: Cannot combine reorder with other change events
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.event.ListEventAssembler.reorder(ListEventAssembler.java:246)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.ListSelection.addSelectedReorder(ListSelection.java:852)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.ListSelection.listChanged(ListSelection.java:172)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:412)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:409)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher$SubjectAndListener.firePendingEvent(SequenceDependenciesEventPublisher.java:445)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.fireEvent(SequenceDependenciesEventPublisher.java:344)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:316)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.SortedList.setComparator(SortedList.java:478)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.gui.AbstractTableComparatorChooser.rebuildComparator(AbstractTableComparatorChooser.java:154)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.swing.TableComparatorChooser.rebuildComparator(TableComparatorChooser.java:295)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.gui.AbstractTableComparatorChooser$SortingStateListener.propertyChange(AbstractTableComparatorChooser.java:140)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.impl.gui.SortingState.fireSortingChanged(SortingState.java:67)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.impl.gui.MouseOnlySortingStrategy.columnClicked(MouseOnlySortingStrategy.java:65)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.swing.TableComparatorChooser$HeaderClickHandler.mouseClicked(TableComparatorChooser.java:568)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.processMouseEvent(Component.java:6266)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.processEvent(Component.java:6028)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Container.processEvent(Container.java:2041)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.dispatchEventImpl(Component.java:4630)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Container.dispatchEventImpl(Container.java:2099)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.dispatchEvent(Component.java:4460)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Container.dispatchEventImpl(Container.java:2085)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Window.dispatchEventImpl(Window.java:2475)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.dispatchEvent(Component.java:4460)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IllegalStateException-when-sorting-via-table-headers-tp26355137p26355137.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26189422</id>
	<title>Re: Problem with class listening to different EventLists</title>
	<published>2009-11-03T16:58:10Z</published>
	<updated>2009-11-03T16:58:10Z</updated>
	<author>
		<name>James Lemieux</name>
	</author>
	<content type="html">My educated guess tells me you&amp;#39;re getting the wrong list because List.equals() considers the equality and order of elements. So event.getSourceList() will match the FIRST list from dataManager that contains the SAME kinds of elements.&lt;br&gt;
&lt;br&gt;                       if (event.getSourceList().equals(dataManager.getListA())){&lt;br&gt;&lt;div class=&quot;h5&quot;&gt;
                                handleFsrListEvent(event);&lt;br&gt;
                        }else if (event.getSource().equals(dataManager.getListB())){&lt;br&gt;
                                handleFsrFunctionListEvent(event);&lt;br&gt;
                        }else if (event.getSource().equals(dataManager.getListC())){&lt;br&gt;
                                handleElementListEvent(event);&lt;br&gt;
                        }&lt;br&gt;&lt;br&gt;If you like your design and want to keep it that way, consider switching to identity equals if you know the Lists in question are precisely equal:&lt;br&gt;&lt;br&gt;                       if (event.getSourceList() == dataManager.getListA()){&lt;br&gt;

&lt;div class=&quot;h5&quot;&gt;
                                handleFsrListEvent(event);&lt;br&gt;
                        }else if (event.getSource() == dataManager.getListB()){&lt;br&gt;
                                handleFsrFunctionListEvent(event);&lt;br&gt;
                        }else if (event.getSource() == dataManager.getListC()){&lt;br&gt;
                                handleElementListEvent(event);&lt;br&gt;
                        }&lt;/div&gt;&lt;br&gt;&lt;/div&gt;otherwise I&amp;#39;m uncertain of how you&amp;#39;ll be to make that code work reliably.&lt;br&gt;&lt;br&gt;James&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Tue, Nov 3, 2009 at 5:58 AM, Fritz Richter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26189422&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fritz@...&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;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;Hi together,&lt;br&gt;
I&amp;#39;ve got a component which must listen to different eventLists.&lt;br&gt;
It is not possible to implement the ListEventListener typed via generics interface more than once.&lt;br&gt;
Therefore I added just one method (without generics), ask the event for the eventListSource, compare it to the different eventLists and call specific methods which handle the specific events.&lt;br&gt;
&lt;br&gt;
If my if-clause says that the eventListSource is the eventList A than I call handleAEvent(...) method. In this method I try to retrieve the object either via event.getOldObject or via getIndex and get(index). My problem is, that sometimes i get objects of other lists...&lt;br&gt;

&lt;br&gt;
Is my problem described clearly? Can anyone help me?&lt;br&gt;
Here a code snipped...&lt;br&gt;
&lt;br&gt;
dataManager.getFsrs().addListEventListener(this);&lt;br&gt;
dataManager.getFsrFunctions().addListEventListener(this);&lt;br&gt;
dataManager.getElements().addListEventListener(this);&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
public void listChanged(ListEvent event) {&lt;br&gt;
                //Iterate through all list changes&lt;br&gt;
                while (event.hasNext()) {&lt;br&gt;
                        event.next(); //get the next change event&lt;br&gt;
                        if (event.getSourceList().equals(dataManager.getListA())){&lt;br&gt;
                                handleFsrListEvent(event);&lt;br&gt;
                        }else if (event.getSource().equals(dataManager.getListB())){&lt;br&gt;
                                handleFsrFunctionListEvent(event);&lt;br&gt;
                        }else if (event.getSource().equals(dataManager.getListC())){&lt;br&gt;
                                handleElementListEvent(event);&lt;br&gt;
                        }&lt;br&gt;
                }&lt;br&gt;
        }&lt;br&gt;
&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
        private void handleFunctionListEvent(ListEvent&amp;lt;Function&amp;gt; event) {&lt;br&gt;
                if (event.getType() == ListEvent.INSERT){&lt;br&gt;
                        Function function = event.getSourceList().get(event.getIndex());&lt;br&gt;
                        ElementRow&amp;lt;Function&amp;gt; functionRow = new ElementRow&amp;lt;Function&amp;gt;(function);&lt;br&gt;
                        ElementRow parentRow = findRow(function.getElement());&lt;br&gt;
                        addRow(parentRow, functionRow);&lt;br&gt;
                } else if (event.getType() == ListEvent.DELETE){&lt;br&gt;
                        Function function = event.getOldValue();&lt;br&gt;
                        //SOMETIMES HERE I GOT OTHER VALUES THAN FUNCTIONS...&lt;br&gt;
                        Row row = findRow(function);&lt;br&gt;
                        removeRow(row);&lt;br&gt;
                }&lt;br&gt;
        }&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26189422&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=26189422&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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/Problem-with-class-listening-to-different-EventLists-tp26182978p26189422.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26160161</id>
	<title>Re: Problem with class listening to different EventLists</title>
	<published>2009-11-03T06:32:20Z</published>
	<updated>2009-11-03T06:32:20Z</updated>
	<author>
		<name>fab|an</name>
	</author>
	<content type="html">What are you trying to do? I think you have to refactor at some greater scope in your code.
&lt;br&gt;Can't you divide the Handlers for the ListEvents in different classes?
&lt;br&gt;&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;fritzr wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi together,
&lt;br&gt;I've got a component which must listen to different eventLists.
&lt;br&gt;It is not possible to implement the ListEventListener typed via generics interface more than once.
&lt;br&gt;Therefore I added just one method (without generics), ask the event for the eventListSource, compare it to the different eventLists and call specific methods which handle the specific events.
&lt;br&gt;&lt;br&gt;If my if-clause says that the eventListSource is the eventList A than I call handleAEvent(...) method. In this method I try to retrieve the object either via event.getOldObject or via getIndex and get(index). My problem is, that sometimes i get objects of other lists...
&lt;br&gt;&lt;br&gt;Is my problem described clearly? Can anyone help me?
&lt;br&gt;Here a code snipped...
&lt;br&gt;&lt;br&gt;dataManager.getFsrs().addListEventListener(this);
&lt;br&gt;dataManager.getFsrFunctions().addListEventListener(this);
&lt;br&gt;dataManager.getElements().addListEventListener(this);
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;public void listChanged(ListEvent event) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Iterate through all list changes
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (event.hasNext()) {
&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; event.next(); //get the next change event
&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; if (event.getSourceList().equals(dataManager.getListA())){
&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; &amp;nbsp; handleFsrListEvent(event);
&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; }else if (event.getSource().equals(dataManager.getListB())){
&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; &amp;nbsp; handleFsrFunctionListEvent(event);
&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; }else if (event.getSource().equals(dataManager.getListC())){
&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; &amp;nbsp; handleElementListEvent(event);
&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; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;...
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private void handleFunctionListEvent(ListEvent&amp;lt;Function&amp;gt; event) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (event.getType() == ListEvent.INSERT){
&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; Function function = event.getSourceList().get(event.getIndex());
&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; ElementRow&amp;lt;Function&amp;gt; functionRow = new ElementRow&amp;lt;Function&amp;gt;(function);
&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; ElementRow parentRow = findRow(function.getElement());
&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; addRow(parentRow, functionRow);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else if (event.getType() == ListEvent.DELETE){
&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; Function function = event.getOldValue();
&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; //SOMETIMES HERE I GOT OTHER VALUES THAN FUNCTIONS...
&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; Row row = findRow(function);
&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; removeRow(row);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-with-class-listening-to-different-EventLists-tp26160133p26160161.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26180075</id>
	<title>Re: Problem with class listening to different EventLists</title>
	<published>2009-11-03T06:02:32Z</published>
	<updated>2009-11-03T06:02:32Z</updated>
	<author>
		<name>Endre Stølsvik-8</name>
	</author>
	<content type="html">&lt;div&gt;Just a quick reply, possibly w/o any help!&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;Is your equals-method working for sure?&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;You could user inner classes for the problem you have, instead of doing this more hackish &amp;quot;routing&amp;quot;-stuff you do. Either anonymous classes, like directly in the code do &amp;#39;new ListEventListener&amp;lt;Type&amp;gt;() { .. body ..}&amp;#39;, or make inner classes (possibly &amp;quot;non-static&amp;quot;, so that they have direct access to the enclosing class).&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Kind regards,&lt;/div&gt;&lt;div&gt;Endre.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Tue, Nov 3, 2009 at 14:55, fritzr &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26180075&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fritz@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;

&lt;br&gt;
Hi together,&lt;br&gt;
I&amp;#39;ve got a component which must listen to different eventLists.&lt;br&gt;
It is not possible to implement the ListEventListener typed via generics&lt;br&gt;
interface more than once.&lt;br&gt;
Therefore I added just one method (without generics), ask the event for the&lt;br&gt;
eventListSource, compare it to the different eventLists and call specific&lt;br&gt;
methods which handle the specific events.&lt;br&gt;
&lt;br&gt;
If my if-clause says that the eventListSource is the eventList A than I call&lt;br&gt;
handleAEvent(...) method. In this method I try to retrieve the object either&lt;br&gt;
via event.getOldObject or via getIndex and get(index). My problem is, that&lt;br&gt;
sometimes i get objects of other lists...&lt;br&gt;
&lt;br&gt;
Is my problem described clearly? Can anyone help me?&lt;br&gt;
Here a code snipped...&lt;br&gt;
&lt;br&gt;
dataManager.getFsrs().addListEventListener(this);&lt;br&gt;
dataManager.getFsrFunctions().addListEventListener(this);&lt;br&gt;
dataManager.getElements().addListEventListener(this);&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
public void listChanged(ListEvent event) {&lt;br&gt;
                //Iterate through all list changes&lt;br&gt;
                while (event.hasNext()) {&lt;br&gt;
                        event.next(); //get the next change event&lt;br&gt;
                        if (event.getSourceList().equals(dataManager.getListA())){&lt;br&gt;
                                handleFsrListEvent(event);&lt;br&gt;
                        }else if (event.getSource().equals(dataManager.getListB())){&lt;br&gt;
                                handleFsrFunctionListEvent(event);&lt;br&gt;
                        }else if (event.getSource().equals(dataManager.getListC())){&lt;br&gt;
                                handleElementListEvent(event);&lt;br&gt;
                        }&lt;br&gt;
                }&lt;br&gt;
        }&lt;br&gt;
&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
        private void handleFunctionListEvent(ListEvent&amp;lt;Function&amp;gt; event) {&lt;br&gt;
                if (event.getType() == ListEvent.INSERT){&lt;br&gt;
                        Function function = event.getSourceList().get(event.getIndex());&lt;br&gt;
                        ElementRow&amp;lt;Function&amp;gt; functionRow = new ElementRow&amp;lt;Function&amp;gt;(function);&lt;br&gt;
                        ElementRow parentRow = findRow(function.getElement());&lt;br&gt;
                        addRow(parentRow, functionRow);&lt;br&gt;
                } else if (event.getType() == ListEvent.DELETE){&lt;br&gt;
                        Function function = event.getOldValue();&lt;br&gt;
                        //SOMETIMES HERE I GOT OTHER VALUES THAN&lt;br&gt;
FUNCTIONS...&lt;br&gt;
                        Row row = findRow(function);&lt;br&gt;
                        removeRow(row);&lt;br&gt;
                }&lt;br&gt;
        }&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://old.nabble.com/Problem-with-class-listening-to-different-EventLists-tp26160133p26160133.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Problem-with-class-listening-to-different-EventLists-tp26160133p26160133.html&lt;/a&gt;&lt;br&gt;


Sent from the GlazedLists - Dev 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=26180075&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=26180075&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-with-class-listening-to-different-EventLists-tp26160133p26180075.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26182978</id>
	<title>Problem with class listening to different EventLists</title>
	<published>2009-11-03T05:58:39Z</published>
	<updated>2009-11-03T05:58:39Z</updated>
	<author>
		<name>fritzr</name>
	</author>
	<content type="html">Hi together,
&lt;br&gt;I've got a component which must listen to different eventLists.
&lt;br&gt;It is not possible to implement the ListEventListener typed via &amp;nbsp;
&lt;br&gt;generics interface more than once.
&lt;br&gt;Therefore I added just one method (without generics), ask the event &amp;nbsp;
&lt;br&gt;for the eventListSource, compare it to the different eventLists and &amp;nbsp;
&lt;br&gt;call specific methods which handle the specific events.
&lt;br&gt;&lt;br&gt;If my if-clause says that the eventListSource is the eventList A than &amp;nbsp;
&lt;br&gt;I call handleAEvent(...) method. In this method I try to retrieve the &amp;nbsp;
&lt;br&gt;object either via event.getOldObject or via getIndex and get(index). &amp;nbsp;
&lt;br&gt;My problem is, that sometimes i get objects of other lists...
&lt;br&gt;&lt;br&gt;Is my problem described clearly? Can anyone help me?
&lt;br&gt;Here a code snipped...
&lt;br&gt;&lt;br&gt;dataManager.getFsrs().addListEventListener(this);
&lt;br&gt;dataManager.getFsrFunctions().addListEventListener(this);
&lt;br&gt;dataManager.getElements().addListEventListener(this);
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;public void listChanged(ListEvent event) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Iterate through all list changes
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (event.hasNext()) {
&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; event.next(); //get the next change event
&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; if (event.getSourceList().equals(dataManager.getListA())){
&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; &amp;nbsp; handleFsrListEvent(event);
&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; }else if (event.getSource().equals(dataManager.getListB())){
&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; &amp;nbsp; handleFsrFunctionListEvent(event);
&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; }else if (event.getSource().equals(dataManager.getListC())){
&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; &amp;nbsp; handleElementListEvent(event);
&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; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;...
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private void handleFunctionListEvent(ListEvent&amp;lt;Function&amp;gt; event) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (event.getType() == ListEvent.INSERT){
&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; Function function = event.getSourceList().get(event.getIndex());
&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; ElementRow&amp;lt;Function&amp;gt; functionRow = new ElementRow&amp;lt;Function&amp;gt; 
&lt;br&gt;(function);
&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; ElementRow parentRow = findRow(function.getElement());
&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; addRow(parentRow, functionRow);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else if (event.getType() == ListEvent.DELETE){
&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; Function function = event.getOldValue();
&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;//SOMETIMES HERE I GOT OTHER VALUES THAN &amp;nbsp;
&lt;br&gt;FUNCTIONS...
&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; Row row = findRow(function);
&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; removeRow(row);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&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=26182978&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=26182978&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-with-class-listening-to-different-EventLists-tp26182978p26182978.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26160134</id>
	<title>Problem with class listening to different EventLists</title>
	<published>2009-11-03T05:57:00Z</published>
	<updated>2009-11-03T05:57:00Z</updated>
	<author>
		<name>fritzr</name>
	</author>
	<content type="html">Hi together,
&lt;br&gt;I've got a component which must listen to different eventLists.
&lt;br&gt;It is not possible to implement the ListEventListener typed via generics interface more than once.
&lt;br&gt;Therefore I added just one method (without generics), ask the event for the eventListSource, compare it to the different eventLists and call specific methods which handle the specific events.
&lt;br&gt;&lt;br&gt;If my if-clause says that the eventListSource is the eventList A than I call handleAEvent(...) method. In this method I try to retrieve the object either via event.getOldObject or via getIndex and get(index). My problem is, that sometimes i get objects of other lists...
&lt;br&gt;&lt;br&gt;Is my problem described clearly? Can anyone help me?
&lt;br&gt;Here a code snipped...
&lt;br&gt;&lt;br&gt;dataManager.getFsrs().addListEventListener(this);
&lt;br&gt;dataManager.getFsrFunctions().addListEventListener(this);
&lt;br&gt;dataManager.getElements().addListEventListener(this);
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;public void listChanged(ListEvent event) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Iterate through all list changes
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (event.hasNext()) {
&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; event.next(); //get the next change event
&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; if (event.getSourceList().equals(dataManager.getListA())){
&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; &amp;nbsp; handleFsrListEvent(event);
&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; }else if (event.getSource().equals(dataManager.getListB())){
&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; &amp;nbsp; handleFsrFunctionListEvent(event);
&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; }else if (event.getSource().equals(dataManager.getListC())){
&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; &amp;nbsp; handleElementListEvent(event);
&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; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;...
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private void handleFunctionListEvent(ListEvent&amp;lt;Function&amp;gt; event) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (event.getType() == ListEvent.INSERT){
&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; Function function = event.getSourceList().get(event.getIndex());
&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; ElementRow&amp;lt;Function&amp;gt; functionRow = new ElementRow&amp;lt;Function&amp;gt;(function);
&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; ElementRow parentRow = findRow(function.getElement());
&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; addRow(parentRow, functionRow);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else if (event.getType() == ListEvent.DELETE){
&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; Function function = event.getOldValue();
&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; //SOMETIMES HERE I GOT OTHER VALUES THAN FUNCTIONS...
&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; Row row = findRow(function);
&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; removeRow(row);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-with-class-listening-to-different-EventLists-tp26160134p26160134.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26160133</id>
	<title>Problem with class listening to different EventLists</title>
	<published>2009-11-03T05:55:24Z</published>
	<updated>2009-11-03T05:55:24Z</updated>
	<author>
		<name>fritzr</name>
	</author>
	<content type="html">Hi together,
&lt;br&gt;I've got a component which must listen to different eventLists.
&lt;br&gt;It is not possible to implement the ListEventListener typed via generics interface more than once.
&lt;br&gt;Therefore I added just one method (without generics), ask the event for the eventListSource, compare it to the different eventLists and call specific methods which handle the specific events.
&lt;br&gt;&lt;br&gt;If my if-clause says that the eventListSource is the eventList A than I call handleAEvent(...) method. In this method I try to retrieve the object either via event.getOldObject or via getIndex and get(index). My problem is, that sometimes i get objects of other lists...
&lt;br&gt;&lt;br&gt;Is my problem described clearly? Can anyone help me?
&lt;br&gt;Here a code snipped...
&lt;br&gt;&lt;br&gt;dataManager.getFsrs().addListEventListener(this);
&lt;br&gt;dataManager.getFsrFunctions().addListEventListener(this);
&lt;br&gt;dataManager.getElements().addListEventListener(this);
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;public void listChanged(ListEvent event) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Iterate through all list changes
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (event.hasNext()) {
&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; event.next(); //get the next change event
&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; if (event.getSourceList().equals(dataManager.getListA())){
&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; &amp;nbsp; handleFsrListEvent(event);
&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; }else if (event.getSource().equals(dataManager.getListB())){
&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; &amp;nbsp; handleFsrFunctionListEvent(event);
&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; }else if (event.getSource().equals(dataManager.getListC())){
&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; &amp;nbsp; handleElementListEvent(event);
&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; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;...
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private void handleFunctionListEvent(ListEvent&amp;lt;Function&amp;gt; event) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (event.getType() == ListEvent.INSERT){
&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; Function function = event.getSourceList().get(event.getIndex());
&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; ElementRow&amp;lt;Function&amp;gt; functionRow = new ElementRow&amp;lt;Function&amp;gt;(function);
&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; ElementRow parentRow = findRow(function.getElement());
&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; addRow(parentRow, functionRow);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else if (event.getType() == ListEvent.DELETE){
&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; Function function = event.getOldValue();
&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; //SOMETIMES HERE I GOT OTHER VALUES THAN FUNCTIONS...
&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; Row row = findRow(function);
&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; removeRow(row);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-with-class-listening-to-different-EventLists-tp26160133p26160133.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26168726</id>
	<title>Re: malware-problem and virus-warnings</title>
	<published>2009-11-02T10:40:16Z</published>
	<updated>2009-11-02T10:40:16Z</updated>
	<author>
		<name>James Lemieux</name>
	</author>
	<content type="html">Wow! Congratulations Holger! Finally got around to solving that bug, huh? :-)&lt;br&gt;&lt;br&gt;James&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Mon, Oct 26, 2009 at 1:02 PM, Rob Eden &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26168726&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rob@...&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;Congratulations, Holger!&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;
&lt;br&gt;
Rob&lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
&lt;br&gt;
On Oct 26, 2009, at 4:00 PM, Holger Brands wrote:&lt;br&gt;
&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;
As I&amp;#39;m getting married on Friday,&lt;br&gt;
I&amp;#39;m pretty busy with other stuff ;-)&lt;br&gt;
Hopefully, Jesse or James will find some time&lt;br&gt;
to have a look at this?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Holger&lt;br&gt;
&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 guys,&lt;br&gt;
&lt;br&gt;
I&amp;#39;ve got the same kind of problem to access the GL main page.&lt;br&gt;
But I get more than one virus warning --&amp;gt; A look at the API is inhibited&lt;br&gt;
by our webscan:&lt;br&gt;
There&amp;#39;s a trojan horse called &amp;#39;Tenia.d&amp;#39;.&lt;br&gt;
A look at the release notes is inhibited due to a virus called&lt;br&gt;
&amp;#39;Mal_Hifrm&amp;#39;.&lt;br&gt;
&lt;br&gt;
I think, for the most of people that use some internet protection&lt;br&gt;
there&amp;#39;s no access to your GL main page.&lt;br&gt;
It doesn&amp;#39;t seem to be a false alarm. if you load the side in a safe&lt;br&gt;
area, the local scanner triggers an alarm, too.&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Markus&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=26168726&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=26168726&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;br&gt;
______________________________________________________&lt;br&gt;
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!&lt;br&gt;
Jetzt freischalten unter &lt;a href=&quot;http://movieflat.web.de&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://movieflat.web.de&lt;/a&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=26168726&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=26168726&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&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=26168726&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=26168726&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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/malware-problem-and-virus-warnings-tp26056473p26168726.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26067573</id>
	<title>Re: malware-problem and virus-warnings</title>
	<published>2009-10-26T14:02:01Z</published>
	<updated>2009-10-26T14:02:01Z</updated>
	<author>
		<name>Rob Eden</name>
	</author>
	<content type="html">Congratulations, Holger!
&lt;br&gt;&lt;br&gt;Rob
&lt;br&gt;&lt;br&gt;On Oct 26, 2009, at 4:00 PM, Holger Brands wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; As I'm getting married on Friday,
&lt;br&gt;&amp;gt; I'm pretty busy with other stuff ;-)
&lt;br&gt;&amp;gt; Hopefully, Jesse or James will find some time
&lt;br&gt;&amp;gt; to have a look at this?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Holger
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hi guys,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I've got the same kind of problem to access the GL main page.
&lt;br&gt;&amp;gt;&amp;gt; But I get more than one virus warning --&amp;gt; A look at the API is &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; inhibited
&lt;br&gt;&amp;gt;&amp;gt; by our webscan:
&lt;br&gt;&amp;gt;&amp;gt; There's a trojan horse called 'Tenia.d'.
&lt;br&gt;&amp;gt;&amp;gt; A look at the release notes is inhibited due to a virus called
&lt;br&gt;&amp;gt;&amp;gt; 'Mal_Hifrm'.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I think, for the most of people that use some internet protection
&lt;br&gt;&amp;gt;&amp;gt; there's no access to your GL main page.
&lt;br&gt;&amp;gt;&amp;gt; It doesn't seem to be a false alarm. if you load the side in a safe
&lt;br&gt;&amp;gt;&amp;gt; area, the local scanner triggers an alarm, too.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt; Markus
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&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=26067573&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=26067573&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ______________________________________________________
&lt;br&gt;&amp;gt; GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
&lt;br&gt;&amp;gt; Jetzt freischalten unter &lt;a href=&quot;http://movieflat.web.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://movieflat.web.de&lt;/a&gt;&lt;br&gt;&amp;gt;
&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=26067573&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=26067573&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;/div&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=26067573&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=26067573&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/malware-problem-and-virus-warnings-tp26056473p26067573.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26067555</id>
	<title>Re: malware-problem and virus-warnings</title>
	<published>2009-10-26T14:00:42Z</published>
	<updated>2009-10-26T14:00:42Z</updated>
	<author>
		<name>Holger Brands</name>
	</author>
	<content type="html">As I'm getting married on Friday,
&lt;br&gt;I'm pretty busy with other stuff ;-)
&lt;br&gt;Hopefully, Jesse or James will find some time
&lt;br&gt;to have a look at this?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Holger
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi guys,
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; I've got the same kind of problem to access the GL main page.
&lt;br&gt;&amp;gt; But I get more than one virus warning --&amp;gt; A look at the API is inhibited
&lt;br&gt;&amp;gt; by our webscan:
&lt;br&gt;&amp;gt; There's a trojan horse called 'Tenia.d'.
&lt;br&gt;&amp;gt; A look at the release notes is inhibited due to a virus called
&lt;br&gt;&amp;gt; 'Mal_Hifrm'.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I think, for the most of people that use some internet protection
&lt;br&gt;&amp;gt; there's no access to your GL main page.
&lt;br&gt;&amp;gt; It doesn't seem to be a false alarm. if you load the side in a safe
&lt;br&gt;&amp;gt; area, the local scanner triggers an alarm, too.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Markus
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&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=26067555&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=26067555&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;______________________________________________________
&lt;br&gt;GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
&lt;br&gt;Jetzt freischalten unter &lt;a href=&quot;http://movieflat.web.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://movieflat.web.de&lt;/a&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=26067555&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=26067555&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/malware-problem-and-virus-warnings-tp26056473p26067555.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26056473</id>
	<title>malware-problem and virus-warnings</title>
	<published>2009-10-26T02:17:02Z</published>
	<updated>2009-10-26T02:17:02Z</updated>
	<author>
		<name>Grimm, Markus</name>
	</author>
	<content type="html">Hi guys,
&lt;br&gt;&amp;nbsp;
&lt;br&gt;I've got the same kind of problem to access the GL main page.
&lt;br&gt;But I get more than one virus warning --&amp;gt; A look at the API is inhibited
&lt;br&gt;by our webscan:
&lt;br&gt;There's a trojan horse called 'Tenia.d'.
&lt;br&gt;A look at the release notes is inhibited due to a virus called
&lt;br&gt;'Mal_Hifrm'.
&lt;br&gt;&lt;br&gt;I think, for the most of people that use some internet protection
&lt;br&gt;there's no access to your GL main page.
&lt;br&gt;It doesn't seem to be a false alarm. if you load the side in a safe
&lt;br&gt;area, the local scanner triggers an alarm, too.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Markus
&lt;br&gt;&amp;nbsp;
&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=26056473&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=26056473&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/malware-problem-and-virus-warnings-tp26056473p26056473.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26013453</id>
	<title>Re: GL Page Malware Warning</title>
	<published>2009-10-22T09:51:48Z</published>
	<updated>2009-10-22T09:51:48Z</updated>
	<author>
		<name>Jesse Wilson</name>
	</author>
	<content type="html">So remember a long time ago when we had that spam magnet of a wiki? Well apparently it&amp;#39;s distributing malware. GROSS!! I&amp;#39;ve cleaned up wiki, so now I await another crawl by Googlebot.&lt;div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Sorry about this!&lt;br&gt;

&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Oct 22, 2009 at 8:20 AM, Rob Eden &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26013453&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rob@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;The GL main page is giving a malware warning in Safari at the moment.&lt;br&gt;
&lt;br&gt;
Here&amp;#39;s the Google diagnositc page for &amp;quot;&lt;a href=&quot;http://statanalyze.cn&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;statanalyze.cn&lt;/a&gt;&amp;quot;: &lt;a href=&quot;http://google.com/safebrowsing/diagnostic?tpl=safari&amp;amp;site=statanalyze.cn&amp;amp;hl=en-us&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://google.com/safebrowsing/diagnostic?tpl=safari&amp;amp;site=statanalyze.cn&amp;amp;hl=en-us&lt;/a&gt;&lt;br&gt;



&lt;br&gt;
Screenshot attached.&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;
&lt;br&gt;
Rob&lt;br&gt;
&lt;/font&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=26013453&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=26013453&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;Climate change should be your #1 political issue.&lt;br&gt;


&lt;a href=&quot;http://www.youtube.com/watch?v=zORv8wwiadQ&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.youtube.com/watch?v=zORv8wwiadQ&lt;/a&gt;&lt;br&gt;
&lt;/div&gt;
&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GL-Page-Malware-Warning-tp26011944p26013453.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26011944</id>
	<title>GL Page Malware Warning</title>
	<published>2009-10-22T08:20:52Z</published>
	<updated>2009-10-22T08:20:52Z</updated>
	<author>
		<name>Rob Eden</name>
	</author>
	<content type="html">The GL main page is giving a malware warning in Safari at the moment.
&lt;br&gt;&lt;br&gt;Here's the Google diagnositc page for &amp;quot;statanalyze.cn&amp;quot;: &lt;a href=&quot;http://google.com/safebrowsing/diagnostic?tpl=safari&amp;site=statanalyze.cn&amp;hl=en-us&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://google.com/safebrowsing/diagnostic?tpl=safari&amp;site=statanalyze.cn&amp;hl=en-us&lt;/a&gt;&lt;br&gt;&lt;br&gt;Screenshot attached.
&lt;br&gt;&lt;br&gt;Rob
&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=26011944&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=26011944&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;gl_malware.png&lt;/strong&gt; (90K) &lt;a href=&quot;http://old.nabble.com/attachment/26011944/0/gl_malware.png&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GL-Page-Malware-Warning-tp26011944p26011944.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25895801</id>
	<title>Maven source jar has wrong contents</title>
	<published>2009-10-14T10:25:25Z</published>
	<updated>2009-10-14T10:25:25Z</updated>
	<author>
		<name>Gerhard Radatz</name>
	</author>
	<content type="html">Hi folks,&lt;br&gt;&lt;br&gt;I just added the dependency to glazed-lists to my project:&lt;br&gt;&lt;br&gt;&amp;lt;dependency&amp;gt;&lt;br&gt;  &amp;lt;groupId&amp;gt;net.java.dev.glazedlists&amp;lt;/groupId&amp;gt;&lt;br&gt;  &amp;lt;artifactId&amp;gt;glazedlists_java15&amp;lt;/artifactId&amp;gt;&lt;br&gt;
  &amp;lt;version&amp;gt;1.8.0&amp;lt;/version&amp;gt;&lt;br&gt;&amp;lt;/dependency&amp;gt;&lt;br&gt;&lt;br&gt;which is located at Maven Central.&lt;br&gt;&lt;br&gt;You were kind enough to also provide the source and javadoc artifacts, but I think there is a slight mistake here, since IntelliJ could not display the source correctly:&lt;br&gt;
I think the source.jar should ONLY contain the contents of the &amp;quot;source&amp;quot; subdirectory (that is, ca/odell/glazedlists/...), not the whole &amp;quot;source&amp;quot; download available from your website.&lt;br&gt;So, the source.jar should start one level deeper in the project directory tree in order to conform to maven&amp;#39;s expectations.&lt;br&gt;
&lt;br&gt;Thanks&lt;br&gt;Gerhard&lt;br&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Maven-source-jar-has-wrong-contents-tp25895801p25895801.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25846525</id>
	<title>setTableFormat for EventTableViewer</title>
	<published>2009-10-11T12:05:51Z</published>
	<updated>2009-10-11T12:05:51Z</updated>
	<author>
		<name>fab|an</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&amp;nbsp;I've implemented setTableFormat for EventTableViewer.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://gist.github.com/207822&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gist.github.com/207822&lt;/a&gt;&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;fabian</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/setTableFormat-for-EventTableViewer-tp25846525p25846525.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25771813</id>
	<title>Re: Taking back the wiki</title>
	<published>2009-10-06T09:11:22Z</published>
	<updated>2009-10-06T09:11:22Z</updated>
	<author>
		<name>Rob Eden</name>
	</author>
	<content type="html">Hi Kon -
&lt;br&gt;&lt;br&gt;A while back we moved the wiki to Google Sites. If you're still &amp;nbsp;
&lt;br&gt;looking at MediaWiki, you should update your bookmark to &amp;quot;sites.google.com/site/glazedlists/ 
&lt;br&gt;&amp;quot; (note: the link is on the GL main page).
&lt;br&gt;&lt;br&gt;We locked down who can edit the wiki to eliminate the spam, but I &amp;nbsp;
&lt;br&gt;believe we're open to inviting others interested in helping maintain &amp;nbsp;
&lt;br&gt;the wiki to do so. The intention wasn't to reduce collaboration, but &amp;nbsp;
&lt;br&gt;rather to eliminate the spam. So, if you're interested, let us know.
&lt;br&gt;&lt;br&gt;Rob
&lt;br&gt;&lt;br&gt;On Oct 6, 2009, at 4:19 AM, Kon Soulianidis wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; As an infrequent glazed lists user, I do refer back to the videos &amp;nbsp;
&lt;br&gt;&amp;gt; and wiki
&lt;br&gt;&amp;gt; from time to time.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I know previous posts on the mailing list have looked at reducing &amp;nbsp;
&lt;br&gt;&amp;gt; the spam
&lt;br&gt;&amp;gt; on the wiki but there were some issues with getting someone with the &amp;nbsp;
&lt;br&gt;&amp;gt; skills
&lt;br&gt;&amp;gt; to install a captcha plugin on the wiki.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I went to clean up some spam from the main page the other day but &amp;nbsp;
&lt;br&gt;&amp;gt; can still
&lt;br&gt;&amp;gt; see from the recent changes page that spammers are still making &amp;nbsp;
&lt;br&gt;&amp;gt; changes to
&lt;br&gt;&amp;gt; different pages.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'd like to continue to clean up more pages on the wiki, but knowing &amp;nbsp;
&lt;br&gt;&amp;gt; that
&lt;br&gt;&amp;gt; spammers will attack again, I'd like to put in place some measures &amp;nbsp;
&lt;br&gt;&amp;gt; to make
&lt;br&gt;&amp;gt; sure users from an unknown IP cant edit pages, and that it isn't so &amp;nbsp;
&lt;br&gt;&amp;gt; easy to
&lt;br&gt;&amp;gt; sign up - perhaps admin validation or having another go at &amp;nbsp;
&lt;br&gt;&amp;gt; installing the
&lt;br&gt;&amp;gt; captcha plugin for Mediawiki.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Just wanted to get an understanding from the team what the opinion &amp;nbsp;
&lt;br&gt;&amp;gt; was of
&lt;br&gt;&amp;gt; the wiki and to whether or not continue to maintain it? &amp;nbsp;If so, &amp;nbsp;
&lt;br&gt;&amp;gt; would I be
&lt;br&gt;&amp;gt; able to have access to lock the wiki down?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Kon Soulianidis
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&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=25771813&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25771813&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;/div&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=25771813&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25771813&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Taking-back-the-wiki-tp25771697p25771813.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25771795</id>
	<title>Re: Taking back the wiki</title>
	<published>2009-10-06T09:10:23Z</published>
	<updated>2009-10-06T09:10:23Z</updated>
	<author>
		<name>James Lemieux</name>
	</author>
	<content type="html">Hey Kon,&lt;br&gt;&lt;br&gt;   Our longterm solution to that spam problem was to abandon our own wiki and use a Google Site (which is working much much better). You can find it here:&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://sites.google.com/site/glazedlists/Home/whats-new/Glazed-Lists-wiki-relaunched-as-Google-site&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sites.google.com/site/glazedlists/Home/whats-new/Glazed-Lists-wiki-relaunched-as-Google-site&lt;/a&gt;&lt;br&gt;
&lt;br&gt;If we still have a link that points to the old one, let us know which and we&amp;#39;ll update it.&lt;br&gt;&lt;br&gt;James&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Tue, Oct 6, 2009 at 2:19 AM, Kon Soulianidis &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25771795&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kon@...&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,&lt;br&gt;
&lt;br&gt;
As an infrequent glazed lists user, I do refer back to the videos and wiki&lt;br&gt;
from time to time.&lt;br&gt;
&lt;br&gt;
I know previous posts on the mailing list have looked at reducing the spam&lt;br&gt;
on the wiki but there were some issues with getting someone with the skills&lt;br&gt;
to install a captcha plugin on the wiki.&lt;br&gt;
&lt;br&gt;
I went to clean up some spam from the main page the other day but can still&lt;br&gt;
see from the recent changes page that spammers are still making changes to&lt;br&gt;
different pages.&lt;br&gt;
&lt;br&gt;
I&amp;#39;d like to continue to clean up more pages on the wiki, but knowing that&lt;br&gt;
spammers will attack again, I&amp;#39;d like to put in place some measures to make&lt;br&gt;
sure users from an unknown IP cant edit pages, and that it isn&amp;#39;t so easy to&lt;br&gt;
sign up - perhaps admin validation or having another go at installing the&lt;br&gt;
captcha plugin for Mediawiki.&lt;br&gt;
&lt;br&gt;
Just wanted to get an understanding from the team what the opinion was of&lt;br&gt;
the wiki and to whether or not continue to maintain it?  If so, would I be&lt;br&gt;
able to have access to lock the wiki down?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
Kon Soulianidis&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=25771795&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25771795&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Taking-back-the-wiki-tp25771697p25771795.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25771697</id>
	<title>Taking back the wiki</title>
	<published>2009-10-06T02:19:57Z</published>
	<updated>2009-10-06T02:19:57Z</updated>
	<author>
		<name>Kon Soulianidis</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;As an infrequent glazed lists user, I do refer back to the videos and wiki
&lt;br&gt;from time to time. &amp;nbsp;
&lt;br&gt;&lt;br&gt;I know previous posts on the mailing list have looked at reducing the spam
&lt;br&gt;on the wiki but there were some issues with getting someone with the skills
&lt;br&gt;to install a captcha plugin on the wiki. &amp;nbsp;
&lt;br&gt;&lt;br&gt;I went to clean up some spam from the main page the other day but can still
&lt;br&gt;see from the recent changes page that spammers are still making changes to
&lt;br&gt;different pages. 
&lt;br&gt;&lt;br&gt;I'd like to continue to clean up more pages on the wiki, but knowing that
&lt;br&gt;spammers will attack again, I'd like to put in place some measures to make
&lt;br&gt;sure users from an unknown IP cant edit pages, and that it isn't so easy to
&lt;br&gt;sign up - perhaps admin validation or having another go at installing the
&lt;br&gt;captcha plugin for Mediawiki.
&lt;br&gt;&lt;br&gt;Just wanted to get an understanding from the team what the opinion was of
&lt;br&gt;the wiki and to whether or not continue to maintain it? &amp;nbsp;If so, would I be
&lt;br&gt;able to have access to lock the wiki down?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;Kon Soulianidis
&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=25771697&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25771697&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Taking-back-the-wiki-tp25771697p25771697.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25584032</id>
	<title>Re: Corrupted glazedlists-1.8.0_java15.jar from site</title>
	<published>2009-09-23T12:42:40Z</published>
	<updated>2009-09-23T12:42:40Z</updated>
	<author>
		<name>Holger Brands</name>
	</author>
	<content type="html">I think this is issue
&lt;br&gt;&lt;a href=&quot;https://glazedlists.dev.java.net/issues/show_bug.cgi?id=463&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://glazedlists.dev.java.net/issues/show_bug.cgi?id=463&lt;/a&gt;&lt;br&gt;which is fixed for the next release.
&lt;br&gt;&lt;br&gt;As a workaround, you could regenerate the jar index:
&lt;br&gt;&lt;br&gt;jar i &amp;lt;GL-jarfile&amp;gt;
&lt;br&gt;&lt;br&gt;Hope this helps,
&lt;br&gt;Holger
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi all
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It seems the glazedlists-1.8.0_java15.jar from
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://publicobject.com/glazedlists/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://publicobject.com/glazedlists/&lt;/a&gt;&amp;nbsp;is corrupted.
&lt;br&gt;&amp;gt; I issue with it when tried to import java class with long name package into
&lt;br&gt;&amp;gt; groovy class. More description about problem is here
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://gr8forums.org/viewtopic.php?f=19&amp;t=60&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gr8forums.org/viewtopic.php?f=19&amp;t=60&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; When I removed glazedlists-1.8.0_java15.jar from dependencies the problem
&lt;br&gt;&amp;gt; went away.
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://www.nabble.com/Corrupted-glazedlists-1.8.0_java15.jar-from-site-tp25531106p25531106.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/Corrupted-glazedlists-1.8.0_java15.jar-from-site-tp25531106p25531106.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the GlazedLists - Dev mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt; 
&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=25584032&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25584032&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
&lt;br&gt;für nur 19,99 Euro/mtl.!* &lt;a href=&quot;http://produkte.web.de/go/02/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://produkte.web.de/go/02/&lt;/a&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=25584032&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25584032&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Corrupted-glazedlists-1.8.0_java15.jar-from-site-tp25531106p25584032.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25531106</id>
	<title>Corrupted glazedlists-1.8.0_java15.jar from site</title>
	<published>2009-09-23T05:20:14Z</published>
	<updated>2009-09-23T05:20:14Z</updated>
	<author>
		<name>Artem Nakolkin</name>
	</author>
	<content type="html">Hi all
&lt;br&gt;&lt;br&gt;It seems the glazedlists-1.8.0_java15.jar from &lt;a href=&quot;http://publicobject.com/glazedlists/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://publicobject.com/glazedlists/&lt;/a&gt;&amp;nbsp;is corrupted.
&lt;br&gt;I issue with it when tried to import java class with long name package into groovy class. More description about problem is here &lt;a href=&quot;http://gr8forums.org/viewtopic.php?f=19&amp;t=60&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gr8forums.org/viewtopic.php?f=19&amp;t=60&lt;/a&gt;&lt;br&gt;&lt;br&gt;When I removed glazedlists-1.8.0_java15.jar from dependencies the problem went away.</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Corrupted-glazedlists-1.8.0_java15.jar-from-site-tp25531106p25531106.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25456066</id>
	<title>Re: selection support in GL</title>
	<published>2009-09-15T08:21:57Z</published>
	<updated>2009-09-15T08:21:57Z</updated>
	<author>
		<name>Ted Zlatanov</name>
	</author>
	<content type="html">On Wed, 02 Sep 2009 20:22:57 +0200 Holger Brands &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25456066&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hbrands@...&lt;/a&gt;&amp;gt; wrote: 
&lt;br&gt;&lt;br&gt;HB&amp;gt; What do you mean by &amp;quot;disabling the selection mapper locks the EDT&amp;quot;?
&lt;br&gt;HB&amp;gt; Does the call to table.getSelectionMapper().setEnabled(false) block
&lt;br&gt;HB&amp;gt; or what behaviour do you see?
&lt;br&gt;&lt;br&gt;It blocked the EDT, application never comes up. &amp;nbsp;I can't replicate it
&lt;br&gt;anymore; I tried several times, hence the delay in responding. &amp;nbsp;I'll
&lt;br&gt;write back if I see the EDT block again.
&lt;br&gt;&lt;br&gt;Ted
&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=25456066&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25456066&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/selection-support-in-GL-tp25174841p25456066.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25456046</id>
	<title>TextMatcherEditor.CONTAINS -&gt; CONTAINS_ANY</title>
	<published>2009-09-15T08:20:36Z</published>
	<updated>2009-09-15T08:20:36Z</updated>
	<author>
		<name>Ted Zlatanov</name>
	</author>
	<content type="html">I want to have multiple OR search terms (TextMatcherEditor.CONTAINS but
&lt;br&gt;with a OR combination).
&lt;br&gt;&lt;br&gt;Option 1: subclass to implement CONTAINS_ANY. &amp;nbsp;This is pretty painful
&lt;br&gt;because the matcher strategy class is inlined. &amp;nbsp;Has anyone done it?
&lt;br&gt;&lt;br&gt;Option 2: use the REGEX option. &amp;nbsp;Training the users is not going to be
&lt;br&gt;fun.
&lt;br&gt;&lt;br&gt;Option 3: use the seach engine. &amp;nbsp;Way too complicated for my purpose so
&lt;br&gt;I'm avoiding this.
&lt;br&gt;&lt;br&gt;I am posting this to the developer list because I think option (1) is
&lt;br&gt;the best one, and should be part of GL. &amp;nbsp;If not, sorry for the noise.
&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=25456046&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25456046&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/TextMatcherEditor.CONTAINS--%3E-CONTAINS_ANY-tp25456046p25456046.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25336548</id>
	<title>Re: Unsafe Construction in GL</title>
	<published>2009-09-07T14:23:35Z</published>
	<updated>2009-09-07T14:23:35Z</updated>
	<author>
		<name>Endre Stølsvik-8</name>
	</author>
	<content type="html">[I of course have both Effective Java and JCIP, as I guess we all do!]&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I think you might have lost my point: I specifically, twice even, stated that I don&amp;#39;t want this to be a part of &amp;quot;the public API&amp;quot;, and that the coders of GL would be totally free to completely trash my code on every revision-release when it comes to places where I&amp;#39;ve used inheritance. Document this decision in the javadoc, possibly of both class and the protected methods, and one would be good.&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Problem is that composition can&amp;#39;t fix the problem I have as GL stands. All of GL would have to be rewritten in that case. So, given these final classes and private methods, I&amp;#39;m stuck with copying the entire class to fix (add) one damn line of code. Lovely. Thus, your &amp;quot;high-flying argument&amp;quot; about composition vs. inheritance doesn&amp;#39;t help me jack.&lt;br&gt;

&lt;br&gt;&lt;/div&gt;&lt;div&gt;Also, the prohibition (finalness and private) isn&amp;#39;t consitent, and one typically extend or tailor GL by extending AbstractEventList or TransformedEventList. So the point isn&amp;#39;t valid at all, IMHO, at least as the codebase stands. Thus, opening up would make the situation better, not worse. On a rewrite, or on breaching major version, one could implement a composition logic throughout, and make everything final.&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Two situations: CollectionList takes a Model (good - composition), but the decision about which implementation of ChildElement to use is a private method (as is the the interface, and the two inner implementation classes), even though the class is NOT final. Thus, to implement &amp;quot;recursing dispose&amp;quot;, I had to copy the entire thing. For UniqueList, a simple extension would actually have fixed my problem - but here the class is final.&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Generally, on these situations, I personally feel that javadoccing the intention of inheritance not being a &amp;quot;supported means of using GL&amp;quot; is better than just messing me over by making the class final, and methods private. See, problem is that one can&amp;#39;t envision all the usage scenarios ones user have - maybe they even come up with something that really should be turned into a proper part of the API - while by making a class final, you pretty much state &amp;quot;I am just too intelligent for you, and my decision here is .. final&amp;quot;.&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;.. and GlazedLists isn&amp;#39;t in java.util quite yet, either.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Kind regards,&lt;/div&gt;&lt;div&gt;Endre.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Mon, Sep 7, 2009 at 22:04, Bruce Alspaugh &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25336548&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;compulinkltd@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;

&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;I agree that the dispose methods are a real problem. See my post:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.nabble.com/WeakReferenceProxy-td25299875.html&quot; target=&quot;_blank&quot;&gt;http://www.nabble.com/WeakReferenceProxy-td25299875.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
However, I have to defend the GL designers when they followed best practices in places where they prohibited inheritance. The central problem is that extending a class breaks encapsulation.&lt;br&gt;
&lt;br&gt;
Good API design is hard enough.  As Joshua Bloch points out[1], it is very difficult to design a class that can be safely extended because of all the problems you can run into[2].  Unlike C++, Java is a single inheritance language which significantly limits what you can do with inheritance.  Instead of extending a class, I recommend to use composition whenever possible[3]. I like his quote, &amp;quot;If a class implements some interface that captures its essence, such as Set, List, or Map, then you should feel no compunction about prohibiting subclassing.  The wrapper class pattern, described in Item 16, provides a superior alternative to inheritance for augmenting the functionality.&amp;quot; pg. 91. For GL, EventList is that interface.&lt;br&gt;


&lt;br&gt;
By the way, &amp;quot;Effective Java&amp;quot; is one of the best Java books I have ever read.  Even James Gosling himself speaks highly of it.  It should be required reading for all Java developers.  It is that good.&lt;br&gt;
&lt;br&gt;
Bruce&lt;br&gt;
&lt;br&gt;
[1] Effective Java Second Edition, Joshua Bloch&lt;br&gt;
[2] Effective Java Item 17: Design and document for inheritance or else prohibit it.&lt;br&gt;
[3] Effective Java Item 16: Favor composition over inheritance&lt;br&gt;
&lt;br&gt;
Endre Stølsvik wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;&lt;div class=&quot;im&quot;&gt;
I&amp;#39;ve also noticed the aspect the OP points out. Although I understand that it doesn&amp;#39;t really make a problem until you have errors in your code (exceptions thrown), or you have code that &amp;quot;uses&amp;quot; this escaping in some way.&lt;br&gt;


&lt;br&gt;
BUT: *Don&amp;#39;t make anything private - make it protected.* (and don&amp;#39;t use final either).&lt;br&gt;
&lt;br&gt;
There is way to much privateness in GL already. I&amp;#39;ve been in need to override some small aspects of GL now and then (primarily with the resource handling (dispose), which I am not happy with) - and I&amp;#39;ve invariably have had to copy the entire class. And if the required methods aren&amp;#39;t private - because they are a public part of the API - the class is instead final!&lt;br&gt;


&lt;br&gt;
I sense the &amp;quot;But these are implementation details that we do not want to expose!!!!&amp;quot; and &amp;quot;That is not a part of the API that we will have to maintain!!!!&amp;quot; arguments building up, so I&amp;#39;ll just dryly point out: Either I can extend these classes, or I have to copy them pretty much verbatim. Which of those strategies is &amp;quot;most exposed&amp;quot;? If you try to lock things down even more, I&amp;#39;ll just pretty much have to &amp;quot;fork&amp;quot; the entire project into my own codebase. And again - which is the worst of these two approaches?&lt;br&gt;


&lt;br&gt;
IMHO, The API is the public facing methods. That the /implementations/ are open for extension (non-final classes and protected methods instead of private) doesn&amp;#39;t make it into a part of the API as such. So feel free to ruin my extensions for every version of GL issued. ( - and it wouldn&amp;#39;t hurt sticking in some extra &amp;quot;hooks&amp;quot; either - like you already had with CollectionList.createChildElementForList(..), which of course is private).&lt;br&gt;


&lt;br&gt;
Endre.&lt;br&gt;
&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;
On Mon, Sep 7, 2009 at 17:51, Bruce Alspaugh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25336548&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;compulinkltd@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25336548&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;compulinkltd@...&lt;/a&gt;&amp;gt;&amp;gt; wrote:&lt;br&gt;


&lt;br&gt;
    I was reading a copy of Java Concurrency in Practice[1], and they&lt;br&gt;
    point out there are certain things you should never do inside a&lt;br&gt;
    constructor like call a method that could be overridden, or start a&lt;br&gt;
    thread because it can allow the this reference to escape from an&lt;br&gt;
    object before it is completely constructed.  I&amp;#39;m concerned that GL may&lt;br&gt;
    be doing something else they say you should never do in a constructor:&lt;br&gt;
     publish an inner class instance.  The example they give looks like&lt;br&gt;
    this:&lt;br&gt;
&lt;br&gt;
    public class ThisEscape {&lt;br&gt;
       public ThisEscape(EventSource source) {&lt;br&gt;
           source.registerListener(&lt;br&gt;
               new EventListener() {&lt;br&gt;
                   public void onEvent(Event e) {&lt;br&gt;
                       doSomething(e);&lt;br&gt;
                   }&lt;br&gt;
               });&lt;br&gt;
       }&lt;br&gt;
    }&lt;br&gt;
&lt;br&gt;
    When ThisEscape publishes the EventListener, it implicitly publishes&lt;br&gt;
    the enclosing ThisEscape instance as well, because inner class&lt;br&gt;
    instances contain a hidden reference to the enclosing instance.  The&lt;br&gt;
    problem is that the event source has access to the &amp;quot;this&amp;quot; reference&lt;br&gt;
    before ThisEscape has been fully constructed.  They say it is a&lt;br&gt;
    problem even if the publication is the last statement in the&lt;br&gt;
    constructor.&lt;br&gt;
&lt;br&gt;
    The workaround they recommend is to use a static factory method. It&amp;#39;s&lt;br&gt;
    OK to create a listener or a thread in a constructor, just don&amp;#39;t&lt;br&gt;
    publish or start it.&lt;br&gt;
&lt;br&gt;
    public class SafeListener {&lt;br&gt;
       private final EventListener listener;&lt;br&gt;
&lt;br&gt;
       private SafeListener() {&lt;br&gt;
           listener = new EventListener() {&lt;br&gt;
               public void onEvent(Event e) {&lt;br&gt;
                  doSomething(e);&lt;br&gt;
               }&lt;br&gt;
           };&lt;br&gt;
       }&lt;br&gt;
&lt;br&gt;
       public static SafeListener newInstance(EventSource source) {&lt;br&gt;
           SafeListener safe = new SafeListener();&lt;br&gt;
           source.registerListener(safe.listener);&lt;br&gt;
           return safe;&lt;br&gt;
       }&lt;br&gt;
    }&lt;br&gt;
&lt;br&gt;
    When I looked at the Javadoc describing the constructors for classes&lt;br&gt;
    like ObservableElementList, I was concerned that might be happening.&lt;br&gt;
    When I looked at the source for ObservableElementList and saw lines&lt;br&gt;
    like the ones below in the constructor, I became even more concerned:&lt;br&gt;
&lt;br&gt;
    public ObservableElementList(EventList&amp;lt;E&amp;gt; source, Connector&amp;lt;? super E&amp;gt;&lt;br&gt;
    elementConnector) {&lt;br&gt;
       this.elementConnector = elementConnector;&lt;br&gt;
&lt;br&gt;
       // attach this list to the element connector so the listeners know&lt;br&gt;
       // which List to notify of their modifications&lt;br&gt;
      this.elementConnector.setObservableElementList(this);&lt;br&gt;
&lt;br&gt;
      // for speed, we add all source elements together, rather than&lt;br&gt;
    individually&lt;br&gt;
       this.observedElements = new ArrayList&amp;lt;E&amp;gt;(source);&lt;br&gt;
&lt;br&gt;
       // we initialize the single EventListener registry, as we&lt;br&gt;
    optimistically&lt;br&gt;
       // assume we&amp;#39;ll be using a single listener for all observed elements&lt;br&gt;
       this.singleEventListenerRegistry = new Barcode();&lt;br&gt;
       this.singleEventListenerRegistry.addWhite(0, source.size());&lt;br&gt;
&lt;br&gt;
       // add listeners to all source list elements&lt;br&gt;
       for (int i = 0, n = size(); i &amp;lt; n; i++) {&lt;br&gt;
           // connect a listener to the element&lt;br&gt;
           final EventListener listener = this.connectElement(get(i));&lt;br&gt;
&lt;br&gt;
           // record the listener in the registry&lt;br&gt;
           this.registerListener(i, listener, false);&lt;br&gt;
       }&lt;br&gt;
&lt;br&gt;
       // begin listening to the source list&lt;br&gt;
       source.addListEventListener(this);&lt;br&gt;
    }&lt;br&gt;
&lt;br&gt;
    The elementConnector sees the &amp;quot;this&amp;quot; reference before the&lt;br&gt;
    ObservableElementList is fully constructed.  Later, every list element&lt;br&gt;
    sees the &amp;quot;this&amp;quot; reference when the listener is registered on each&lt;br&gt;
    element.  Finally, the source list sees the &amp;quot;this&amp;quot; reference in the&lt;br&gt;
    last line of the constructor.&lt;br&gt;
&lt;br&gt;
    I&amp;#39;m concerned this idiom exists throughout GL, and it may be difficult&lt;br&gt;
    to fix without API changes. To emply the suggested workaround would&lt;br&gt;
    require making the constructors private and using factory methods&lt;br&gt;
    instead.  Maybe the GL folks already know about this?&lt;br&gt;
&lt;br&gt;
    Bruce&lt;br&gt;
&lt;br&gt;
    [1] Java Concurrency in Practice, Brian Goetz, Tim Peierls, Joshua&lt;br&gt;
    Bloch, Joseph Bowbeer, David Holmes, and Doug Lea Chapter 3.2.1 Safe&lt;br&gt;
    Construction Practices, pg. 41-42&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=25336548&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;
    &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25336548&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;&amp;gt;&lt;div class=&quot;im&quot;&gt;&lt;br&gt;
    For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25336548&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;&lt;br&gt;&lt;/div&gt;
    &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25336548&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&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;
To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25336548&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25336548&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Unsafe-Construction-in-GL-tp25332557p25336548.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25335606</id>
	<title>Re: Unsafe Construction in GL</title>
	<published>2009-09-07T13:02:52Z</published>
	<updated>2009-09-07T13:02:52Z</updated>
	<author>
		<name>Compulinkltd</name>
	</author>
	<content type="html">I agree that the dispose methods are a real problem. See my post:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/WeakReferenceProxy-td25299875.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/WeakReferenceProxy-td25299875.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;However, I have to defend the GL designers when they followed best 
&lt;br&gt;practices in places where they prohibited inheritance. The central 
&lt;br&gt;problem is that extending a class breaks encapsulation.
&lt;br&gt;&lt;br&gt;Good API design is hard enough. &amp;nbsp;As Joshua Bloch points out[1], it is 
&lt;br&gt;very difficult to design a class that can be safely extended because of 
&lt;br&gt;all the problems you can run into[2]. &amp;nbsp;Unlike C++, Java is a single 
&lt;br&gt;inheritance language which significantly limits what you can do with 
&lt;br&gt;inheritance. &amp;nbsp;Instead of extending a class, I recommend to use 
&lt;br&gt;composition whenever possible[3]. I like his quote, &amp;quot;If a class 
&lt;br&gt;implements some interface that captures its essence, such as Set, List, 
&lt;br&gt;or Map, then you should feel no compunction about prohibiting 
&lt;br&gt;subclassing. &amp;nbsp;The wrapper class pattern, described in Item 16, provides 
&lt;br&gt;a superior alternative to inheritance for augmenting the functionality.&amp;quot; 
&lt;br&gt;pg. 91. For GL, EventList is that interface.
&lt;br&gt;&lt;br&gt;By the way, &amp;quot;Effective Java&amp;quot; is one of the best Java books I have ever 
&lt;br&gt;read. &amp;nbsp;Even James Gosling himself speaks highly of it. &amp;nbsp;It should be 
&lt;br&gt;required reading for all Java developers. &amp;nbsp;It is that good.
&lt;br&gt;&lt;br&gt;Bruce
&lt;br&gt;&lt;br&gt;[1] Effective Java Second Edition, Joshua Bloch
&lt;br&gt;[2] Effective Java Item 17: Design and document for inheritance or else 
&lt;br&gt;prohibit it.
&lt;br&gt;[3] Effective Java Item 16: Favor composition over inheritance
&lt;br&gt;&lt;br&gt;Endre Stølsvik wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I've also noticed the aspect the OP points out. Although I understand 
&lt;br&gt;&amp;gt; that it doesn't really make a problem until you have errors in your code 
&lt;br&gt;&amp;gt; (exceptions thrown), or you have code that &amp;quot;uses&amp;quot; this escaping in some way.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; BUT: *Don't make anything private - make it protected.* (and don't use 
&lt;br&gt;&amp;gt; final either).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; There is way to much privateness in GL already. I've been in need to 
&lt;br&gt;&amp;gt; override some small aspects of GL now and then (primarily with the 
&lt;br&gt;&amp;gt; resource handling (dispose), which I am not happy with) - and I've 
&lt;br&gt;&amp;gt; invariably have had to copy the entire class. And if the required 
&lt;br&gt;&amp;gt; methods aren't private - because they are a public part of the API - the 
&lt;br&gt;&amp;gt; class is instead final!
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I sense the &amp;quot;But these are implementation details that we do not want to 
&lt;br&gt;&amp;gt; expose!!!!&amp;quot; and &amp;quot;That is not a part of the API that we will have to 
&lt;br&gt;&amp;gt; maintain!!!!&amp;quot; arguments building up, so I'll just dryly point out: 
&lt;br&gt;&amp;gt; Either I can extend these classes, or I have to copy them pretty much 
&lt;br&gt;&amp;gt; verbatim. Which of those strategies is &amp;quot;most exposed&amp;quot;? If you try to 
&lt;br&gt;&amp;gt; lock things down even more, I'll just pretty much have to &amp;quot;fork&amp;quot; the 
&lt;br&gt;&amp;gt; entire project into my own codebase. And again - which is the worst of 
&lt;br&gt;&amp;gt; these two approaches?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; IMHO, The API is the public facing methods. That the /implementations/ 
&lt;br&gt;&amp;gt; are open for extension (non-final classes and protected methods instead 
&lt;br&gt;&amp;gt; of private) doesn't make it into a part of the API as such. So feel free 
&lt;br&gt;&amp;gt; to ruin my extensions for every version of GL issued. ( - and it 
&lt;br&gt;&amp;gt; wouldn't hurt sticking in some extra &amp;quot;hooks&amp;quot; either - like you already 
&lt;br&gt;&amp;gt; had with CollectionList.createChildElementForList(..), which of course 
&lt;br&gt;&amp;gt; is private).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Endre.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Mon, Sep 7, 2009 at 17:51, Bruce Alspaugh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25335606&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;compulinkltd@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25335606&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;compulinkltd@...&lt;/a&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; I was reading a copy of Java Concurrency in Practice[1], and they
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; point out there are certain things you should never do inside a
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; constructor like call a method that could be overridden, or start a
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; thread because it can allow the this reference to escape from an
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; object before it is completely constructed. &amp;nbsp;I'm concerned that GL may
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; be doing something else they say you should never do in a constructor:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;publish an inner class instance. &amp;nbsp;The example they give looks like
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; this:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; public class ThisEscape {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public ThisEscape(EventSource source) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;source.registerListener(
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;new EventListener() {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public void onEvent(Event e) {
&lt;br&gt;&amp;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;doSomething(e);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; When ThisEscape publishes the EventListener, it implicitly publishes
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; the enclosing ThisEscape instance as well, because inner class
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; instances contain a hidden reference to the enclosing instance. &amp;nbsp;The
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; problem is that the event source has access to the &amp;quot;this&amp;quot; reference
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; before ThisEscape has been fully constructed. &amp;nbsp;They say it is a
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; problem even if the publication is the last statement in the
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; constructor.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; The workaround they recommend is to use a static factory method. It's
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; OK to create a listener or a thread in a constructor, just don't
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; publish or start it.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; public class SafeListener {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;private final EventListener listener;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;private SafeListener() {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;listener = new EventListener() {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public void onEvent(Event e) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doSomething(e);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;};
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public static SafeListener newInstance(EventSource source) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SafeListener safe = new SafeListener();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;source.registerListener(safe.listener);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return safe;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; When I looked at the Javadoc describing the constructors for classes
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; like ObservableElementList, I was concerned that might be happening.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; When I looked at the source for ObservableElementList and saw lines
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; like the ones below in the constructor, I became even more concerned:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; public ObservableElementList(EventList&amp;lt;E&amp;gt; source, Connector&amp;lt;? super E&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; elementConnector) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.elementConnector = elementConnector;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// attach this list to the element connector so the listeners know
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// which List to notify of their modifications
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.elementConnector.setObservableElementList(this);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; // for speed, we add all source elements together, rather than
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; individually
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.observedElements = new ArrayList&amp;lt;E&amp;gt;(source);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// we initialize the single EventListener registry, as we
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; optimistically
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// assume we'll be using a single listener for all observed elements
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.singleEventListenerRegistry = new Barcode();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.singleEventListenerRegistry.addWhite(0, source.size());
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// add listeners to all source list elements
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (int i = 0, n = size(); i &amp;lt; n; i++) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// connect a listener to the element
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;final EventListener listener = this.connectElement(get(i));
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// record the listener in the registry
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.registerListener(i, listener, false);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// begin listening to the source list
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;source.addListEventListener(this);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; The elementConnector sees the &amp;quot;this&amp;quot; reference before the
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; ObservableElementList is fully constructed. &amp;nbsp;Later, every list element
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; sees the &amp;quot;this&amp;quot; reference when the listener is registered on each
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; element. &amp;nbsp;Finally, the source list sees the &amp;quot;this&amp;quot; reference in the
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; last line of the constructor.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; I'm concerned this idiom exists throughout GL, and it may be difficult
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; to fix without API changes. To emply the suggested workaround would
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; require making the constructors private and using factory methods
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; instead. &amp;nbsp;Maybe the GL folks already know about this?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Bruce
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; [1] Java Concurrency in Practice, Brian Goetz, Tim Peierls, Joshua
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Bloch, Joseph Bowbeer, David Holmes, and Doug Lea Chapter 3.2.1 Safe
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Construction Practices, pg. 41-42
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25335606&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25335606&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25335606&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25335606&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&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=25335606&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25335606&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Unsafe-Construction-in-GL-tp25332557p25335606.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25333539</id>
	<title>Re: Unsafe Construction in GL</title>
	<published>2009-09-07T10:01:15Z</published>
	<updated>2009-09-07T10:01:15Z</updated>
	<author>
		<name>Endre Stølsvik-8</name>
	</author>
	<content type="html">&lt;div&gt;I&amp;#39;ve also noticed the aspect the OP points out. Although I understand that it doesn&amp;#39;t really make a problem until you have errors in your code (exceptions thrown), or you have code that &amp;quot;uses&amp;quot; this escaping in some way.&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;BUT: &lt;b&gt;Don&amp;#39;t make anything private - make it protected.&lt;/b&gt; (and don&amp;#39;t use final either).&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;There is way to much privateness in GL already. I&amp;#39;ve been in need to override some small aspects of GL now and then (primarily with the resource handling (dispose), which I am not happy with) - and I&amp;#39;ve invariably have had to copy the entire class. And if the required methods aren&amp;#39;t private - because they are a public part of the API - the class is instead final!&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I sense the &amp;quot;But these are implementation details that we do not want to expose!!!!&amp;quot; and &amp;quot;That is not a part of the API that we will have to maintain!!!!&amp;quot; arguments building up, so I&amp;#39;ll just dryly point out: Either I can extend these classes, or I have to copy them pretty much verbatim. Which of those strategies is &amp;quot;most exposed&amp;quot;? If you try to lock things down even more, I&amp;#39;ll just pretty much have to &amp;quot;fork&amp;quot; the entire project into my own codebase. And again - which is the worst of these two approaches?&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;IMHO, The API is the public facing methods. That the /implementations/ are open for extension (non-final classes and protected methods instead of private) doesn&amp;#39;t make it into a part of the API as such. So feel free to ruin my extensions for every version of GL issued. ( - and it wouldn&amp;#39;t hurt sticking in some extra &amp;quot;hooks&amp;quot; either - like you already had with CollectionList.createChildElementForList(..), which of course is private).&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Endre.&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Mon, Sep 7, 2009 at 17:51, Bruce Alspaugh &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25333539&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;compulinkltd@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;

I was reading a copy of Java Concurrency in Practice[1], and they&lt;br&gt;
point out there are certain things you should never do inside a&lt;br&gt;
constructor like call a method that could be overridden, or start a&lt;br&gt;
thread because it can allow the this reference to escape from an&lt;br&gt;
object before it is completely constructed.  I&amp;#39;m concerned that GL may&lt;br&gt;
be doing something else they say you should never do in a constructor:&lt;br&gt;
 publish an inner class instance.  The example they give looks like&lt;br&gt;
this:&lt;br&gt;
&lt;br&gt;
public class ThisEscape {&lt;br&gt;
    public ThisEscape(EventSource source) {&lt;br&gt;
        source.registerListener(&lt;br&gt;
            new EventListener() {&lt;br&gt;
                public void onEvent(Event e) {&lt;br&gt;
                    doSomething(e);&lt;br&gt;
                }&lt;br&gt;
            });&lt;br&gt;
    }&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
When ThisEscape publishes the EventListener, it implicitly publishes&lt;br&gt;
the enclosing ThisEscape instance as well, because inner class&lt;br&gt;
instances contain a hidden reference to the enclosing instance.  The&lt;br&gt;
problem is that the event source has access to the &amp;quot;this&amp;quot; reference&lt;br&gt;
before ThisEscape has been fully constructed.  They say it is a&lt;br&gt;
problem even if the publication is the last statement in the&lt;br&gt;
constructor.&lt;br&gt;
&lt;br&gt;
The workaround they recommend is to use a static factory method. It&amp;#39;s&lt;br&gt;
OK to create a listener or a thread in a constructor, just don&amp;#39;t&lt;br&gt;
publish or start it.&lt;br&gt;
&lt;br&gt;
public class SafeListener {&lt;br&gt;
    private final EventListener listener;&lt;br&gt;
&lt;br&gt;
    private SafeListener() {&lt;br&gt;
        listener = new EventListener() {&lt;br&gt;
            public void onEvent(Event e) {&lt;br&gt;
               doSomething(e);&lt;br&gt;
            }&lt;br&gt;
        };&lt;br&gt;
    }&lt;br&gt;
&lt;br&gt;
    public static SafeListener newInstance(EventSource source) {&lt;br&gt;
        SafeListener safe = new SafeListener();&lt;br&gt;
        source.registerListener(safe.listener);&lt;br&gt;
        return safe;&lt;br&gt;
    }&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
When I looked at the Javadoc describing the constructors for classes&lt;br&gt;
like ObservableElementList, I was concerned that might be happening.&lt;br&gt;
When I looked at the source for ObservableElementList and saw lines&lt;br&gt;
like the ones below in the constructor, I became even more concerned:&lt;br&gt;
&lt;br&gt;
public ObservableElementList(EventList&amp;lt;E&amp;gt; source, Connector&amp;lt;? super E&amp;gt;&lt;br&gt;
elementConnector) {&lt;br&gt;
    this.elementConnector = elementConnector;&lt;br&gt;
&lt;br&gt;
    // attach this list to the element connector so the listeners know&lt;br&gt;
    // which List to notify of their modifications&lt;br&gt;
   this.elementConnector.setObservableElementList(this);&lt;br&gt;
&lt;br&gt;
   // for speed, we add all source elements together, rather than individually&lt;br&gt;
    this.observedElements = new ArrayList&amp;lt;E&amp;gt;(source);&lt;br&gt;
&lt;br&gt;
    // we initialize the single EventListener registry, as we optimistically&lt;br&gt;
    // assume we&amp;#39;ll be using a single listener for all observed elements&lt;br&gt;
    this.singleEventListenerRegistry = new Barcode();&lt;br&gt;
    this.singleEventListenerRegistry.addWhite(0, source.size());&lt;br&gt;
&lt;br&gt;
    // add listeners to all source list elements&lt;br&gt;
    for (int i = 0, n = size(); i &amp;lt; n; i++) {&lt;br&gt;
        // connect a listener to the element&lt;br&gt;
        final EventListener listener = this.connectElement(get(i));&lt;br&gt;
&lt;br&gt;
        // record the listener in the registry&lt;br&gt;
        this.registerListener(i, listener, false);&lt;br&gt;
    }&lt;br&gt;
&lt;br&gt;
    // begin listening to the source list&lt;br&gt;
    source.addListEventListener(this);&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
The elementConnector sees the &amp;quot;this&amp;quot; reference before the&lt;br&gt;
ObservableElementList is fully constructed.  Later, every list element&lt;br&gt;
sees the &amp;quot;this&amp;quot; reference when the listener is registered on each&lt;br&gt;
element.  Finally, the source list sees the &amp;quot;this&amp;quot; reference in the&lt;br&gt;
last line of the constructor.&lt;br&gt;
&lt;br&gt;
I&amp;#39;m concerned this idiom exists throughout GL, and it may be difficult&lt;br&gt;
to fix without API changes. To emply the suggested workaround would&lt;br&gt;
require making the constructors private and using factory methods&lt;br&gt;
instead.  Maybe the GL folks already know about this?&lt;br&gt;
&lt;br&gt;
Bruce&lt;br&gt;
&lt;br&gt;
[1] Java Concurrency in Practice, Brian Goetz, Tim Peierls, Joshua&lt;br&gt;
Bloch, Joseph Bowbeer, David Holmes, and Doug Lea Chapter 3.2.1 Safe&lt;br&gt;
Construction Practices, pg. 41-42&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=25333539&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25333539&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Unsafe-Construction-in-GL-tp25332557p25333539.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25332557</id>
	<title>Unsafe Construction in GL</title>
	<published>2009-09-07T08:51:41Z</published>
	<updated>2009-09-07T08:51:41Z</updated>
	<author>
		<name>Compulinkltd</name>
	</author>
	<content type="html">I was reading a copy of Java Concurrency in Practice[1], and they
&lt;br&gt;point out there are certain things you should never do inside a
&lt;br&gt;constructor like call a method that could be overridden, or start a
&lt;br&gt;thread because it can allow the this reference to escape from an
&lt;br&gt;object before it is completely constructed. &amp;nbsp;I'm concerned that GL may
&lt;br&gt;be doing something else they say you should never do in a constructor:
&lt;br&gt;&amp;nbsp;publish an inner class instance. &amp;nbsp;The example they give looks like
&lt;br&gt;this:
&lt;br&gt;&lt;br&gt;public class ThisEscape {
&lt;br&gt;&amp;nbsp; &amp;nbsp; public ThisEscape(EventSource source) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; source.registerListener(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new EventListener() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void onEvent(Event e) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doSomething(e);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;When ThisEscape publishes the EventListener, it implicitly publishes
&lt;br&gt;the enclosing ThisEscape instance as well, because inner class
&lt;br&gt;instances contain a hidden reference to the enclosing instance. &amp;nbsp;The
&lt;br&gt;problem is that the event source has access to the &amp;quot;this&amp;quot; reference
&lt;br&gt;before ThisEscape has been fully constructed. &amp;nbsp;They say it is a
&lt;br&gt;problem even if the publication is the last statement in the
&lt;br&gt;constructor.
&lt;br&gt;&lt;br&gt;The workaround they recommend is to use a static factory method. It's
&lt;br&gt;OK to create a listener or a thread in a constructor, just don't
&lt;br&gt;publish or start it.
&lt;br&gt;&lt;br&gt;public class SafeListener {
&lt;br&gt;&amp;nbsp; &amp;nbsp; private final EventListener listener;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; private SafeListener() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; listener = new EventListener() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void onEvent(Event e) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;doSomething(e);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public static SafeListener newInstance(EventSource source) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SafeListener safe = new SafeListener();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; source.registerListener(safe.listener);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return safe;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;When I looked at the Javadoc describing the constructors for classes
&lt;br&gt;like ObservableElementList, I was concerned that might be happening.
&lt;br&gt;When I looked at the source for ObservableElementList and saw lines
&lt;br&gt;like the ones below in the constructor, I became even more concerned:
&lt;br&gt;&lt;br&gt;public ObservableElementList(EventList&amp;lt;E&amp;gt; source, Connector&amp;lt;? super E&amp;gt;
&lt;br&gt;elementConnector) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; this.elementConnector = elementConnector;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; // attach this list to the element connector so the listeners know
&lt;br&gt;&amp;nbsp; &amp;nbsp; // which List to notify of their modifications
&lt;br&gt;&amp;nbsp; &amp;nbsp;this.elementConnector.setObservableElementList(this);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;// for speed, we add all source elements together, rather than individually
&lt;br&gt;&amp;nbsp; &amp;nbsp; this.observedElements = new ArrayList&amp;lt;E&amp;gt;(source);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; // we initialize the single EventListener registry, as we optimistically
&lt;br&gt;&amp;nbsp; &amp;nbsp; // assume we'll be using a single listener for all observed elements
&lt;br&gt;&amp;nbsp; &amp;nbsp; this.singleEventListenerRegistry = new Barcode();
&lt;br&gt;&amp;nbsp; &amp;nbsp; this.singleEventListenerRegistry.addWhite(0, source.size());
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; // add listeners to all source list elements
&lt;br&gt;&amp;nbsp; &amp;nbsp; for (int i = 0, n = size(); i &amp;lt; n; i++) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // connect a listener to the element
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final EventListener listener = this.connectElement(get(i));
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // record the listener in the registry
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.registerListener(i, listener, false);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; // begin listening to the source list
&lt;br&gt;&amp;nbsp; &amp;nbsp; source.addListEventListener(this);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;The elementConnector sees the &amp;quot;this&amp;quot; reference before the
&lt;br&gt;ObservableElementList is fully constructed. &amp;nbsp;Later, every list element
&lt;br&gt;sees the &amp;quot;this&amp;quot; reference when the listener is registered on each
&lt;br&gt;element. &amp;nbsp;Finally, the source list sees the &amp;quot;this&amp;quot; reference in the
&lt;br&gt;last line of the constructor.
&lt;br&gt;&lt;br&gt;I'm concerned this idiom exists throughout GL, and it may be difficult
&lt;br&gt;to fix without API changes. To emply the suggested workaround would
&lt;br&gt;require making the constructors private and using factory methods
&lt;br&gt;instead. &amp;nbsp;Maybe the GL folks already know about this?
&lt;br&gt;&lt;br&gt;Bruce
&lt;br&gt;&lt;br&gt;[1] Java Concurrency in Practice, Brian Goetz, Tim Peierls, Joshua
&lt;br&gt;Bloch, Joseph Bowbeer, David Holmes, and Doug Lea Chapter 3.2.1 Safe
&lt;br&gt;Construction Practices, pg. 41-42
&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=25332557&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25332557&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Unsafe-Construction-in-GL-tp25332557p25332557.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25262968</id>
	<title>Re: selection support in GL</title>
	<published>2009-09-02T11:22:57Z</published>
	<updated>2009-09-02T11:22:57Z</updated>
	<author>
		<name>Holger Brands</name>
	</author>
	<content type="html">Hey Ted,
&lt;br&gt;&lt;br&gt;what I was trying to say was, that the only supported approaches
&lt;br&gt;for integrating GL with SwingX are the ones listed on the wiki page.
&lt;br&gt;&lt;br&gt;You're free to try something different, but you can't expect it to work
&lt;br&gt;out of the box ;-)
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; As I mentioned in my earlier post, disabling the selection mapper locks
&lt;br&gt;&amp;gt; the EDT. &amp;nbsp;I can research further if you need me to--does it work for
&lt;br&gt;&amp;gt; you?
&lt;br&gt;&lt;br&gt;What do you mean by &amp;quot;disabling the selection mapper locks the EDT&amp;quot;?
&lt;br&gt;Does the call to table.getSelectionMapper().setEnabled(false) block
&lt;br&gt;or what behaviour do you see?
&lt;br&gt;&lt;br&gt;I tried your (modified) two examples on Windows XP with JDK 1.5u7 and 1.6u11
&lt;br&gt;with SwingX 1.0 and the latest GL build without problems.
&lt;br&gt;&lt;br&gt;In the first example, I only added the call to
&lt;br&gt;table.getSelectionMapper().setEnabled(false)
&lt;br&gt;I modified the second example to use the TableComparatorChooser approach.
&lt;br&gt;&lt;br&gt;If you could provide an executable example with instructions on how to
&lt;br&gt;reproduce the issue, we'd be happy to have a look at it.
&lt;br&gt;(But I have access to a Windows box only)
&lt;br&gt;&lt;br&gt;&amp;gt; Also I don't see why the selection mapper has to be disabled--my whole
&lt;br&gt;&amp;gt; point below the example was that I'd like to use the JXTable facilities
&lt;br&gt;&amp;gt; to sort and filter, instead of layering SortedList and FilterList
&lt;br&gt;&amp;gt; adapters. &amp;nbsp;There should be a simple way to do that with the stock
&lt;br&gt;&amp;gt; DefaultEventSelectionModel, converting every index to the model index.
&lt;br&gt;&amp;gt; If not I can write my own version I guess, but I was hoping to avoid
&lt;br&gt;&amp;gt; that.
&lt;br&gt;&lt;br&gt;Jesse is the author of the SwingX extension.
&lt;br&gt;I think he knows best why things work this way currently.
&lt;br&gt;But if you find a more elegant solution, we'd of course be interested ;-)
&lt;br&gt;&lt;br&gt;Holger
&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
&lt;br&gt;für nur 19,99 Euro/mtl.!* &lt;a href=&quot;http://produkte.web.de/go/02/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://produkte.web.de/go/02/&lt;/a&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=25262968&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25262968&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/selection-support-in-GL-tp25174841p25262968.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25258974</id>
	<title>Re: selection support in GL</title>
	<published>2009-09-02T07:43:28Z</published>
	<updated>2009-09-02T07:43:28Z</updated>
	<author>
		<name>Ted Zlatanov</name>
	</author>
	<content type="html">On Wed, 2 Sep 2009 13:15:17 +0200 Endre Stølsvik &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25258974&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java@...&lt;/a&gt;&amp;gt; wrote: 
&lt;br&gt;&lt;br&gt;ES&amp;gt; Just a quick note on JXTable: I thought they currently were in the process
&lt;br&gt;ES&amp;gt; of completely ripping out all their sorting and filtering, and building it
&lt;br&gt;ES&amp;gt; up again with JDK 6 stuff for the next version (and possible inclusion in
&lt;br&gt;ES&amp;gt; Java 7 or how that was again..)? Just a heads-up if you weren't aware of it
&lt;br&gt;ES&amp;gt; - and if I'm right.
&lt;br&gt;&lt;br&gt;Yeah, all of SwingX is in limbo after the 1.0 release and they are
&lt;br&gt;planning to synchronize with JDK 6. &amp;nbsp;I had a few exchanges with the
&lt;br&gt;SwingX developers
&lt;br&gt;(e.g. &lt;a href=&quot;http://forums.java.net/jive/thread.jspa?messageID=352381&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://forums.java.net/jive/thread.jspa?messageID=352381&lt;/a&gt;) and it
&lt;br&gt;looks like these rewrites are far in the future.
&lt;br&gt;&lt;br&gt;I think all of Java is going to be in a transition for a bit with the
&lt;br&gt;Oracle purchase and the Java team may discover new priorities, so for
&lt;br&gt;now the best direction seems to be to work with the existing libraries.
&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=25258974&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25258974&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/selection-support-in-GL-tp25174841p25258974.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25255557</id>
	<title>Re: selection support in GL</title>
	<published>2009-09-02T04:15:17Z</published>
	<updated>2009-09-02T04:15:17Z</updated>
	<author>
		<name>Endre Stølsvik-8</name>
	</author>
	<content type="html">Just a quick note on JXTable: I thought they currently were in the process of completely ripping out all their sorting and filtering, and building it up again with JDK 6 stuff for the next version (and possible inclusion in Java 7 or how that was again..)? Just a heads-up if you weren&amp;#39;t aware of it - and if I&amp;#39;m right.&lt;div&gt;


&lt;br&gt;&lt;/div&gt;&lt;div&gt;Endre.&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;2009/9/1 Ted Zlatanov &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25255557&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tzz@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;


On Tue, 01 Sep 2009 21:34:18 +0200 Holger Brands &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25255557&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hbrands@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&lt;br&gt;
HB&amp;gt; Hi Ted,&lt;br&gt;
HB&amp;gt; in both examples you posted, you use DefaultEventSelectionModel with JXTable,&lt;br&gt;
HB&amp;gt; but I don&amp;#39;t see where you disable the selection mapper.&lt;br&gt;
HB&amp;gt; The link I quoted states under section &amp;quot;Maintaining selection&amp;quot;:&lt;br&gt;
&lt;br&gt;
HB&amp;gt; &amp;quot;It is necessary to disable the SelectionMapper to use JXTable with Glazed Lists.&lt;br&gt;
HB&amp;gt; Otherwise, the SelectionMapper competes with Glazed Lists&amp;#39; own selection management,&lt;br&gt;
HB&amp;gt; and selection is left in an inconsistent state.&amp;quot;&lt;br&gt;
&lt;br&gt;
As I mentioned in my earlier post, disabling the selection mapper locks&lt;br&gt;
the EDT.  I can research further if you need me to--does it work for&lt;br&gt;
you?&lt;br&gt;
&lt;br&gt;
Also I don&amp;#39;t see why the selection mapper has to be disabled--my whole&lt;br&gt;
point below the example was that I&amp;#39;d like to use the JXTable facilities&lt;br&gt;
to sort and filter, instead of layering SortedList and FilterList&lt;br&gt;
adapters.  There should be a simple way to do that with the stock&lt;br&gt;
DefaultEventSelectionModel, converting every index to the model index.&lt;br&gt;
If not I can write my own version I guess, but I was hoping to avoid&lt;br&gt;
that.&lt;br&gt;
&lt;br&gt;
Ted&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;
&amp;gt;&amp;gt; On Sat, 29 Aug 2009 12:28:50 +0200 Holger Brands &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25255557&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hbrands@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
HB&amp;gt; there is some info about SwingX and GL here:&lt;br&gt;
HB&amp;gt; &lt;a href=&quot;http://sites.google.com/site/glazedlists/documentation/swingx&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://sites.google.com/site/glazedlists/documentation/swingx&lt;/a&gt;&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; First of all, GL is great.  This is just one case where it&amp;#39;s been hard&lt;br&gt;
&amp;gt;&amp;gt; to use.  I would not go back to non-GL programming, it would be painful.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; I tried the suggested&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; EventListJXTableSorting sorting = EventListJXTableSorting.install(t, beans);&lt;br&gt;
&amp;gt;&amp;gt; sorting.setMultipleColumnSort(true);&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; but got many illegal state and null pointer errors, e.g. below.  I also&lt;br&gt;
&amp;gt;&amp;gt; don&amp;#39;t like all the caveats and limitations of the suggested approaches.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; java.lang.IllegalStateException: Cannot combine reorder with other change events&lt;br&gt;
&amp;gt;&amp;gt; at ca.odell.glazedlists.event.ListEventAssembler.reorder(ListEventAssembler.java:246)&lt;br&gt;
&amp;gt;&amp;gt; at ca.odell.glazedlists.ListSelection.addSelectedReorder(ListSelection.java:852)&lt;br&gt;
&amp;gt;&amp;gt; at ca.odell.glazedlists.ListSelection.listChanged(ListSelection.java:172)&lt;br&gt;
&amp;gt;&amp;gt; at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:412)&lt;br&gt;
&amp;gt;&amp;gt; at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:409)&lt;br&gt;
&amp;gt;&amp;gt; at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher$SubjectAndListener.firePendingEvent(SequenceDependenciesEventPublisher.java:445)&lt;br&gt;
&amp;gt;&amp;gt; at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.fireEvent(SequenceDependenciesEventPublisher.java:344)&lt;br&gt;
&amp;gt;&amp;gt; at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:316)&lt;br&gt;
&amp;gt;&amp;gt; at ca.odell.glazedlists.SortedList.setComparator(SortedList.java:481)&lt;br&gt;
&amp;gt;&amp;gt; at ca.odell.glazedlists.swing.EventListJXTableSorting$EventListSortController.setSortKeys(EventListJXTableSorting.java:228)&lt;br&gt;
&amp;gt;&amp;gt; at ca.odell.glazedlists.swing.EventListJXTableSorting$EventListSortController.toggleSortOrder(EventListJXTableSorting.java:192)&lt;br&gt;
&amp;gt;&amp;gt; at org.jdesktop.swingx.JXTable.toggleSortOrder(JXTable.java:2046)&lt;br&gt;
&amp;gt;&amp;gt; at org.jdesktop.swingx.JXTableHeader$HeaderListener.doSort(JXTableHeader.java:608)&lt;br&gt;
&amp;gt;&amp;gt; at org.jdesktop.swingx.JXTableHeader$HeaderListener.mouseClicked(JXTableHeader.java:589)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:252)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Component.processMouseEvent(Component.java:6266)&lt;br&gt;
&amp;gt;&amp;gt; at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Component.processEvent(Component.java:6028)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Container.processEvent(Container.java:2041)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Component.dispatchEventImpl(Component.java:4630)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Container.dispatchEventImpl(Container.java:2099)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Component.dispatchEvent(Component.java:4460)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Container.dispatchEventImpl(Container.java:2085)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Window.dispatchEventImpl(Window.java:2475)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Component.dispatchEvent(Component.java:4460)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Dialog$1.run(Dialog.java:1045)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Dialog$3.run(Dialog.java:1097)&lt;br&gt;
&amp;gt;&amp;gt; at java.security.AccessController.doPrivileged(Native Method)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Dialog.show(Dialog.java:1095)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Component.show(Component.java:1563)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Component.setVisible(Component.java:1515)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Window.setVisible(Window.java:841)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.Dialog.setVisible(Dialog.java:985)&lt;br&gt;
&amp;gt;&amp;gt; at com.jump.simple.Out.show(Out.java:851)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)&lt;br&gt;
&amp;gt;&amp;gt; at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; This is the code I tried (see below for version without the EventListJXTableSorting):&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; try&lt;br&gt;
&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt; SwingUtilities.invokeAndWait(new Runnable()&lt;br&gt;
&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt; public void run()&lt;br&gt;
&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt; EventList&amp;lt;JLabel&amp;gt; labels = GlazedLists.eventListOf(new JLabel(&amp;quot;a&amp;quot;), new JLabel(&amp;quot;b&amp;quot;), new JLabel(&amp;quot;c&amp;quot;), new JLabel(&amp;quot;d&amp;quot;));&lt;br&gt;
&amp;gt;&amp;gt; ObservableElementList.Connector&amp;lt;JLabel&amp;gt; labelConnector = GlazedLists.beanConnector(JLabel.class);&lt;br&gt;
&amp;gt;&amp;gt; SortedList&amp;lt;JLabel&amp;gt; beans = new SortedList&amp;lt;JLabel&amp;gt;(new ObservableElementList&amp;lt;JLabel&amp;gt;(labels, labelConnector), new Comparator&amp;lt;JLabel&amp;gt;()&lt;br&gt;
&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt; public int compare(JLabel o1, JLabel o2)&lt;br&gt;
&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt; return o1.getText().compareTo(o2.getText());&lt;br&gt;
&amp;gt;&amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt; });&lt;br&gt;
&amp;gt;&amp;gt; // build a JTable&lt;br&gt;
&amp;gt;&amp;gt; String[] propertyNames = { &amp;quot;text&amp;quot;, };&lt;br&gt;
&amp;gt;&amp;gt; TableFormat&amp;lt;JLabel&amp;gt; ltf = GlazedLists.tableFormat(JLabel.class, propertyNames, propertyNames);&lt;br&gt;
&amp;gt;&amp;gt; final JXTable t = new JXTable(new DefaultEventTableModel&amp;lt;JLabel&amp;gt;(beans, ltf));&lt;br&gt;
&amp;gt;&amp;gt; final JLabel view_selected = new JLabel(&amp;quot;wrong&amp;quot;);&lt;br&gt;
&amp;gt;&amp;gt; final JLabel real_selected = new JLabel(&amp;quot;right&amp;quot;);&lt;br&gt;
&amp;gt;&amp;gt; DefaultEventSelectionModel&amp;lt;JLabel&amp;gt; selModel = new DefaultEventSelectionModel&amp;lt;JLabel&amp;gt;(beans);&lt;br&gt;
&amp;gt;&amp;gt; t.setSelectionModel(selModel);&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; EventListJXTableSorting sorting = EventListJXTableSorting.install(t, beans);&lt;br&gt;
&amp;gt;&amp;gt; sorting.setMultipleColumnSort(true);&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; t.getSelectionModel().addListSelectionListener(new ListSelectionListener()&lt;br&gt;
&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt; public void valueChanged(ListSelectionEvent e)&lt;br&gt;
&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt; int[] rows = t.getSelectedRows();&lt;br&gt;
&amp;gt;&amp;gt; int sel = rows.length &amp;lt; 1 ? -1 : rows[0];&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; view_selected.setText(&amp;quot;&amp;quot; + sel);&lt;br&gt;
&amp;gt;&amp;gt; real_selected.setText(&amp;quot;&amp;quot; + t.convertRowIndexToModel(sel));&lt;br&gt;
&amp;gt;&amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt; });&lt;br&gt;
&amp;gt;&amp;gt; JPanel show = new JPanel(new GridLayout(0, 1));&lt;br&gt;
&amp;gt;&amp;gt; JList selList = new JList(new DefaultEventListModel&amp;lt;JLabel&amp;gt;(selModel.getSelected()));&lt;br&gt;
&amp;gt;&amp;gt; selList.setCellRenderer(new DefaultListCellRenderer()&lt;br&gt;
&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt; public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)&lt;br&gt;
&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt; JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);&lt;br&gt;
&amp;gt;&amp;gt; label.setText(((JLabel) value).getText());&lt;br&gt;
&amp;gt;&amp;gt; return label;&lt;br&gt;
&amp;gt;&amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt; });&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; show.add(new JScrollPane(t));&lt;br&gt;
&amp;gt;&amp;gt; show.add(new JScrollPane(selList));&lt;br&gt;
&amp;gt;&amp;gt; show.add(view_selected);&lt;br&gt;
&amp;gt;&amp;gt; show.add(real_selected);&lt;br&gt;
&amp;gt;&amp;gt; Out.show(800, 600, show);&lt;br&gt;
&amp;gt;&amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt; });&lt;br&gt;
&amp;gt;&amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt; catch (Exception e)&lt;br&gt;
&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt; e.printStackTrace();&lt;br&gt;
&amp;gt;&amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
HB&amp;gt; I think there are some users combining SwingX with GL without problems,&lt;br&gt;
HB&amp;gt; so to help you with your problem we need to know:&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
HB&amp;gt; Which versions of SwingX and GL do you use?&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
HB&amp;gt; How did you setup your JXTable?&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
HB&amp;gt; A test program that demonstrates your issue would be ideal.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Here&amp;#39;s a simple example using JLabel lists.  I&amp;#39;m using the latest dev&lt;br&gt;
&amp;gt;&amp;gt; snapshot of glazed lists and the 1.0 SwingX release.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; EventList&amp;lt;JLabel&amp;gt; labels = GlazedLists.eventListOf(new JLabel(&amp;quot;a&amp;quot;), new JLabel(&amp;quot;b&amp;quot;), new JLabel(&amp;quot;c&amp;quot;), new JLabel(&amp;quot;d&amp;quot;));&lt;br&gt;
&amp;gt;&amp;gt; ObservableElementList.Connector&amp;lt;JLabel&amp;gt; labelConnector = GlazedLists.beanConnector(JLabel.class);&lt;br&gt;
&amp;gt;&amp;gt; ObservableElementList&amp;lt;JLabel&amp;gt; beans = new ObservableElementList&amp;lt;JLabel&amp;gt;(labels, labelConnector);&lt;br&gt;
&amp;gt;&amp;gt; // build a JTable&lt;br&gt;
&amp;gt;&amp;gt; String[] propertyNames = {&amp;quot;text&amp;quot;,};&lt;br&gt;
&amp;gt;&amp;gt; TableFormat&amp;lt;JLabel&amp;gt; ltf = GlazedLists.tableFormat(JLabel.class, propertyNames, propertyNames);&lt;br&gt;
&amp;gt;&amp;gt; final JXTable t = new JXTable(new DefaultEventTableModel&amp;lt;JLabel&amp;gt;(beans, ltf));&lt;br&gt;
&amp;gt;&amp;gt; final JLabel view_selected = new JLabel(&amp;quot;wrong&amp;quot;);&lt;br&gt;
&amp;gt;&amp;gt; final JLabel real_selected = new JLabel(&amp;quot;right&amp;quot;);&lt;br&gt;
&amp;gt;&amp;gt; DefaultEventSelectionModel&amp;lt;JLabel&amp;gt; selModel = new DefaultEventSelectionModel&amp;lt;JLabel&amp;gt;(beans);&lt;br&gt;
&amp;gt;&amp;gt; t.setSelectionModel(selModel);&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; t.getSelectionModel().addListSelectionListener(new ListSelectionListener()&lt;br&gt;
&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt; public void valueChanged(ListSelectionEvent e)&lt;br&gt;
&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt; int[] rows = t.getSelectedRows();&lt;br&gt;
&amp;gt;&amp;gt; int sel = rows.length &amp;lt; 1 ? -1 : rows[0];&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; view_selected.setText(&amp;quot;&amp;quot;+sel);&lt;br&gt;
&amp;gt;&amp;gt; real_selected.setText(&amp;quot;&amp;quot;+t.convertRowIndexToModel(sel));&lt;br&gt;
&amp;gt;&amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt; });&lt;br&gt;
&amp;gt;&amp;gt; JPanel show = new JPanel(new GridLayout(0, 1));&lt;br&gt;
&amp;gt;&amp;gt; JList selList = new JList(new DefaultEventListModel&amp;lt;JLabel&amp;gt;(selModel.getSelected()));&lt;br&gt;
&amp;gt;&amp;gt; selList.setCellRenderer(new DefaultListCellRenderer()&lt;br&gt;
&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt; public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)&lt;br&gt;
&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt; JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);&lt;br&gt;
&amp;gt;&amp;gt; label.setText(((JLabel)value).getText());&lt;br&gt;
&amp;gt;&amp;gt; return label;&lt;br&gt;
&amp;gt;&amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt; });&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; show.add(new JScrollPane(t));&lt;br&gt;
&amp;gt;&amp;gt; show.add(new JScrollPane(selList));&lt;br&gt;
&amp;gt;&amp;gt; show.add(view_selected);&lt;br&gt;
&amp;gt;&amp;gt; show.add(real_selected);&lt;br&gt;
&amp;gt;&amp;gt; // show the JPanel now&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; When unsorted, everything works.  If you reverse-sort, though, selecting&lt;br&gt;
&amp;gt;&amp;gt; elements 0 and 1 (&amp;quot;d&amp;quot; and &amp;quot;c&amp;quot;) results in the selected list being &amp;quot;a&amp;quot;&lt;br&gt;
&amp;gt;&amp;gt; and &amp;quot;b&amp;quot; (the view coordinates).  The selection model needs to ask the&lt;br&gt;
&amp;gt;&amp;gt; table to convert view rows to model rows, basically.  I show this in the&lt;br&gt;
&amp;gt;&amp;gt; real_selected vs. view_selected labels.  The code has an exception for&lt;br&gt;
&amp;gt;&amp;gt; -1 (nothing selected) but I didn&amp;#39;t want to spend time polishing&lt;br&gt;
&amp;gt;&amp;gt; irrelevant cases.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; My question, then, is: why not modify the DefaultEventSelectionModel to&lt;br&gt;
&amp;gt;&amp;gt; ask the JXTable for the model coordinates of the selected data?  At the&lt;br&gt;
&amp;gt;&amp;gt; leat, mention that possibility in the SwingX compatiblity docs.  I think&lt;br&gt;
&amp;gt;&amp;gt; EventListJXTableSorting is too complicated and limiting for users who&lt;br&gt;
&amp;gt;&amp;gt; like the JXTable sorting and filtering, plus as I showed it had some&lt;br&gt;
&amp;gt;&amp;gt; issues (perhaps due to my inexperience using it).&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; I would also suggest the docs for DefaultEventSelectionModel should&lt;br&gt;
&amp;gt;&amp;gt; mention the SwingX issues clearly.  If those issues are in the bug list,&lt;br&gt;
&amp;gt;&amp;gt; point that out next to the bug URL.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Thanks!&lt;br&gt;
&amp;gt;&amp;gt; Ted&lt;br&gt;
&amp;gt;&amp;gt;&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=25255557&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25255557&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;HB&amp;gt; ______________________________________________________&lt;br&gt;
HB&amp;gt; GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!&lt;br&gt;
HB&amp;gt; Jetzt freischalten unter &lt;a href=&quot;http://movieflat.web.de&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://movieflat.web.de&lt;/a&gt;&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&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=25255557&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25255557&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/selection-support-in-GL-tp25174841p25255557.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25247525</id>
	<title>Re: selection support in GL</title>
	<published>2009-09-01T14:11:37Z</published>
	<updated>2009-09-01T14:11:37Z</updated>
	<author>
		<name>Ted Zlatanov</name>
	</author>
	<content type="html">On Tue, 01 Sep 2009 21:34:18 +0200 Holger Brands &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25247525&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hbrands@...&lt;/a&gt;&amp;gt; wrote: 
&lt;br&gt;&lt;br&gt;HB&amp;gt; Hi Ted,
&lt;br&gt;HB&amp;gt; in both examples you posted, you use DefaultEventSelectionModel with JXTable,
&lt;br&gt;HB&amp;gt; but I don't see where you disable the selection mapper.
&lt;br&gt;HB&amp;gt; The link I quoted states under section &amp;quot;Maintaining selection&amp;quot;:
&lt;br&gt;&lt;br&gt;HB&amp;gt; &amp;quot;It is necessary to disable the SelectionMapper to use JXTable with Glazed Lists.
&lt;br&gt;HB&amp;gt; Otherwise, the SelectionMapper competes with Glazed Lists' own selection management,
&lt;br&gt;HB&amp;gt; and selection is left in an inconsistent state.&amp;quot;
&lt;br&gt;&lt;br&gt;As I mentioned in my earlier post, disabling the selection mapper locks
&lt;br&gt;the EDT. &amp;nbsp;I can research further if you need me to--does it work for
&lt;br&gt;you?
&lt;br&gt;&lt;br&gt;Also I don't see why the selection mapper has to be disabled--my whole
&lt;br&gt;point below the example was that I'd like to use the JXTable facilities
&lt;br&gt;to sort and filter, instead of layering SortedList and FilterList
&lt;br&gt;adapters. &amp;nbsp;There should be a simple way to do that with the stock
&lt;br&gt;DefaultEventSelectionModel, converting every index to the model index.
&lt;br&gt;If not I can write my own version I guess, but I was hoping to avoid
&lt;br&gt;that.
&lt;br&gt;&lt;br&gt;Ted
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; On Sat, 29 Aug 2009 12:28:50 +0200 Holger Brands &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25247525&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hbrands@...&lt;/a&gt;&amp;gt; wrote: 
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;HB&amp;gt; there is some info about SwingX and GL here:
&lt;br&gt;HB&amp;gt; &lt;a href=&quot;http://sites.google.com/site/glazedlists/documentation/swingx&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sites.google.com/site/glazedlists/documentation/swingx&lt;/a&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; First of all, GL is great. &amp;nbsp;This is just one case where it's been hard
&lt;br&gt;&amp;gt;&amp;gt; to use. &amp;nbsp;I would not go back to non-GL programming, it would be painful.
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; I tried the suggested
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; EventListJXTableSorting sorting = EventListJXTableSorting.install(t, beans);
&lt;br&gt;&amp;gt;&amp;gt; sorting.setMultipleColumnSort(true);
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; but got many illegal state and null pointer errors, e.g. below. &amp;nbsp;I also
&lt;br&gt;&amp;gt;&amp;gt; don't like all the caveats and limitations of the suggested approaches.
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; java.lang.IllegalStateException: Cannot combine reorder with other change events
&lt;br&gt;&amp;gt;&amp;gt; at ca.odell.glazedlists.event.ListEventAssembler.reorder(ListEventAssembler.java:246)
&lt;br&gt;&amp;gt;&amp;gt; at ca.odell.glazedlists.ListSelection.addSelectedReorder(ListSelection.java:852)
&lt;br&gt;&amp;gt;&amp;gt; at ca.odell.glazedlists.ListSelection.listChanged(ListSelection.java:172)
&lt;br&gt;&amp;gt;&amp;gt; at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:412)
&lt;br&gt;&amp;gt;&amp;gt; at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:409)
&lt;br&gt;&amp;gt;&amp;gt; at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher$SubjectAndListener.firePendingEvent(SequenceDependenciesEventPublisher.java:445)
&lt;br&gt;&amp;gt;&amp;gt; at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.fireEvent(SequenceDependenciesEventPublisher.java:344)
&lt;br&gt;&amp;gt;&amp;gt; at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:316)
&lt;br&gt;&amp;gt;&amp;gt; at ca.odell.glazedlists.SortedList.setComparator(SortedList.java:481)
&lt;br&gt;&amp;gt;&amp;gt; at ca.odell.glazedlists.swing.EventListJXTableSorting$EventListSortController.setSortKeys(EventListJXTableSorting.java:228)
&lt;br&gt;&amp;gt;&amp;gt; at ca.odell.glazedlists.swing.EventListJXTableSorting$EventListSortController.toggleSortOrder(EventListJXTableSorting.java:192)
&lt;br&gt;&amp;gt;&amp;gt; at org.jdesktop.swingx.JXTable.toggleSortOrder(JXTable.java:2046)
&lt;br&gt;&amp;gt;&amp;gt; at org.jdesktop.swingx.JXTableHeader$HeaderListener.doSort(JXTableHeader.java:608)
&lt;br&gt;&amp;gt;&amp;gt; at org.jdesktop.swingx.JXTableHeader$HeaderListener.mouseClicked(JXTableHeader.java:589)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:252)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Component.processMouseEvent(Component.java:6266)
&lt;br&gt;&amp;gt;&amp;gt; at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Component.processEvent(Component.java:6028)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Container.processEvent(Container.java:2041)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Component.dispatchEventImpl(Component.java:4630)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Container.dispatchEventImpl(Container.java:2099)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Component.dispatchEvent(Component.java:4460)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Container.dispatchEventImpl(Container.java:2085)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Window.dispatchEventImpl(Window.java:2475)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Component.dispatchEvent(Component.java:4460)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Dialog$1.run(Dialog.java:1045)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Dialog$3.run(Dialog.java:1097)
&lt;br&gt;&amp;gt;&amp;gt; at java.security.AccessController.doPrivileged(Native Method)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Dialog.show(Dialog.java:1095)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Component.show(Component.java:1563)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Component.setVisible(Component.java:1515)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Window.setVisible(Window.java:841)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.Dialog.setVisible(Dialog.java:985)
&lt;br&gt;&amp;gt;&amp;gt; at com.jump.simple.Out.show(Out.java:851)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
&lt;br&gt;&amp;gt;&amp;gt; at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; This is the code I tried (see below for version without the EventListJXTableSorting):
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; try
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; SwingUtilities.invokeAndWait(new Runnable()
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; public void run()
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; EventList&amp;lt;JLabel&amp;gt; labels = GlazedLists.eventListOf(new JLabel(&amp;quot;a&amp;quot;), new JLabel(&amp;quot;b&amp;quot;), new JLabel(&amp;quot;c&amp;quot;), new JLabel(&amp;quot;d&amp;quot;));
&lt;br&gt;&amp;gt;&amp;gt; ObservableElementList.Connector&amp;lt;JLabel&amp;gt; labelConnector = GlazedLists.beanConnector(JLabel.class);
&lt;br&gt;&amp;gt;&amp;gt; SortedList&amp;lt;JLabel&amp;gt; beans = new SortedList&amp;lt;JLabel&amp;gt;(new ObservableElementList&amp;lt;JLabel&amp;gt;(labels, labelConnector), new Comparator&amp;lt;JLabel&amp;gt;()
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; public int compare(JLabel o1, JLabel o2)
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; return o1.getText().compareTo(o2.getText());
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt; });
&lt;br&gt;&amp;gt;&amp;gt; // build a JTable
&lt;br&gt;&amp;gt;&amp;gt; String[] propertyNames = { &amp;quot;text&amp;quot;, };
&lt;br&gt;&amp;gt;&amp;gt; TableFormat&amp;lt;JLabel&amp;gt; ltf = GlazedLists.tableFormat(JLabel.class, propertyNames, propertyNames);
&lt;br&gt;&amp;gt;&amp;gt; final JXTable t = new JXTable(new DefaultEventTableModel&amp;lt;JLabel&amp;gt;(beans, ltf));
&lt;br&gt;&amp;gt;&amp;gt; final JLabel view_selected = new JLabel(&amp;quot;wrong&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; final JLabel real_selected = new JLabel(&amp;quot;right&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; DefaultEventSelectionModel&amp;lt;JLabel&amp;gt; selModel = new DefaultEventSelectionModel&amp;lt;JLabel&amp;gt;(beans);
&lt;br&gt;&amp;gt;&amp;gt; t.setSelectionModel(selModel);
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; EventListJXTableSorting sorting = EventListJXTableSorting.install(t, beans);
&lt;br&gt;&amp;gt;&amp;gt; sorting.setMultipleColumnSort(true);
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; t.getSelectionModel().addListSelectionListener(new ListSelectionListener()
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; public void valueChanged(ListSelectionEvent e)
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; int[] rows = t.getSelectedRows();
&lt;br&gt;&amp;gt;&amp;gt; int sel = rows.length &amp;lt; 1 ? -1 : rows[0];
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; view_selected.setText(&amp;quot;&amp;quot; + sel);
&lt;br&gt;&amp;gt;&amp;gt; real_selected.setText(&amp;quot;&amp;quot; + t.convertRowIndexToModel(sel));
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt; });
&lt;br&gt;&amp;gt;&amp;gt; JPanel show = new JPanel(new GridLayout(0, 1));
&lt;br&gt;&amp;gt;&amp;gt; JList selList = new JList(new DefaultEventListModel&amp;lt;JLabel&amp;gt;(selModel.getSelected()));
&lt;br&gt;&amp;gt;&amp;gt; selList.setCellRenderer(new DefaultListCellRenderer()
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
&lt;br&gt;&amp;gt;&amp;gt; label.setText(((JLabel) value).getText());
&lt;br&gt;&amp;gt;&amp;gt; return label;
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt; });
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; show.add(new JScrollPane(t));
&lt;br&gt;&amp;gt;&amp;gt; show.add(new JScrollPane(selList));
&lt;br&gt;&amp;gt;&amp;gt; show.add(view_selected);
&lt;br&gt;&amp;gt;&amp;gt; show.add(real_selected);
&lt;br&gt;&amp;gt;&amp;gt; Out.show(800, 600, show);
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt; });
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt; catch (Exception e)
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; e.printStackTrace();
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;/div&gt;HB&amp;gt; I think there are some users combining SwingX with GL without problems,
&lt;br&gt;HB&amp;gt; so to help you with your problem we need to know:
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;HB&amp;gt; Which versions of SwingX and GL do you use?
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;HB&amp;gt; How did you setup your JXTable?
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;HB&amp;gt; A test program that demonstrates your issue would be ideal.
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Here's a simple example using JLabel lists. &amp;nbsp;I'm using the latest dev
&lt;br&gt;&amp;gt;&amp;gt; snapshot of glazed lists and the 1.0 SwingX release.
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; EventList&amp;lt;JLabel&amp;gt; labels = GlazedLists.eventListOf(new JLabel(&amp;quot;a&amp;quot;), new JLabel(&amp;quot;b&amp;quot;), new JLabel(&amp;quot;c&amp;quot;), new JLabel(&amp;quot;d&amp;quot;));
&lt;br&gt;&amp;gt;&amp;gt; ObservableElementList.Connector&amp;lt;JLabel&amp;gt; labelConnector = GlazedLists.beanConnector(JLabel.class);
&lt;br&gt;&amp;gt;&amp;gt; ObservableElementList&amp;lt;JLabel&amp;gt; beans = new ObservableElementList&amp;lt;JLabel&amp;gt;(labels, labelConnector);
&lt;br&gt;&amp;gt;&amp;gt; // build a JTable
&lt;br&gt;&amp;gt;&amp;gt; String[] propertyNames = {&amp;quot;text&amp;quot;,};
&lt;br&gt;&amp;gt;&amp;gt; TableFormat&amp;lt;JLabel&amp;gt; ltf = GlazedLists.tableFormat(JLabel.class, propertyNames, propertyNames);
&lt;br&gt;&amp;gt;&amp;gt; final JXTable t = new JXTable(new DefaultEventTableModel&amp;lt;JLabel&amp;gt;(beans, ltf));
&lt;br&gt;&amp;gt;&amp;gt; final JLabel view_selected = new JLabel(&amp;quot;wrong&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; final JLabel real_selected = new JLabel(&amp;quot;right&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; DefaultEventSelectionModel&amp;lt;JLabel&amp;gt; selModel = new DefaultEventSelectionModel&amp;lt;JLabel&amp;gt;(beans);
&lt;br&gt;&amp;gt;&amp;gt; t.setSelectionModel(selModel);
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; t.getSelectionModel().addListSelectionListener(new ListSelectionListener()
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; public void valueChanged(ListSelectionEvent e)
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; int[] rows = t.getSelectedRows();
&lt;br&gt;&amp;gt;&amp;gt; int sel = rows.length &amp;lt; 1 ? -1 : rows[0];
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; view_selected.setText(&amp;quot;&amp;quot;+sel);
&lt;br&gt;&amp;gt;&amp;gt; real_selected.setText(&amp;quot;&amp;quot;+t.convertRowIndexToModel(sel));
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt; });
&lt;br&gt;&amp;gt;&amp;gt; JPanel show = new JPanel(new GridLayout(0, 1));
&lt;br&gt;&amp;gt;&amp;gt; JList selList = new JList(new DefaultEventListModel&amp;lt;JLabel&amp;gt;(selModel.getSelected()));
&lt;br&gt;&amp;gt;&amp;gt; selList.setCellRenderer(new DefaultListCellRenderer()
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
&lt;br&gt;&amp;gt;&amp;gt; label.setText(((JLabel)value).getText());
&lt;br&gt;&amp;gt;&amp;gt; return label;
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt; });
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; show.add(new JScrollPane(t));
&lt;br&gt;&amp;gt;&amp;gt; show.add(new JScrollPane(selList));
&lt;br&gt;&amp;gt;&amp;gt; show.add(view_selected);
&lt;br&gt;&amp;gt;&amp;gt; show.add(real_selected);
&lt;br&gt;&amp;gt;&amp;gt; // show the JPanel now
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; When unsorted, everything works. &amp;nbsp;If you reverse-sort, though, selecting
&lt;br&gt;&amp;gt;&amp;gt; elements 0 and 1 (&amp;quot;d&amp;quot; and &amp;quot;c&amp;quot;) results in the selected list being &amp;quot;a&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; and &amp;quot;b&amp;quot; (the view coordinates). &amp;nbsp;The selection model needs to ask the
&lt;br&gt;&amp;gt;&amp;gt; table to convert view rows to model rows, basically. &amp;nbsp;I show this in the
&lt;br&gt;&amp;gt;&amp;gt; real_selected vs. view_selected labels. &amp;nbsp;The code has an exception for
&lt;br&gt;&amp;gt;&amp;gt; -1 (nothing selected) but I didn't want to spend time polishing
&lt;br&gt;&amp;gt;&amp;gt; irrelevant cases.
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; My question, then, is: why not modify the DefaultEventSelectionModel to
&lt;br&gt;&amp;gt;&amp;gt; ask the JXTable for the model coordinates of the selected data? &amp;nbsp;At the
&lt;br&gt;&amp;gt;&amp;gt; leat, mention that possibility in the SwingX compatiblity docs. &amp;nbsp;I think
&lt;br&gt;&amp;gt;&amp;gt; EventListJXTableSorting is too complicated and limiting for users who
&lt;br&gt;&amp;gt;&amp;gt; like the JXTable sorting and filtering, plus as I showed it had some
&lt;br&gt;&amp;gt;&amp;gt; issues (perhaps due to my inexperience using it).
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; I would also suggest the docs for DefaultEventSelectionModel should
&lt;br&gt;&amp;gt;&amp;gt; mention the SwingX issues clearly. &amp;nbsp;If those issues are in the bug list,
&lt;br&gt;&amp;gt;&amp;gt; point that out next to the bug URL.
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt;&amp;gt; Ted
&lt;br&gt;&amp;gt;&amp;gt; 
&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=25247525&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25247525&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;HB&amp;gt; ______________________________________________________
&lt;br&gt;HB&amp;gt; GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
&lt;br&gt;HB&amp;gt; Jetzt freischalten unter &lt;a href=&quot;http://movieflat.web.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://movieflat.web.de&lt;/a&gt;&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=25247525&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25247525&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/selection-support-in-GL-tp25174841p25247525.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25246396</id>
	<title>Re: selection support in GL</title>
	<published>2009-09-01T12:34:18Z</published>
	<updated>2009-09-01T12:34:18Z</updated>
	<author>
		<name>Holger Brands</name>
	</author>
	<content type="html">Hi Ted,
&lt;br&gt;&lt;br&gt;in both examples you posted, you use DefaultEventSelectionModel with JXTable,
&lt;br&gt;but I don't see where you disable the selection mapper.
&lt;br&gt;The link I quoted states under section &amp;quot;Maintaining selection&amp;quot;:
&lt;br&gt;&lt;br&gt;&amp;quot;It is necessary to disable the SelectionMapper to use JXTable with Glazed Lists.
&lt;br&gt;Otherwise, the SelectionMapper competes with Glazed Lists' own selection management,
&lt;br&gt;and selection is left in an inconsistent state.&amp;quot;
&lt;br&gt;&lt;br&gt;Please try that first.
&lt;br&gt;If any problem remains, please let us know.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Holger
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Sat, 29 Aug 2009 12:28:50 +0200 Holger Brands &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25246396&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hbrands@...&lt;/a&gt;&amp;gt; wrote: 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; HB&amp;gt; there is some info about SwingX and GL here:
&lt;br&gt;&amp;gt; HB&amp;gt; &lt;a href=&quot;http://sites.google.com/site/glazedlists/documentation/swingx&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sites.google.com/site/glazedlists/documentation/swingx&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; First of all, GL is great. &amp;nbsp;This is just one case where it's been hard
&lt;br&gt;&amp;gt; to use. &amp;nbsp;I would not go back to non-GL programming, it would be painful.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I tried the suggested
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EventListJXTableSorting sorting = EventListJXTableSorting.install(t, beans);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sorting.setMultipleColumnSort(true);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; but got many illegal state and null pointer errors, e.g. below. &amp;nbsp;I also
&lt;br&gt;&amp;gt; don't like all the caveats and limitations of the suggested approaches.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; java.lang.IllegalStateException: Cannot combine reorder with other change events
&lt;br&gt;&amp;gt; 	at ca.odell.glazedlists.event.ListEventAssembler.reorder(ListEventAssembler.java:246)
&lt;br&gt;&amp;gt; 	at ca.odell.glazedlists.ListSelection.addSelectedReorder(ListSelection.java:852)
&lt;br&gt;&amp;gt; 	at ca.odell.glazedlists.ListSelection.listChanged(ListSelection.java:172)
&lt;br&gt;&amp;gt; 	at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:412)
&lt;br&gt;&amp;gt; 	at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:409)
&lt;br&gt;&amp;gt; 	at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher$SubjectAndListener.firePendingEvent(SequenceDependenciesEventPublisher.java:445)
&lt;br&gt;&amp;gt; 	at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.fireEvent(SequenceDependenciesEventPublisher.java:344)
&lt;br&gt;&amp;gt; 	at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:316)
&lt;br&gt;&amp;gt; 	at ca.odell.glazedlists.SortedList.setComparator(SortedList.java:481)
&lt;br&gt;&amp;gt; 	at ca.odell.glazedlists.swing.EventListJXTableSorting$EventListSortController.setSortKeys(EventListJXTableSorting.java:228)
&lt;br&gt;&amp;gt; 	at ca.odell.glazedlists.swing.EventListJXTableSorting$EventListSortController.toggleSortOrder(EventListJXTableSorting.java:192)
&lt;br&gt;&amp;gt; 	at org.jdesktop.swingx.JXTable.toggleSortOrder(JXTable.java:2046)
&lt;br&gt;&amp;gt; 	at org.jdesktop.swingx.JXTableHeader$HeaderListener.doSort(JXTableHeader.java:608)
&lt;br&gt;&amp;gt; 	at org.jdesktop.swingx.JXTableHeader$HeaderListener.mouseClicked(JXTableHeader.java:589)
&lt;br&gt;&amp;gt; 	at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
&lt;br&gt;&amp;gt; 	at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:252)
&lt;br&gt;&amp;gt; 	at java.awt.Component.processMouseEvent(Component.java:6266)
&lt;br&gt;&amp;gt; 	at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
&lt;br&gt;&amp;gt; 	at java.awt.Component.processEvent(Component.java:6028)
&lt;br&gt;&amp;gt; 	at java.awt.Container.processEvent(Container.java:2041)
&lt;br&gt;&amp;gt; 	at java.awt.Component.dispatchEventImpl(Component.java:4630)
&lt;br&gt;&amp;gt; 	at java.awt.Container.dispatchEventImpl(Container.java:2099)
&lt;br&gt;&amp;gt; 	at java.awt.Component.dispatchEvent(Component.java:4460)
&lt;br&gt;&amp;gt; 	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
&lt;br&gt;&amp;gt; 	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)
&lt;br&gt;&amp;gt; 	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
&lt;br&gt;&amp;gt; 	at java.awt.Container.dispatchEventImpl(Container.java:2085)
&lt;br&gt;&amp;gt; 	at java.awt.Window.dispatchEventImpl(Window.java:2475)
&lt;br&gt;&amp;gt; 	at java.awt.Component.dispatchEvent(Component.java:4460)
&lt;br&gt;&amp;gt; 	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
&lt;br&gt;&amp;gt; 	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
&lt;br&gt;&amp;gt; 	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
&lt;br&gt;&amp;gt; 	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
&lt;br&gt;&amp;gt; 	at java.awt.Dialog$1.run(Dialog.java:1045)
&lt;br&gt;&amp;gt; 	at java.awt.Dialog$3.run(Dialog.java:1097)
&lt;br&gt;&amp;gt; 	at java.security.AccessController.doPrivileged(Native Method)
&lt;br&gt;&amp;gt; 	at java.awt.Dialog.show(Dialog.java:1095)
&lt;br&gt;&amp;gt; 	at java.awt.Component.show(Component.java:1563)
&lt;br&gt;&amp;gt; 	at java.awt.Component.setVisible(Component.java:1515)
&lt;br&gt;&amp;gt; 	at java.awt.Window.setVisible(Window.java:841)
&lt;br&gt;&amp;gt; 	at java.awt.Dialog.setVisible(Dialog.java:985)
&lt;br&gt;&amp;gt; 	at com.jump.simple.Out.show(Out.java:851)
&lt;br&gt;&amp;gt; 	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
&lt;br&gt;&amp;gt; 	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
&lt;br&gt;&amp;gt; 	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
&lt;br&gt;&amp;gt; 	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
&lt;br&gt;&amp;gt; 	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
&lt;br&gt;&amp;gt; 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
&lt;br&gt;&amp;gt; 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
&lt;br&gt;&amp;gt; 	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This is the code I tried (see below for version without the EventListJXTableSorting):
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SwingUtilities.invokeAndWait(new Runnable()
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void run()
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EventList&amp;lt;JLabel&amp;gt; labels = GlazedLists.eventListOf(new JLabel(&amp;quot;a&amp;quot;), new JLabel(&amp;quot;b&amp;quot;), new JLabel(&amp;quot;c&amp;quot;), new JLabel(&amp;quot;d&amp;quot;));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ObservableElementList.Connector&amp;lt;JLabel&amp;gt; labelConnector = GlazedLists.beanConnector(JLabel.class);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SortedList&amp;lt;JLabel&amp;gt; beans = new SortedList&amp;lt;JLabel&amp;gt;(new ObservableElementList&amp;lt;JLabel&amp;gt;(labels, labelConnector), new Comparator&amp;lt;JLabel&amp;gt;()
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;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; public int compare(JLabel o1, JLabel o2)
&lt;br&gt;&amp;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; {
&lt;br&gt;&amp;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; return o1.getText().compareTo(o2.getText());
&lt;br&gt;&amp;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; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // build a JTable
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String[] propertyNames = { &amp;quot;text&amp;quot;, };
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TableFormat&amp;lt;JLabel&amp;gt; ltf = GlazedLists.tableFormat(JLabel.class, propertyNames, propertyNames);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final JXTable t = new JXTable(new DefaultEventTableModel&amp;lt;JLabel&amp;gt;(beans, ltf));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final JLabel view_selected = new JLabel(&amp;quot;wrong&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final JLabel real_selected = new JLabel(&amp;quot;right&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DefaultEventSelectionModel&amp;lt;JLabel&amp;gt; selModel = new DefaultEventSelectionModel&amp;lt;JLabel&amp;gt;(beans);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.setSelectionModel(selModel);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EventListJXTableSorting sorting = EventListJXTableSorting.install(t, beans);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sorting.setMultipleColumnSort(true);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.getSelectionModel().addListSelectionListener(new ListSelectionListener()
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;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; public void valueChanged(ListSelectionEvent e)
&lt;br&gt;&amp;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; {
&lt;br&gt;&amp;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; int[] rows = t.getSelectedRows();
&lt;br&gt;&amp;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; int sel = rows.length &amp;lt; 1 ? -1 : rows[0];
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;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; view_selected.setText(&amp;quot;&amp;quot; + sel);
&lt;br&gt;&amp;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; real_selected.setText(&amp;quot;&amp;quot; + t.convertRowIndexToModel(sel));
&lt;br&gt;&amp;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; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JPanel show = new JPanel(new GridLayout(0, 1));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JList selList = new JList(new DefaultEventListModel&amp;lt;JLabel&amp;gt;(selModel.getSelected()));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; selList.setCellRenderer(new DefaultListCellRenderer()
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;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; public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
&lt;br&gt;&amp;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; {
&lt;br&gt;&amp;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; JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
&lt;br&gt;&amp;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; label.setText(((JLabel) value).getText());
&lt;br&gt;&amp;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; return label;
&lt;br&gt;&amp;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; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show.add(new JScrollPane(t));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show.add(new JScrollPane(selList));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show.add(view_selected);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show.add(real_selected);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Out.show(800, 600, show);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception e)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.printStackTrace();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; HB&amp;gt; I think there are some users combining SwingX with GL without problems,
&lt;br&gt;&amp;gt; HB&amp;gt; so to help you with your problem we need to know:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; HB&amp;gt; Which versions of SwingX and GL do you use?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; HB&amp;gt; How did you setup your JXTable?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; HB&amp;gt; A test program that demonstrates your issue would be ideal.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Here's a simple example using JLabel lists. &amp;nbsp;I'm using the latest dev
&lt;br&gt;&amp;gt; snapshot of glazed lists and the 1.0 SwingX release.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EventList&amp;lt;JLabel&amp;gt; labels = GlazedLists.eventListOf(new JLabel(&amp;quot;a&amp;quot;), new JLabel(&amp;quot;b&amp;quot;), new JLabel(&amp;quot;c&amp;quot;), new JLabel(&amp;quot;d&amp;quot;));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ObservableElementList.Connector&amp;lt;JLabel&amp;gt; labelConnector = GlazedLists.beanConnector(JLabel.class);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ObservableElementList&amp;lt;JLabel&amp;gt; beans = new ObservableElementList&amp;lt;JLabel&amp;gt;(labels, labelConnector);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // build a JTable
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String[] propertyNames = {&amp;quot;text&amp;quot;,};
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TableFormat&amp;lt;JLabel&amp;gt; ltf = GlazedLists.tableFormat(JLabel.class, propertyNames, propertyNames);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final JXTable t = new JXTable(new DefaultEventTableModel&amp;lt;JLabel&amp;gt;(beans, ltf));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final JLabel view_selected = new JLabel(&amp;quot;wrong&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final JLabel real_selected = new JLabel(&amp;quot;right&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DefaultEventSelectionModel&amp;lt;JLabel&amp;gt; selModel = new DefaultEventSelectionModel&amp;lt;JLabel&amp;gt;(beans);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.setSelectionModel(selModel);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.getSelectionModel().addListSelectionListener(new ListSelectionListener()
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void valueChanged(ListSelectionEvent e)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int[] rows = t.getSelectedRows();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int sel = rows.length &amp;lt; 1 ? -1 : rows[0];
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; view_selected.setText(&amp;quot;&amp;quot;+sel);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; real_selected.setText(&amp;quot;&amp;quot;+t.convertRowIndexToModel(sel));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JPanel show = new JPanel(new GridLayout(0, 1));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JList selList = new JList(new DefaultEventListModel&amp;lt;JLabel&amp;gt;(selModel.getSelected()));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; selList.setCellRenderer(new DefaultListCellRenderer()
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; label.setText(((JLabel)value).getText());
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return label;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show.add(new JScrollPane(t));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show.add(new JScrollPane(selList));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show.add(view_selected);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show.add(real_selected);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // show the JPanel now
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; When unsorted, everything works. &amp;nbsp;If you reverse-sort, though, selecting
&lt;br&gt;&amp;gt; elements 0 and 1 (&amp;quot;d&amp;quot; and &amp;quot;c&amp;quot;) results in the selected list being &amp;quot;a&amp;quot;
&lt;br&gt;&amp;gt; and &amp;quot;b&amp;quot; (the view coordinates). &amp;nbsp;The selection model needs to ask the
&lt;br&gt;&amp;gt; table to convert view rows to model rows, basically. &amp;nbsp;I show this in the
&lt;br&gt;&amp;gt; real_selected vs. view_selected labels. &amp;nbsp;The code has an exception for
&lt;br&gt;&amp;gt; -1 (nothing selected) but I didn't want to spend time polishing
&lt;br&gt;&amp;gt; irrelevant cases.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; My question, then, is: why not modify the DefaultEventSelectionModel to
&lt;br&gt;&amp;gt; ask the JXTable for the model coordinates of the selected data? &amp;nbsp;At the
&lt;br&gt;&amp;gt; leat, mention that possibility in the SwingX compatiblity docs. &amp;nbsp;I think
&lt;br&gt;&amp;gt; EventListJXTableSorting is too complicated and limiting for users who
&lt;br&gt;&amp;gt; like the JXTable sorting and filtering, plus as I showed it had some
&lt;br&gt;&amp;gt; issues (perhaps due to my inexperience using it).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I would also suggest the docs for DefaultEventSelectionModel should
&lt;br&gt;&amp;gt; mention the SwingX issues clearly. &amp;nbsp;If those issues are in the bug list,
&lt;br&gt;&amp;gt; point that out next to the bug URL.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt; Ted
&lt;br&gt;&amp;gt; 
&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=25246396&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25246396&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;______________________________________________________
&lt;br&gt;GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
&lt;br&gt;Jetzt freischalten unter &lt;a href=&quot;http://movieflat.web.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://movieflat.web.de&lt;/a&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=25246396&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25246396&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/selection-support-in-GL-tp25174841p25246396.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25246013</id>
	<title>Re: selection support in GL</title>
	<published>2009-09-01T12:05:55Z</published>
	<updated>2009-09-01T12:05:55Z</updated>
	<author>
		<name>Ted Zlatanov</name>
	</author>
	<content type="html">On Sat, 29 Aug 2009 12:28:50 +0200 Holger Brands &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25246013&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hbrands@...&lt;/a&gt;&amp;gt; wrote: 
&lt;br&gt;&lt;br&gt;HB&amp;gt; there is some info about SwingX and GL here:
&lt;br&gt;HB&amp;gt; &lt;a href=&quot;http://sites.google.com/site/glazedlists/documentation/swingx&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sites.google.com/site/glazedlists/documentation/swingx&lt;/a&gt;&lt;br&gt;&lt;br&gt;First of all, GL is great. &amp;nbsp;This is just one case where it's been hard
&lt;br&gt;to use. &amp;nbsp;I would not go back to non-GL programming, it would be painful.
&lt;br&gt;&lt;br&gt;I tried the suggested
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EventListJXTableSorting sorting = EventListJXTableSorting.install(t, beans);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sorting.setMultipleColumnSort(true);
&lt;br&gt;&lt;br&gt;but got many illegal state and null pointer errors, e.g. below. &amp;nbsp;I also
&lt;br&gt;don't like all the caveats and limitations of the suggested approaches.
&lt;br&gt;&lt;br&gt;java.lang.IllegalStateException: Cannot combine reorder with other change events
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.event.ListEventAssembler.reorder(ListEventAssembler.java:246)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.ListSelection.addSelectedReorder(ListSelection.java:852)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.ListSelection.listChanged(ListSelection.java:172)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:412)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:409)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher$SubjectAndListener.firePendingEvent(SequenceDependenciesEventPublisher.java:445)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.fireEvent(SequenceDependenciesEventPublisher.java:344)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:316)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.SortedList.setComparator(SortedList.java:481)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.swing.EventListJXTableSorting$EventListSortController.setSortKeys(EventListJXTableSorting.java:228)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at ca.odell.glazedlists.swing.EventListJXTableSorting$EventListSortController.toggleSortOrder(EventListJXTableSorting.java:192)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.jdesktop.swingx.JXTable.toggleSortOrder(JXTable.java:2046)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.jdesktop.swingx.JXTableHeader$HeaderListener.doSort(JXTableHeader.java:608)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.jdesktop.swingx.JXTableHeader$HeaderListener.mouseClicked(JXTableHeader.java:589)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:252)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.processMouseEvent(Component.java:6266)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.processEvent(Component.java:6028)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Container.processEvent(Container.java:2041)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.dispatchEventImpl(Component.java:4630)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Container.dispatchEventImpl(Container.java:2099)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.dispatchEvent(Component.java:4460)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Container.dispatchEventImpl(Container.java:2085)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Window.dispatchEventImpl(Window.java:2475)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.dispatchEvent(Component.java:4460)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Dialog$1.run(Dialog.java:1045)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Dialog$3.run(Dialog.java:1097)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.security.AccessController.doPrivileged(Native Method)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Dialog.show(Dialog.java:1095)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.show(Component.java:1563)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.setVisible(Component.java:1515)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Window.setVisible(Window.java:841)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Dialog.setVisible(Dialog.java:985)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at com.jump.simple.Out.show(Out.java:851)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
&lt;br&gt;&lt;br&gt;This is the code I tried (see below for version without the EventListJXTableSorting):
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SwingUtilities.invokeAndWait(new Runnable()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void run()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EventList&amp;lt;JLabel&amp;gt; labels = GlazedLists.eventListOf(new JLabel(&amp;quot;a&amp;quot;), new JLabel(&amp;quot;b&amp;quot;), new JLabel(&amp;quot;c&amp;quot;), new JLabel(&amp;quot;d&amp;quot;));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ObservableElementList.Connector&amp;lt;JLabel&amp;gt; labelConnector = GlazedLists.beanConnector(JLabel.class);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SortedList&amp;lt;JLabel&amp;gt; beans = new SortedList&amp;lt;JLabel&amp;gt;(new ObservableElementList&amp;lt;JLabel&amp;gt;(labels, labelConnector), new Comparator&amp;lt;JLabel&amp;gt;()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&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; public int compare(JLabel o1, JLabel o2)
&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; {
&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; return o1.getText().compareTo(o2.getText());
&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; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // build a JTable
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String[] propertyNames = { &amp;quot;text&amp;quot;, };
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TableFormat&amp;lt;JLabel&amp;gt; ltf = GlazedLists.tableFormat(JLabel.class, propertyNames, propertyNames);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final JXTable t = new JXTable(new DefaultEventTableModel&amp;lt;JLabel&amp;gt;(beans, ltf));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final JLabel view_selected = new JLabel(&amp;quot;wrong&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final JLabel real_selected = new JLabel(&amp;quot;right&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DefaultEventSelectionModel&amp;lt;JLabel&amp;gt; selModel = new DefaultEventSelectionModel&amp;lt;JLabel&amp;gt;(beans);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.setSelectionModel(selModel);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EventListJXTableSorting sorting = EventListJXTableSorting.install(t, beans);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sorting.setMultipleColumnSort(true);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.getSelectionModel().addListSelectionListener(new ListSelectionListener()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&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; public void valueChanged(ListSelectionEvent e)
&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; {
&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; int[] rows = t.getSelectedRows();
&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; int sel = rows.length &amp;lt; 1 ? -1 : rows[0];
&lt;br&gt;&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; view_selected.setText(&amp;quot;&amp;quot; + sel);
&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; real_selected.setText(&amp;quot;&amp;quot; + t.convertRowIndexToModel(sel));
&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; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JPanel show = new JPanel(new GridLayout(0, 1));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JList selList = new JList(new DefaultEventListModel&amp;lt;JLabel&amp;gt;(selModel.getSelected()));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; selList.setCellRenderer(new DefaultListCellRenderer()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&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; public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
&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; {
&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; JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
&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; label.setText(((JLabel) value).getText());
&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; return label;
&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; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; show.add(new JScrollPane(t));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show.add(new JScrollPane(selList));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show.add(view_selected);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show.add(real_selected);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Out.show(800, 600, show);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception e)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.printStackTrace();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;HB&amp;gt; I think there are some users combining SwingX with GL without problems,
&lt;br&gt;HB&amp;gt; so to help you with your problem we need to know:
&lt;br&gt;&lt;br&gt;HB&amp;gt; Which versions of SwingX and GL do you use?
&lt;br&gt;&lt;br&gt;HB&amp;gt; How did you setup your JXTable?
&lt;br&gt;&lt;br&gt;HB&amp;gt; A test program that demonstrates your issue would be ideal.
&lt;br&gt;&lt;br&gt;Here's a simple example using JLabel lists. &amp;nbsp;I'm using the latest dev
&lt;br&gt;snapshot of glazed lists and the 1.0 SwingX release.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EventList&amp;lt;JLabel&amp;gt; labels = GlazedLists.eventListOf(new JLabel(&amp;quot;a&amp;quot;), new JLabel(&amp;quot;b&amp;quot;), new JLabel(&amp;quot;c&amp;quot;), new JLabel(&amp;quot;d&amp;quot;));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ObservableElementList.Connector&amp;lt;JLabel&amp;gt; labelConnector = GlazedLists.beanConnector(JLabel.class);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ObservableElementList&amp;lt;JLabel&amp;gt; beans = new ObservableElementList&amp;lt;JLabel&amp;gt;(labels, labelConnector);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // build a JTable
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String[] propertyNames = {&amp;quot;text&amp;quot;,};
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TableFormat&amp;lt;JLabel&amp;gt; ltf = GlazedLists.tableFormat(JLabel.class, propertyNames, propertyNames);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final JXTable t = new JXTable(new DefaultEventTableModel&amp;lt;JLabel&amp;gt;(beans, ltf));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final JLabel view_selected = new JLabel(&amp;quot;wrong&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final JLabel real_selected = new JLabel(&amp;quot;right&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DefaultEventSelectionModel&amp;lt;JLabel&amp;gt; selModel = new DefaultEventSelectionModel&amp;lt;JLabel&amp;gt;(beans);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.setSelectionModel(selModel);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.getSelectionModel().addListSelectionListener(new ListSelectionListener()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void valueChanged(ListSelectionEvent e)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int[] rows = t.getSelectedRows();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int sel = rows.length &amp;lt; 1 ? -1 : rows[0];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; view_selected.setText(&amp;quot;&amp;quot;+sel);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; real_selected.setText(&amp;quot;&amp;quot;+t.convertRowIndexToModel(sel));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JPanel show = new JPanel(new GridLayout(0, 1));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JList selList = new JList(new DefaultEventListModel&amp;lt;JLabel&amp;gt;(selModel.getSelected()));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; selList.setCellRenderer(new DefaultListCellRenderer()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; label.setText(((JLabel)value).getText());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return label;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&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; show.add(new JScrollPane(t));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show.add(new JScrollPane(selList));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show.add(view_selected);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show.add(real_selected);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // show the JPanel now
&lt;br&gt;&lt;br&gt;When unsorted, everything works. &amp;nbsp;If you reverse-sort, though, selecting
&lt;br&gt;elements 0 and 1 (&amp;quot;d&amp;quot; and &amp;quot;c&amp;quot;) results in the selected list being &amp;quot;a&amp;quot;
&lt;br&gt;and &amp;quot;b&amp;quot; (the view coordinates). &amp;nbsp;The selection model needs to ask the
&lt;br&gt;table to convert view rows to model rows, basically. &amp;nbsp;I show this in the
&lt;br&gt;real_selected vs. view_selected labels. &amp;nbsp;The code has an exception for
&lt;br&gt;-1 (nothing selected) but I didn't want to spend time polishing
&lt;br&gt;irrelevant cases.
&lt;br&gt;&lt;br&gt;My question, then, is: why not modify the DefaultEventSelectionModel to
&lt;br&gt;ask the JXTable for the model coordinates of the selected data? &amp;nbsp;At the
&lt;br&gt;leat, mention that possibility in the SwingX compatiblity docs. &amp;nbsp;I think
&lt;br&gt;EventListJXTableSorting is too complicated and limiting for users who
&lt;br&gt;like the JXTable sorting and filtering, plus as I showed it had some
&lt;br&gt;issues (perhaps due to my inexperience using it).
&lt;br&gt;&lt;br&gt;I would also suggest the docs for DefaultEventSelectionModel should
&lt;br&gt;mention the SwingX issues clearly. &amp;nbsp;If those issues are in the bug list,
&lt;br&gt;point that out next to the bug URL.
&lt;br&gt;&lt;br&gt;Thanks!
&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=25246013&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25246013&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/selection-support-in-GL-tp25174841p25246013.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25201717</id>
	<title>Re: selection support in GL</title>
	<published>2009-08-29T03:28:50Z</published>
	<updated>2009-08-29T03:28:50Z</updated>
	<author>
		<name>Holger Brands</name>
	</author>
	<content type="html">Hi Ted,
&lt;br&gt;&lt;br&gt;there is some info about SwingX and GL here:
&lt;br&gt;&lt;a href=&quot;http://sites.google.com/site/glazedlists/documentation/swingx&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sites.google.com/site/glazedlists/documentation/swingx&lt;/a&gt;&lt;br&gt;&lt;br&gt;I think there are some users combining SwingX with GL without problems,
&lt;br&gt;so to help you with your problem we need to know:
&lt;br&gt;&lt;br&gt;Which versions of SwingX and GL do you use?
&lt;br&gt;&lt;br&gt;How did you setup your JXTable?
&lt;br&gt;&lt;br&gt;A test program that demonstrates your issue would be ideal.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Holger
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Thu, 27 Aug 2009 09:38:35 -0700 James Lemieux &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25201717&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jplemieux@...&lt;/a&gt;&amp;gt; wrote: 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; JL&amp;gt; 2009/8/27 Ted Zlatanov &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25201717&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tzz@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; It would be very nice if the GL had some knowledge of what's been
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; selected in a list or table generated from it. &amp;nbsp;Obviously that's not
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; always possible, but at least a Matcher should be possible that glues
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; together the selection control piece of the GUI view with the underlying
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; model. &amp;nbsp;Any suggestions?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; JL&amp;gt; EventSelectionModel does precisely this. If you start using it in place of
&lt;br&gt;&amp;gt; JL&amp;gt; the traditional selection model you can ask it to furnish you with the
&lt;br&gt;&amp;gt; JL&amp;gt; selected/unselected elements. Just make sure you pass the same EventList
&lt;br&gt;&amp;gt; JL&amp;gt; into both your data model and selection model.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I tried it with a JXTable/JXList and it doesn't work correctly. &amp;nbsp;I'm
&lt;br&gt;&amp;gt; guessing the model to view mappings are confusing it.
&lt;br&gt;&amp;gt; JXTable.getSelectionMapper().setEnabled(false) locks up the EDT thread,
&lt;br&gt;&amp;gt; so there's some strange interaction there.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Ted
&lt;br&gt;&amp;gt; 
&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=25201717&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25201717&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;______________________________________________________
&lt;br&gt;GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
&lt;br&gt;Jetzt freischalten unter &lt;a href=&quot;http://movieflat.web.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://movieflat.web.de&lt;/a&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=25201717&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-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=25201717&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/selection-support-in-GL-tp25174841p25201717.html" />
</entry>

</feed>
