Changeset 12954 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-10-08T19:03:07+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java
r12953 r12954 76 76 private JButton remove; 77 77 78 private static class ColorEntry implements Comparable<ColorEntry>{78 private static class ColorEntry { 79 79 String key; 80 80 Color color; … … 91 91 public String getDisplay() { 92 92 return Main.pref.getColorName(key); 93 }94 95 @Override96 public int compareTo(ColorEntry o) {97 if (o == null) return -1;98 return Collator.getInstance().compare(getDisplay(), o.getDisplay());99 93 } 100 94 } … … 208 202 209 203 private void addColorRows(List<ColorEntry> entries) { 210 Collections.sort(entries );204 Collections.sort(entries, (e1, e2) -> Collator.getInstance().compare(e1.getDisplay(), e2.getDisplay())); 211 205 entries.forEach(tableModel::addEntry); 212 206 }
Note:
See TracChangeset
for help on using the changeset viewer.