SortableTableModel with custom comparator

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

SortableTableModel with custom comparator

Postby orome » Thu Apr 13, 2006 2:56 am

Hi,

Is there the possibilty to add a feauture like setCompareIgnoreCase(bool); on the SortableTableModel. Or a more generic thing like setComparator(column, Comparator);
I use the SortableTableModel mainly with strings, so for me the first case would be easier to use...

Thanks Orome
orome
 
Posts: 13
Joined: Thu Dec 15, 2005 8:13 am

Postby JIDE Support » Thu Apr 13, 2006 10:04 pm

Those methods will indeed make it convenient. However they might be problematic too when table model changes. I propose a getComparator method on SortableTableModel. If getComparator(columnIndex) return a non-null value, we will use it. Otherwise, we will use getColumnClass to look up in ObjectComparatorManager.

Thanks.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby JIDE Support » Mon Apr 24, 2006 10:23 am

Just so you know, this feature is added to 1.9.1.02.

(Grids) Added getComparator(int column) method in SortableTableModel. You can override it to return any comparator you wanted.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby orome » Mon May 08, 2006 1:51 am

Very well! You guys are so fuckin fast! (sorry for the words ;-)
i'll give it a try just now.
orome
 
Posts: 13
Joined: Thu Dec 15, 2005 8:13 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 92 guests