Changeset 34325 in osm for applications/editors/josm/plugins/MicrosoftStreetside/src
- Timestamp:
- 2018-06-19T19:14:05+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideImage.java
r34317 r34325 65 65 * Main constructor of the class StreetsideImage 66 66 * 67 * @param keyThe unique identifier of the image.67 * @param id The unique identifier of the image. 68 68 * @param latLon The latitude and longitude where it is positioned. 69 * @param cd The direction of the images in degrees, meaning 0 north. 70 */ 71 69 * @param he The direction of the images in degrees, meaning 0 north. 70 */ 72 71 public StreetsideImage(String id, LatLon latLon, double he) { 73 72 super(id, latLon, he); … … 205 204 206 205 /** 207 * @param pi the pi to set206 * @param pitch the pi to set 208 207 */ 209 208 public void setPi(double pitch) { … … 219 218 220 219 /** 221 * @param b urringl the burringlto set220 * @param blurring the blurring to set 222 221 */ 223 222 public void setBl(String blurring) { -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideImportedImage.java
r34317 r34325 34 34 * Using when the EXIF tags doesn't contain that info. 35 35 * 36 * @param id The Streetside image id 36 37 * @param latLon The latitude and longitude where the picture was taken. 37 * @param c dDirection of the picture (0 means north).38 * @param ca Direction of the picture (0 means north). 38 39 * @param file The file containing the picture. 39 40 */ … … 45 46 * Main constructor of the class. 46 47 * 48 * @param id The Streetside image id 47 49 * @param latLon Latitude and Longitude where the picture was taken. 48 * @param c dDirection of the picture (0 means north),50 * @param ca Direction of the picture (0 means north), 49 51 * @param file The file containing the picture. 50 52 * @param datetimeOriginal The date the picture was taken. -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideLayer.java
r34317 r34325 218 218 * Layer. 219 219 * 220 * @return The {@link MapillaryData} object that stores the database.220 * @return The {@link StreetsideData} object that stores the database. 221 221 */ 222 222 public StreetsideLocationChangeset getLocationChangeset() { … … 333 333 } 334 334 335 /* *335 /* 336 336 * Draws an image marker onto the given Graphics context. 337 337 * @param g the Graphics context … … 524 524 } 525 525 526 /* *526 /* 527 527 * Returns the closest images belonging to a different sequence and 528 528 * different from the specified target image. -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsidePlugin.java
r34317 r34325 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.plugins.streetside; 3 4 import java.io.IOException;5 3 6 4 import org.openstreetmap.josm.Main; … … 59 57 * @param info 60 58 * Required information of the plugin. Obtained from the jar file. 61 * @throws IOException if the streetside cache directory is not found62 59 */ 63 public StreetsidePlugin(PluginInformation info) /*throws IOException*/{60 public StreetsidePlugin(PluginInformation info) { 64 61 super(info); 65 62 -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideSequence.java
r34317 r34325 37 37 private List<StreetsideAbstractImage> images; 38 38 39 /**40 * Unique identifier. Used only for {@link StreetsideImage} sequences.41 */42 43 /**44 * @param string45 * @param string246 * @param capturedAt247 */48 39 public StreetsideSequence(String id, Long ca) { 49 40 this.id = id; … … 52 43 } 53 44 54 /**55 * @param string56 * @param la57 * @param lo58 */59 45 public StreetsideSequence(String id, double la, double lo) { 60 46 this.id = id; … … 65 51 66 52 /** 67 * 53 * No argument constructor for StreetsideSequence - necessary for JSON serialization 68 54 */ 69 55 public StreetsideSequence() { … … 85 71 } 86 72 87 /**73 /** 88 74 * Adds a new {@link StreetsideAbstractImage} object to the database. 89 75 * -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cache/CacheUtils.java
r34317 r34325 53 53 * image. Does nothing if it is already in cache. 54 54 * 55 * @param img55 * @param cm 56 56 * The image whose picture is going to be downloaded. 57 57 */ -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/CubemapUtils.java
r34317 r34325 17 17 SIXTEEN(16); 18 18 19 private int value;19 private final int value; 20 20 private static Map<Integer, CubefaceType> map = new HashMap<>(); 21 21 -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/ITileDownloadingTaskListener.java
r34317 r34325 3 3 4 4 /** 5 * Interface for listeners of the class {@link StreetsideData}.5 * Interface for listeners of the class {@link org.openstreetmap.josm.plugins.streetside.StreetsideData}. 6 6 * 7 7 * @author renerr18 … … 10 10 public interface ITileDownloadingTaskListener { 11 11 12 /**13 * Fired when a cubemap tile image is downloaded by a download worker.14 * 15 */16 void tileAdded(String imageId);12 /** 13 * Fired when a cubemap tile image is downloaded by a download worker. 14 * @param imageId image id 15 */ 16 void tileAdded(String imageId); 17 17 } -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/TileDownloadingTask.java
r34317 r34325 56 56 57 57 /** 58 * @param tileId the tileId to set58 * @param id the tileId to set 59 59 */ 60 60 public void setId(String id) { -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/ImageInfoPanel.java
r34317 r34325 18 18 import org.apache.commons.logging.Log; 19 19 import org.apache.commons.logging.LogFactory; 20 import org.openstreetmap.josm.data.SelectionChangedListener; 21 import org.openstreetmap.josm.data.osm.DataSet; 20 import org.openstreetmap.josm.data.osm.DataSelectionListener; 22 21 import org.openstreetmap.josm.data.osm.OsmPrimitive; 23 22 import org.openstreetmap.josm.data.osm.Tag; 23 import org.openstreetmap.josm.data.osm.event.SelectionEventManager; 24 24 import org.openstreetmap.josm.data.preferences.AbstractProperty.ValueChangeListener; 25 25 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; … … 34 34 import org.openstreetmap.josm.tools.I18n; 35 35 36 public final class ImageInfoPanel extends ToggleDialog implements StreetsideDataListener, SelectionChangedListener {36 public final class ImageInfoPanel extends ToggleDialog implements StreetsideDataListener, DataSelectionListener { 37 37 private static final long serialVersionUID = 4141847503072417190L; 38 38 private static final Log L = LogFactory.getLog(ImageInfoPanel.class); … … 59 59 150 60 60 ); 61 DataSet.addSelectionListener(this);61 SelectionEventManager.getInstance().addSelectionListener(this); 62 62 63 63 //numDetectionsLabel = new JLabel(); … … 232 232 */ 233 233 @Override 234 public synchronized void selectionChanged(final Collection<? extends OsmPrimitive> sel) { 234 public synchronized void selectionChanged(final SelectionChangeEvent event) { 235 final Collection<? extends OsmPrimitive> sel = event.getSelection(); 235 236 L.debug(String.format("Selection changed. %d primitives are selected.", sel == null ? 0 : sel.size())); 236 237 addStreetsideTagAction.setTarget(sel != null && sel.size() == 1 ? sel.iterator().next() : null); -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/StreetsideViewerPanel.java
r34317 r34325 3 3 4 4 import java.awt.BorderLayout; 5 import java.util.Collection;6 5 7 6 import javax.swing.JCheckBox; … … 9 8 import javax.swing.SwingUtilities; 10 9 11 import org.openstreetmap.josm.data.SelectionChangedListener;12 import org.openstreetmap.josm.data.osm.DataSet;13 import org.openstreetmap.josm.data.osm.OsmPrimitive;14 10 import org.openstreetmap.josm.data.preferences.AbstractProperty.ValueChangeListener; 15 11 import org.openstreetmap.josm.plugins.streetside.StreetsideAbstractImage; … … 28 24 29 25 public final class StreetsideViewerPanel extends JPanel 30 implements StreetsideDataListener , SelectionChangedListener{26 implements StreetsideDataListener { 31 27 32 28 private static final long serialVersionUID = 4141847503072417190L; … … 56 52 57 53 private void initializeAndStartGUI() { 58 59 DataSet.addSelectionListener(this);60 54 61 55 threeSixtyDegreeViewerPanel = new ThreeSixtyDegreeViewerPanel(); … … 150 144 } 151 145 152 /*153 * (non-Javadoc)154 *155 * @see156 * org.openstreetmap.josm.data.SelectionChangedListener#selectionChanged(java.157 * util.Collection)158 */159 @Override160 public synchronized void selectionChanged(final Collection<? extends OsmPrimitive> sel) {161 Logging.debug(String.format("Selection changed. %d primitives are selected.", sel == null ? 0 : sel.size()));162 }163 164 146 public CubemapBox getCubemapBox() { 165 147 return threeSixtyDegreeViewerPanel.getCubemapBox(); -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/history/commands/CommandTurn.java
r34317 r34325 23 23 * @param images 24 24 * Set of images that is turned. 25 * @param c d25 * @param ca 26 26 * How much the images turn. 27 27 */ -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/io/download/StreetsideDownloader.java
r34317 r34325 198 198 * lots of Streetside images are going to be downloaded, slowing down the 199 199 * program too much. A notification is shown when the download has stopped or continued. 200 * @param area area to check 201 * @return {@code true} if the area is too big 200 202 */ 201 203 private static boolean isAreaTooBig(final double area) { -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/mode/package-info.java
r34317 r34325 5 5 * Currently there are two of them: 6 6 * <ul> 7 * <li><strong>{@link org.openstreetmap.josm.plugins. mapillary.mode.JoinMode}</strong> for joining pictures to make sequences</li>8 * <li><strong>{@link org.openstreetmap.josm.plugins. mapillary.mode.SelectMode}</strong> for selecting pictures in the layer</li>7 * <li><strong>{@link org.openstreetmap.josm.plugins.streetside.mode.JoinMode JoinMode}</strong> for joining pictures to make sequences</li> 8 * <li><strong>{@link org.openstreetmap.josm.plugins.streetside.mode.SelectMode SelectMode}</strong> for selecting pictures in the layer</li> 9 9 * </ul> 10 10 */ -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/StreetsideProperties.java
r34317 r34325 9 9 import org.openstreetmap.josm.data.preferences.NamedColorProperty; 10 10 import org.openstreetmap.josm.data.preferences.StringProperty; 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer;12 11 import org.openstreetmap.josm.plugins.streetside.gui.imageinfo.ImageInfoPanel; 12 import org.openstreetmap.josm.plugins.streetside.gui.imageinfo.StreetsideViewerPanel; 13 13 import org.openstreetmap.josm.plugins.streetside.io.download.StreetsideDownloader; 14 14 … … 37 37 38 38 /** 39 * @see OsmDataLayer#PROPERTY_BACKGROUND_COLOR39 * See {@code OsmDataLayer#PROPERTY_BACKGROUND_COLOR} 40 40 */ 41 41 public static final NamedColorProperty BACKGROUND = new NamedColorProperty("background", Color.BLACK); 42 42 /** 43 * @see OsmDataLayer#PROPERTY_OUTSIDE_COLOR43 * See {@code OsmDataLayer#PROPERTY_OUTSIDE_COLOR} 44 44 */ 45 45 public static final NamedColorProperty OUTSIDE_DOWNLOADED_AREA = new NamedColorProperty("outside downloaded area", Color.YELLOW); -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/StreetsideURL.java
r34317 r34325 193 193 /** 194 194 * Gives you the URL for the blur editor of the image with the given key. 195 * @param keythe key of the image for which you want to open the blur editor195 * @param id the key of the image for which you want to open the blur editor 196 196 * @return the URL of the blur editor 197 197 * @throws IllegalArgumentException if the image key is <code>null</code> … … 334 334 } 335 335 336 /**337 *338 */339 336 static String queryByIdString(Map<String, String> parts) { 340 337 final StringBuilder ret = new StringBuilder("?id="); -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/api/JsonSequencesDecoder.java
r34317 r34325 28 28 * Parses a given {@link JsonObject} as a GeoJSON Feature into a {@link StreetsideSequence}. 29 29 * @param json the {@link JsonObject} to be parsed 30 * @return a {@link Streetside equence} that is parsed from the given {@link JsonObject}. If mandatory information is30 * @return a {@link StreetsideSequence} that is parsed from the given {@link JsonObject}. If mandatory information is 31 31 * missing from the JSON or it's not meeting the expecting format in another way, <code>null</code> will be 32 32 * returned. … … 72 72 * Converts a {@link JsonArray} to a java array. 73 73 * The conversion from {@link JsonValue} to a java type is done by the supplied function. 74 * @param <T> object type 74 75 * @param array the array to be converted 75 76 * @param decodeValueFunction the function used for conversion from {@link JsonValue} to the desired type. … … 98 99 * For example this is used to convert the `image_keys` JSON array to a String[] array or the `cas` JSON array to a 99 100 * Double[] array. 101 * @param <T> object type 100 102 * @param json the JSON object representing the `properties` of a sequence 101 103 * @param key the key, which identifies the desired array inside the `coordinateProperties` object to be converted -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/api/JsonStreetsideSequencesDecoder.java
r34317 r34325 70 70 71 71 /** 72 * Parses a given {@link JsonObject} as a GeoJSON Feature into a {@link StreetsideSequence}.73 * @param json the {@link JsonObject} to be parsed72 * Parses a given {@link StreetsideImage} as a GeoJSON Feature into a {@link StreetsideSequence}. 73 * @param image the {@link StreetsideImage} to be parsed 74 74 * @return a {@link StreetsideSequence} that is parsed from the given {@link JsonObject}. If mandatory information is 75 75 * missing from the JSON or it's not meeting the expecting format in another way, <code>null</code> will be … … 123 123 * Converts a {@link JsonArray} to a java array. 124 124 * The conversion from {@link JsonValue} to a java type is done by the supplied function. 125 * @param <T> object type 125 126 * @param array the array to be converted 126 127 * @param decodeValueFunction the function used for conversion from {@link JsonValue} to the desired type. … … 149 150 * For example this is used to convert the `image_keys` JSON array to a String[] array or the `cas` JSON array to a 150 151 * Double[] array. 152 * @param <T> object type 151 153 * @param json the JSON object representing the `properties` of a sequence 152 154 * @param key the key, which identifies the desired array inside the `coordinateProperties` object to be converted
Note:
See TracChangeset
for help on using the changeset viewer.