Hi,
for GalzedLists and the ITunes Table, I find something like this quiet usefull:
TableUtils.makeSortable(table, new TableUtils.SortDelegate() {
public void sort(int i, TableUtils.SortDirection sortDirection) {
if(sortDirection == TableUtils.SortDirection.DESCENDING){
sorted.setComparator(new InverseComparator(new TableColumnComparator(format, i)));
}else{
sorted.setComparator(new TableColumnComparator(format, i));
}
}
});
TableColumnComparator is ca.odell.glazedlists.impl.sort.TableColumnComparator. This way I can use the ITunes table the same way I use any other table based on an EventTableModel, and custom comparators can be installed on the TableFormat.
-thasso
--
--
Dipl. Inf. Thasso Griebel-------------------Lehrstuhl fuer Bioinformatik
Office 3426--
http://bio.informatik.uni-jena.de--Institut fuer Informatik
Phone +49 (0)3641 9-46454-----------Friedrich-Schiller-Universitaet Jena
Fax +49 (0)3641 9-46452----------Ernst-Abbe-Platz 2, 07743 Jena, Germany