From: Anjenson <hot...@gm...> - 2014-04-08 10:19:44
|
Hi Shamshad, I have been thinking about how to implement this feature as well, so I had an idea of creating some kind of function that will calculate new index for selected items. This index will be returned when asking for the row of molecule and used when asking for the value in the row. Because as I understand it may take resorting all the dataset when selecting item after the table had been loaded. I suppose it can be done by manipulating with mappings field in Sortie class (however, I am very much not sure I understand the the purpose of this field correctly) or creating additional one. Regards, Andrew "Anjenson" Zhilka On 04/07/2014 08:33 PM, Shamshad Alam wrote: > Hi, > > Sorry, I tried first to solve it by implementing comparator. But it > could not be feasible for me because parameters passed in compare() > method of comparator are the two values to be compared instead of row > index (row index is required to determine a row is selected or not). > So, we have no idea about values we have in compare() method that they > belong to selected or unselected row. > > Currently my aim is to get to know how the entire system is working > and familiarize myself with the coding style and architecture of > Scaffold Hunter. So, should I try other features request such as '#38 > Split subsets by scaffolds on a specified level'? > > Actually I have not made efforts to develop such messy codes. I > created a copy of DefaultRowSorter and TableRowSorter implementation > available in java swing and added single method (sort(int[] > selectedRows)) in DefaultRowSorter (You can see the changes in > attachment. It is quite simple). > > > Thanks > Shamshad |