Changeset 13852 in josm
- Timestamp:
- 2018-05-26T20:11:44+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/relation/ExportRelationToGpxAction.java
r13292 r13852 19 19 import java.util.ListIterator; 20 20 import java.util.Map; 21 import java.util.Set; 21 22 import java.util.Stack; 22 23 … … 61 62 62 63 /** Mode of this ExportToGpxAction */ 63 protected final EnumSet<Mode> mode;64 protected final Set<Mode> mode; 64 65 65 66 /** Primitives this action works on */ … … 76 77 * @param mode which mode to use, see {@code ExportRelationToGpxAction.Mode} 77 78 */ 78 public ExportRelationToGpxAction( EnumSet<Mode> mode) {79 public ExportRelationToGpxAction(Set<Mode> mode) { 79 80 super(name(mode), mode.contains(TO_FILE) ? "exportgpx" : "dialogs/layerlist", tooltip(mode), 80 81 null, false, null, false); … … 83 84 } 84 85 85 private static String name( EnumSet<Mode> mode) {86 private static String name(Set<Mode> mode) { 86 87 if (mode.contains(TO_FILE)) { 87 88 if (mode.contains(FROM_FIRST_MEMBER)) { … … 99 100 } 100 101 101 private static String tooltip( EnumSet<Mode> mode) {102 private static String tooltip(Set<Mode> mode) { 102 103 if (mode.contains(FROM_FIRST_MEMBER)) { 103 104 return tr("Flatten this relation to a single gpx track recursively, " + -
trunk/src/org/openstreetmap/josm/command/SplitWayCommand.java
r13173 r13852 275 275 Collection<String> nowarnroles = Config.getPref().getList("way.split.roles.nowarn", 276 276 Arrays.asList("outer", "inner", "forward", "backward", "north", "south", "east", "west")); 277 278 //final MapFrame map = MainApplication.getMap();279 //final boolean isMapModeDraw = map != null && map.mapMode == map.mapModeDraw;280 277 281 278 // Change the original way -
trunk/src/org/openstreetmap/josm/data/oauth/SignpostAdapters.java
r11921 r13852 25 25 */ 26 26 public static class OAuthProvider extends AbstractOAuthProvider { 27 28 private static final long serialVersionUID = 1L; 27 29 28 30 /** … … 60 62 */ 61 63 public static class OAuthConsumer extends AbstractOAuthConsumer { 64 65 private static final long serialVersionUID = 1L; 62 66 63 67 /** -
trunk/src/org/openstreetmap/josm/data/osm/QuadBucketPrimitiveStore.java
r13766 r13852 38 38 */ 39 39 private final Collection<R> relations = new ArrayList<>(); 40 41 /**42 * Constructs a new {@code QuadBucketPrimitiveStore}.43 */44 public QuadBucketPrimitiveStore() {45 }46 40 47 41 /** -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/ComputeStyleListWorker.java
r13810 r13852 33 33 */ 34 34 public class ComputeStyleListWorker extends RecursiveTask<List<StyleRecord>> implements PrimitiveVisitor { 35 36 private static final long serialVersionUID = 1L; 37 35 38 private final transient List<? extends IPrimitive> input; 36 39 private final transient List<StyleRecord> output; -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r13810 r13852 595 595 int textWidth = (int) bounds.getWidth(); 596 596 if (bs.hAlign == HorizontalTextAlignment.CENTER) { 597 x -= textWidth / 2; 597 x -= textWidth / 2d; 598 598 } else if (bs.hAlign == HorizontalTextAlignment.LEFT) { 599 599 x -= -box.x + 4 + textWidth; … … 1667 1667 try { 1668 1668 record.paintPrimitive(paintSettings, this); 1669 } catch ( JosmRuntimeException | IllegalArgumentException | IllegalStateException | NullPointerException e) {1669 } catch (RuntimeException e) { 1670 1670 throw BugReport.intercept(e).put("record", record); 1671 1671 } -
trunk/src/org/openstreetmap/josm/data/tagging/ac/AutoCompletionSet.java
r13121 r13852 18 18 */ 19 19 public class AutoCompletionSet extends TreeSet<AutoCompletionItem> { 20 21 private static final long serialVersionUID = 1L; 20 22 21 23 // Keep a separate tree set of values for determining fast if a value is present -
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r13564 r13852 666 666 @Override 667 667 public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { 668 // Do nothing 668 669 } 669 670 670 671 @Override 671 672 public void popupMenuCanceled(PopupMenuEvent e) { 673 // Do nothing 672 674 } 673 675 }); -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/RecentTagCollection.java
r12846 r13852 23 23 */ 24 24 static final class LruCache extends LinkedHashMap<Tag, Void> { 25 private static final long serialVersionUID = 1L; 25 26 private final int capacity; 26 27 -
trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java
r13426 r13852 370 370 } 371 371 372 setDisplayToFitMapMarkers(); 372 super.setDisplayToFitMapMarkers(); 373 373 } 374 374 } -
trunk/src/org/openstreetmap/josm/gui/layer/AutosaveTask.java
r13654 r13852 22 22 import java.util.LinkedList; 23 23 import java.util.List; 24 import java.util.Locale; 24 25 import java.util.Set; 25 26 import java.util.Timer; … … 197 198 int index = startIndex; 198 199 while (true) { 199 String filename = String.format("%1$s_%2$tY%2$tm%2$td_%2$tH%2$tM%2$tS%2$tL%3$s", 200 String filename = String.format(Locale.ENGLISH, "%1$s_%2$tY%2$tm%2$td_%2$tH%2$tM%2$tS%2$tL%3$s", 200 201 layer.layerFileName, now, index == 0 ? "" : ('_' + Integer.toString(index))); 201 202 File result = new File(autosaveDir, filename + '.' + -
trunk/src/org/openstreetmap/josm/gui/layer/NativeScaleLayer.java
r11386 r13852 5 5 import java.util.Collection; 6 6 import java.util.List; 7 import java.util.Locale; 7 8 8 9 import org.openstreetmap.josm.gui.NavigatableComponent; … … 64 65 @Override 65 66 public String toString() { 66 return String.format("%f [%s]", scale, isNative); 67 return String.format(Locale.ENGLISH, "%f [%s]", scale, isNative); 67 68 } 68 69 -
trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java
r13453 r13852 416 416 Point notePoint = MainApplication.getMap().mapView.getPoint(note.getLatLon()); 417 417 //move the note point to the center of the icon where users are most likely to click when selecting 418 notePoint.setLocation(notePoint.getX(), notePoint.getY() - iconHeight / 2); 418 notePoint.setLocation(notePoint.getX(), notePoint.getY() - iconHeight / 2d); 419 419 double dist = clickPoint.distanceSq(notePoint); 420 420 if (minDistance > dist && clickPoint.distance(notePoint) < snapDistance) { -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r13559 r13852 64 64 import org.openstreetmap.josm.data.osm.DataSelectionListener; 65 65 import org.openstreetmap.josm.data.osm.DataSet; 66 import org.openstreetmap.josm.data.osm.DownloadPolicy;67 import org.openstreetmap.josm.data.osm.UploadPolicy;68 66 import org.openstreetmap.josm.data.osm.DataSetMerger; 69 67 import org.openstreetmap.josm.data.osm.DatasetConsistencyTest; 68 import org.openstreetmap.josm.data.osm.DownloadPolicy; 70 69 import org.openstreetmap.josm.data.osm.HighlightUpdateListener; 71 70 import org.openstreetmap.josm.data.osm.IPrimitive; … … 74 73 import org.openstreetmap.josm.data.osm.OsmPrimitiveComparator; 75 74 import org.openstreetmap.josm.data.osm.Relation; 75 import org.openstreetmap.josm.data.osm.UploadPolicy; 76 76 import org.openstreetmap.josm.data.osm.Way; 77 77 import org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent; … … 239 239 240 240 static final class LruCache extends LinkedHashMap<Relation, Void> { 241 private static final long serialVersionUID = 1L; 241 242 LruCache(int initialCapacity) { 242 243 super(initialCapacity, 1.1f, true); -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReader.java
r13824 r13852 92 92 93 93 static class HashSetWithLast<E> extends LinkedHashSet<E> { 94 private static final long serialVersionUID = 1L; 94 95 protected transient E last; 95 96 -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSeparator.java
r8863 r13852 8 8 public class TaggingPresetSeparator extends TaggingPreset { 9 9 @Override 10 public void setDisplayName() {} 10 public void setDisplayName() { 11 // Do nothing 12 } 11 13 } -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Roles.java
r13332 r13852 179 179 @Override 180 180 public void addCommands(List<Tag> changedTags) { 181 // Do nothing 181 182 } 182 183 -
trunk/src/org/openstreetmap/josm/tools/Shortcut.java
r12846 r13852 283 283 284 284 private static class ShortcutCollection extends CopyOnWriteArrayList<Shortcut> { 285 private static final long serialVersionUID = 1L; 285 286 @Override 286 287 public boolean add(Shortcut shortcut) {
Note:
See TracChangeset
for help on using the changeset viewer.