-
Enhancement
-
Resolution: Unresolved
-
P5
-
None
-
1.3.0
-
Fix Understood
-
generic
-
generic
Name: bsT130419 Date: 10/10/2001
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
I think it would be really nice for JList/DefaultListModel to support
built-in key sorting. Certainly it can be done manually, but it is useful
enough, and easy enough that I think it deserves inclusion to the built-in
classes. I would think a built-in function could be made more efficient than an
external one, at least more efficient than my quick-and-dirty solution.
The format would be something like this:
public class DefaultListModel2 extends DefaultListModel
{
public static final int ORDER_LOW_FIRST=0;
public static final int ORDER_HIGH_FIRST=1;
public void sortToString(int order) {...} //sort by object.toString()
public void sort(int order) {...} //sort with ((Comparable)o1).compare(o2)
}
(Review ID: 133439)
======================================================================
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
I think it would be really nice for JList/DefaultListModel to support
built-in key sorting. Certainly it can be done manually, but it is useful
enough, and easy enough that I think it deserves inclusion to the built-in
classes. I would think a built-in function could be made more efficient than an
external one, at least more efficient than my quick-and-dirty solution.
The format would be something like this:
public class DefaultListModel2 extends DefaultListModel
{
public static final int ORDER_LOW_FIRST=0;
public static final int ORDER_HIGH_FIRST=1;
public void sortToString(int order) {...} //sort by object.toString()
public void sort(int order) {...} //sort with ((Comparable)o1).compare(o2)
}
(Review ID: 133439)
======================================================================