[Issue 479] New - EventListJXTableSorting.install sets the comparator to null

View: New views
4 Messages — Rating Filter:   Alert me  

[Issue 479] New - EventListJXTableSorting.install sets the comparator to null

by BRANDS-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://glazedlists.dev.java.net/issues/show_bug.cgi?id=479
                 Issue #|479
                 Summary|EventListJXTableSorting.install sets the comparator to
                        | null
               Component|glazedlists
                 Version|current
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|swingx
             Assigned to|jessewilson
             Reported by|brands






------- Additional comments from brands@... Sun Jun  7 20:32:44 +0000 2009 -------
the call to EventListJXTableSorting.install(table, sortedList) is setting the
comparator to null, see the thread here for details:
https://glazedlists.dev.java.net/servlets/ReadMsg?list=users&msgNo=4094

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 479] EventListJXTableSorting.install sets the comparator to null

by BRANDS-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://glazedlists.dev.java.net/issues/show_bug.cgi?id=479



User brands changed the following:

                What    |Old value                 |New value
================================================================================
        Target milestone|milestone 1               |1.9.0
--------------------------------------------------------------------------------




------- Additional comments from brands@... Sun Jun  7 20:34:47 +0000 2009 -------
some more info:

Here is a thread dump for SortedList.setComparator(..)
produced with the sample app:

SortedList.setComparator(): null
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1158)
at ca.odell.glazedlists.SortedList.setComparator(SortedList.java:435)
at
ca.odell.glazedlists.swing.EventListJXTableSorting$EventListSortController.setSortKeys(EventListJXTableSorting.java:214)
at org.jdesktop.swingx.JXTable.setFilters(JXTable.java:1733)
at
ca.odell.glazedlists.swing.EventListJXTableSorting.<init>(EventListJXTableSorting.java:92)
at
ca.odell.glazedlists.swing.EventListJXTableSorting.install(EventListJXTableSorting.java:100)
at JXTableSorting.<init>(JXTableSorting.java:48)
at JXTableSorting$3.run(JXTableSorting.java:117)
...


EventListJXTableSorting.install(...) installs a new FilterPipeline on JXTable
to provide its own SortController (JXTable.setFilters(...)).
JXTable calls back into the new SorController to set the sort keys of the old
SortController, which appear to be null or empty in this case.
The EventListSortController tries to build a comparator from the sort keys,
see EventListSortController.setSortKeys(...)
If there are no sort keys, it sets the comparator of the SortedList to null.
This is what happens in the example app.

One thing we could do is to memorize the comparator of the SortedList at the
time EventListJXTableSorting.install(...) is called and restore this comparator
instead of null when EventListSortController.setSortKeys(...) is called with no
sort keys.


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 479] EventListJXTableSorting.install sets the comparator to null

by BRANDS-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://glazedlists.dev.java.net/issues/show_bug.cgi?id=479



User brands changed the following:

                What    |Old value                 |New value
================================================================================
             Assigned to|jessewilson               |brands
--------------------------------------------------------------------------------




------- Additional comments from brands@... Sun Jul 19 16:00:45 +0000 2009 -------
reassigning...

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 479] EventListJXTableSorting.install sets the comparator to null

by BRANDS-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://glazedlists.dev.java.net/issues/show_bug.cgi?id=479



User brands changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |RESOLVED
--------------------------------------------------------------------------------
              Resolution|                          |FIXED
--------------------------------------------------------------------------------




------- Additional comments from brands@... Sun Jul 19 16:10:33 +0000 2009 -------
added new install method:
public static EventListJXTableSorting#install(JXTable, SortedList, Comparator)
which allows to specify an optional comparator, which is used when there are no
sort keys.

The original install method delegates to it with a null-comparator to preserve
compatibility with the current behaviour.



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...