Changeset 12403 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-06-12T00:19:19+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/autofilter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/autofilter/AutoFilterManager.java
r12401 r12403 58 58 * Property to determines if the auto filter feature is enabled. 59 59 */ 60 public static BooleanProperty PROP_AUTO_FILTER_ENABLED = new BooleanProperty("auto.filter.enabled", Boolean.TRUE);60 public static final BooleanProperty PROP_AUTO_FILTER_ENABLED = new BooleanProperty("auto.filter.enabled", Boolean.TRUE); 61 61 62 62 /** 63 63 * Property to determine the current auto filter rule. 64 64 */ 65 public static StringProperty PROP_AUTO_FILTER_RULE = new StringProperty("auto.filter.rule", "level");65 public static final StringProperty PROP_AUTO_FILTER_RULE = new StringProperty("auto.filter.rule", "level"); 66 66 67 67 /** 68 68 * The unique instance. 69 69 */ 70 private static AutoFilterManager instance;70 private static volatile AutoFilterManager instance; 71 71 72 72 /** … … 319 319 * @return the currently selected auto filter, or null 320 320 */ 321 public AutoFilter getCurrentAutoFilter() {321 public synchronized AutoFilter getCurrentAutoFilter() { 322 322 return currentAutoFilter; 323 323 } -
trunk/src/org/openstreetmap/josm/gui/autofilter/AutoFilterRule.java
r12400 r12403 21 21 private Function<String, String> valueFormatter = s -> s; 22 22 23 private Comparator<String> valueComparator = Comparator.comparingInt(s -> Integer. valueOf(valueFormatter.apply(s)));23 private Comparator<String> valueComparator = Comparator.comparingInt(s -> Integer.parseInt(valueFormatter.apply(s))); 24 24 25 25 /** … … 99 99 new AutoFilterRule("voltage", 5) 100 100 .setValueFormatter(s -> s.replaceAll("000$", "k") + 'V') 101 .setValueComparator(Comparator.comparingInt(s -> Integer. valueOf(s)))101 .setValueComparator(Comparator.comparingInt(s -> Integer.parseInt(s))) 102 102 }; 103 103 }
Note:
See TracChangeset
for help on using the changeset viewer.