diff --git a/looks/src/org/compiere/swing/CTable.java b/looks/src/org/compiere/swing/CTable.java
index abc1b09517..2f84fff44b 100644
--- a/looks/src/org/compiere/swing/CTable.java
+++ b/looks/src/org/compiere/swing/CTable.java
@@ -26,11 +26,16 @@ import javax.swing.table.*;
import org.compiere.util.*;
/**
- * Model Independent enhanced JTable.
- * Provides sizing and sorting
- *
- * @author Jorg Janke
- * @version $Id: CTable.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
+ * Model Independent enhanced JTable.
+ * Provides sizing and sorting.
+ *
+ * Change log:
+ *
+ * - 2007-01-27 - teo_sarca - [ 1585369 ] CTable sorting is TOO LAZY
+ *
+ *
+ * @author Jorg Janke
+ * @version $Id: CTable.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class CTable extends JTable
{
@@ -41,11 +46,7 @@ public class CTable extends JTable
{
super(new DefaultTableModel());
setColumnSelectionAllowed(false);
- /* ARHIPAC: TEO: BEGIN: ORIGINAL: @arhipac.tools.annotation.Bug(228) -------------------------------------------- *
setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- /* ARHIPAC: TEO: BEGIN: MODIFIED: @arhipac.tools.annotation.Bug(228) ------------------------------------------- */
- setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
- /* ARHIPAC: TEO: BEGIN: END: @arhipac.tools.annotation.Bug(228) --------------------------------------------------- */
setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
getTableHeader().addMouseListener(new CTableMouseListener());
setSurrendersFocusOnKeystroke(true);
@@ -201,7 +202,7 @@ public class CTable extends JTable
* @param modelColumnIndex model column sort index
*/
@SuppressWarnings("unchecked")
- protected void sort (int modelColumnIndex)
+ protected void sort (final int modelColumnIndex)
{
int rows = getRowCount();
if (rows == 0)
@@ -224,9 +225,9 @@ public class CTable extends JTable
// Prepare sorting
DefaultTableModel model = (DefaultTableModel)getModel();
- MSort sort = new MSort(0, null);
+ final MSort sort = new MSort(0, null);
sort.setSortAsc(p_asc);
- /* ARHIPAC: teo_sarca: BEGIN: ORIGINAL: @arhipac.tools.annotation.Bug(226) ----------------------------------- *
+ /* teo_sarca: commented: [ 1585369 ] CTable sorting is TOO LAZY *
// while something to sort
sorting:
while (true)
@@ -256,23 +257,15 @@ public class CTable extends JTable
// log.config("done");
break;
} // while something to sort
- /* ARHIPAC: teo_sarca: MODIFIED: @arhipac.tools.annotation.Bug(226) -------------------------------------------- */
- // This comparator is used to sort vectors of data
- class ColumnSorter implements Comparator {
- int colIndex;
- MSort sort;
- ColumnSorter(int colIndex, MSort sort) {
- this.colIndex = colIndex;
- this.sort = sort;
- }
+ */
+ // teo_sarca: [ 1585369 ] CTable sorting is TOO LAZY
+ Collections.sort(model.getDataVector(), new Comparator