coderazzi / tablefilter-swing

TableFilter is a set of Swing components to support user-driven filtering on table.
https://coderazzi.net/tablefilter
MIT License
7 stars 2 forks source link

Allow different sorting on choices box #32

Closed coderazzi closed 11 years ago

coderazzi commented 11 years ago

Original report by coderazzi coderazzi (Bitbucket: coderazzi, GitHub: coderazzi).


The sorting on the choices box shows always the data alphabetically sorted.

It would be interesting (see issue 31) to provide ways to modify this sorting order.

Original issue reported on code.google.com by coderazzi on 2012-11-28 13:06:18

coderazzi commented 11 years ago

Original comment by coderazzi coderazzi (Bitbucket: coderazzi, GitHub: coderazzi).


Repository contains a working solution for this problem, although the API will likely
change before release.

You can try it by downloading directly the code at the google site
(http://code.google.com/p/tablefilter-swing/source/checkout). If you
do so, you still need to do, on the columns where you expect natural
ordering: getFilterEditor().setAlphabeticalOrderOnChoices(false);

 L.

Original issue reported on code.google.com by coderazzi on 2012-12-18 11:10:03

coderazzi commented 11 years ago

Original comment by coderazzi coderazzi (Bitbucket: coderazzi, GitHub: coderazzi).


The IFilterEditor interface is now extended with a method setChoicesComparator, allowing
to specify the exact algorithm used to sort (and present) the choices.

Original issue reported on code.google.com by coderazzi on 2013-03-12 23:11:36