« Return to Thread: I don't understand how SortedList and TableComparatorChooser work together
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@...I'm pretty sure that TableComparitorChooser is actually swapping out the comparator on your sorted list.- K----------------------- Original Message -----------------------From: Boomah nickdarcy@...To: users@...Cc:Date: Thu, 30 Apr 2009 10:41:56 -0700 (PDT)Subject: I don't understand how SortedList and TableComparatorChooser work togetheronce the user clicks on a column, it gets sorted by th e objects it contains.
Hi people. I don't understand how SortedList and TableComparatorChooser work
together.
I have objects that get added to a SortedList that represent (via my
TableFormat) a row in a table. The SortedList uses this object to sort, and
if I just use a standard JTable, whenever an object is added to my list, it
gets added to my table in the appropriate position. Everything works exactly
as I would expect.
Now I install a TableComparatorChooser on my JTable. If I start my
application, I see items being added to the table in the correct position
given my SortedList as before. However, if I now click on one of the
columns, it sorts not using my SortedList but by using the objects in the
column I clicked on. In my case they are all strings and so get sorted using
the standard string comparator.
I don't understand why the TableComparatorChooser requires a SortedList ifFor additional commands, e-ma il: users-help@...
Why isn't it possible to use an EventList?
It feels like I'm missing something obvious, but I think that SortedList and
TableComparatorChooser completely work against each other and should be
separated.
Have I completely missed the point?
Thanks, Nick.
--
View this message in context: http://www.nabble.com/I-don%27t-understand-how-SortedList-and-TableComparatorChooser-work-together-tp23321078p23321078.html
Sent from the GlazedLists - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
« Return to Thread: I don't understand how SortedList and TableComparatorChooser work together
| Free embeddable forum powered by Nabble | Forum Help |