Changeset 3839 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2011-02-01T08:28:03+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/PresetTextComparator.java
r3719 r3839 7 7 import javax.swing.JMenuItem; 8 8 9 import org.openstreetmap.josm.Main; 10 9 11 public class PresetTextComparator implements Comparator<JMenuItem>, Serializable { 10 //TODO add error checking and stuff11 12 public int compare(JMenuItem arg0, JMenuItem arg1) { 12 return arg0.getText().compareTo(arg1.getText()); 13 if (Main.main.menu.presetSearchAction.equals(arg0.getAction())) 14 return -1; 15 else if (Main.main.menu.presetSearchAction.equals(arg0.getAction())) 16 return 1; 17 else if (arg0.getText() == arg1.getText()) 18 return 0; 19 else if (arg0.getText() == null) 20 return -1; 21 else if (arg1.getText() == null) 22 return 1; 23 else 24 return arg0.getText().compareTo(arg1.getText()); 13 25 } 14 26
Note:
See TracChangeset
for help on using the changeset viewer.