Changeset 32593 in osm for applications/editors/josm
- Timestamp:
- 2016-07-06T17:16:53+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/mapillary
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImage.java
r32383 r32593 130 130 131 131 /** 132 * Returns the direction towards the image has been taken.133 *134 * @return The direction of the image (0 means north and goes clockwise).135 */136 public double getMovingCa() {137 return this.movingCa;138 }132 * Returns the direction towards the image has been taken. 133 * 134 * @return The direction of the image (0 means north and goes clockwise). 135 */ 136 public double getMovingCa() { 137 return this.movingCa; 138 } 139 139 140 140 /** -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLocationChangeset.java
r32574 r32593 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.mapillary; 2 3 … … 7 8 8 9 public class MapillaryLocationChangeset extends HashSet<MapillaryImage> { 10 private static final long serialVersionUID = 2461033584553885626L; 9 11 private final Set<MapillaryChangesetListener> listeners = new HashSet<>(); 10 12 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java
r32577 r32593 255 255 } 256 256 if (!SwingUtilities.isEventDispatchThread()) { 257 SwingUtilities.invokeLater( 257 SwingUtilities.invokeLater(new Runnable() { 258 258 @Override 259 259 public void run() { -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportIntoSequenceAction.java
r32034 r32593 102 102 * 103 103 */ 104 public class MapillaryEpochComparator implements104 public static class MapillaryEpochComparator implements 105 105 Comparator<MapillaryAbstractImage> { 106 106 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/WalkThread.java
r31987 r32593 71 71 final BufferedImage displayImage = MapillaryMainDialog.getInstance().mapillaryImageDisplay.getImage(); 72 72 if (this.waitForFullQuality && image instanceof MapillaryImage) { 73 while ( 73 while (displayImage == this.lastImage || displayImage == null || displayImage.getWidth() < 2048) { 74 74 wait(100); 75 75 } 76 } 77 // Waits for thumbnail. 78 else { 76 } else { // Waits for thumbnail. 79 77 while (displayImage == this.lastImage || displayImage == null || displayImage.getWidth() < 320) { 80 78 wait(100); … … 114 112 * @param type the quality of the image (full or thumbnail) 115 113 */ 116 private void preDownloadImages(MapillaryImage startImage, int n, CacheUtils.PICTURE type) {114 private static void preDownloadImages(MapillaryImage startImage, int n, CacheUtils.PICTURE type) { 117 115 if (n >= 1 && startImage != null) { 118 116 CacheUtils.downloadPicture(startImage, type); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/FinishedUploadDialog.java
r31972 r32593 38 38 this.add(text); 39 39 JButton web = new JButton(tr("Approve upload on the website")); 40 text.setLabelFor(web); 40 41 web.addActionListener(new WebAction()); 41 42 web.setAlignmentX(Component.CENTER_ALIGNMENT); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/UploadUtils.java
r32383 r32593 55 55 * @author nokutu 56 56 */ 57 public class UploadUtils {57 public final class UploadUtils { 58 58 /** 59 59 * Required keys for POST … … 75 75 } 76 76 77 private static class SequenceUploadThread extends Thread {77 private static final class SequenceUploadThread extends Thread { 78 78 private final Set<MapillaryAbstractImage> images; 79 79 private final UUID uuid; … … 117 117 } 118 118 119 private static class SingleUploadThread extends Thread {119 private static final class SingleUploadThread extends Thread { 120 120 121 121 private final MapillaryImportedImage image; … … 215 215 */ 216 216 public static void upload(MapillaryImportedImage image, UUID uuid) { 217 String key = MapillaryUser.getUsername() + "/" + uuid.toString() + "/" 218 + image.getMovingLatLon().lat() + "_" + image.getMovingLatLon().lon() + "_" 219 + image.getMovingCa() + "_" + image.getCapturedAt() + ".jpg"; 217 String key = new StringBuilder(MapillaryUser.getUsername()) 218 .append('/').append(uuid) 219 .append('/').append(image.getMovingLatLon().lat()) // TODO: Make sure, that the double values are not appended as something like "10e-4", "Infinity" or "NaN" (all possible values of Double.toString(double)) 220 .append('_').append(image.getMovingLatLon().lon()) 221 .append('_').append(image.getMovingCa()) 222 .append('_').append(image.getCapturedAt()) 223 .append(".jpg") 224 .toString(); 220 225 221 226 String policy; -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryColorScheme.java
r32403 r32593 12 12 import javax.swing.JComponent; 13 13 14 public class MapillaryColorScheme {14 public final class MapillaryColorScheme { 15 15 public static final Color MAPILLARY_GREEN = new Color(0x35af6d); 16 16 public static final Color TOOLBAR_DARK_GREY = new Color(0x242528); … … 33 33 } 34 34 35 public final static class MapillaryButton extends JButton { 35 public static final class MapillaryButton extends JButton { 36 private static final long serialVersionUID = 3824559897922944415L; 36 37 public MapillaryButton(final String text, final Action action) { 37 38 super(action); 38 39 setText(text); 39 40 setForeground(Color.WHITE); 40 setBorder(BorderFactory.createEmptyBorder(7, 10,7,10));41 setBorder(BorderFactory.createEmptyBorder(7, 10, 7, 10)); 41 42 } 43 42 44 @Override 43 45 protected void paintComponent(final Graphics g) { … … 53 55 super.paintComponent(g); 54 56 } 57 55 58 @Override 56 59 public boolean isContentAreaFilled() { -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryUtils.java
r32575 r32593 203 203 public static void showPictures(final Set<MapillaryAbstractImage> images, final boolean select) { 204 204 if (!SwingUtilities.isEventDispatchThread()) { 205 SwingUtilities.invokeLater( 205 SwingUtilities.invokeLater(new Runnable() { 206 206 @Override 207 207 public void run() { 208 208 showPictures(images, select); 209 209 } 210 } 210 }); 211 211 } else { 212 212 Bounds zoomBounds; -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/utils/ImageUtilsTest.java
r32383 r32593 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.mapillary.utils; 2 3 -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryURLTest.java
r32069 r32593 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.mapillary.utils; 2 3 … … 26 27 } 27 28 28 @Test(expected =IllegalArgumentException.class)29 @Test(expected = IllegalArgumentException.class) 29 30 public void testIllegalBrowseEditURL() { 30 31 MapillaryURL.browseEditURL(null); 31 32 } 32 33 33 @Test(expected =IllegalArgumentException.class)34 @Test(expected = IllegalArgumentException.class) 34 35 public void testIllegalBrowseEditURL2() { 35 36 MapillaryURL.browseEditURL("123456789012345678901"); 36 37 } 37 38 38 @Test(expected =IllegalArgumentException.class)39 @Test(expected = IllegalArgumentException.class) 39 40 public void testIllegalBrowseEditURL3() { 40 41 MapillaryURL.browseEditURL("12345678901234567890123"); 41 42 } 42 43 43 @Test(expected =IllegalArgumentException.class)44 @Test(expected = IllegalArgumentException.class) 44 45 public void testIllegalBrowseEditURL4() { 45 46 MapillaryURL.browseEditURL("123456789012345678901+"); … … 54 55 } 55 56 56 @Test(expected =IllegalArgumentException.class)57 @Test(expected = IllegalArgumentException.class) 57 58 public void testIllegalBrowseImageURL() { 58 59 MapillaryURL.browseImageURL(null); 59 60 } 60 61 61 @Test(expected =IllegalArgumentException.class)62 @Test(expected = IllegalArgumentException.class) 62 63 public void testIllegalBrowseImageURL2() { 63 64 MapillaryURL.browseImageURL("123456789012345678901"); 64 65 } 65 66 66 @Test(expected =IllegalArgumentException.class)67 @Test(expected = IllegalArgumentException.class) 67 68 public void testIllegalBrowseImageURL3() { 68 69 MapillaryURL.browseImageURL("12345678901234567890123"); 69 70 } 70 71 71 @Test(expected =IllegalArgumentException.class)72 @Test(expected = IllegalArgumentException.class) 72 73 public void testIllegalBrowseImageURL4() { 73 74 MapillaryURL.browseImageURL("123456789012345678901+"); … … 212 213 } 213 214 assertTrue( 214 expectedParams[exIndex] + " was expected in the query string of " + actualUrl.toString() + " but wasn't there." 215 expectedParams[exIndex] + " was expected in the query string of " + actualUrl.toString() + " but wasn't there.", 215 216 parameterIsPresent 216 217 ); -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryUtilsTest.java
r31799 r32593 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.mapillary.utils; 2 3 -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/utils/PluginStateTest.java
r31972 r32593 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.mapillary.utils; 2 3 -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/utils/TestUtil.java
r32374 r32593 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.mapillary.utils; 2 3
Note:
See TracChangeset
for help on using the changeset viewer.