Changeset 31333 in osm for applications/editors/josm
- Timestamp:
- 2015-07-02T16:33:39+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 1 added
- 1 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImage.java
r31331 r31333 23 23 public static Lock lock = new ReentrantLock(); 24 24 25 /** The time the image was captured, in Epoch format */ 25 26 private long capturedAt; 26 27 27 /** Position of the picture */ 28 28 public final LatLon latLon; … … 78 78 * Returns whether the image is visible on the map or not. 79 79 * 80 * @return 80 * @return True if the image is visible; false otherwise. 81 81 */ 82 82 public boolean isVisible() { … … 91 91 * Returns the last fixed coordinates of the object. 92 92 * 93 * @return 93 * @return A LatLon object containing. 94 94 */ 95 95 public LatLon getTempLatLon() { … … 101 101 * 102 102 * @param x 103 * The movement of the image in longitude units. 103 104 * @param y 105 * The movement of the image in latitude units. 104 106 */ 105 107 public void move(double x, double y) { … … 113 115 * 114 116 * @param ca 117 * The angle the image is moving. 115 118 */ 116 119 public void turn(double ca) { … … 140 143 * Returns the last fixed direction of the object. 141 144 * 142 * @return 145 * @return The last fixed direction of the object. 0 means north. 143 146 */ 144 147 public double getTempCa() { … … 149 152 * Returns the date the picture was taken in DMY format. 150 153 * 151 * @return 154 * @return A String object containing the date when the picture was taken. 152 155 */ 153 156 public String getDate() { … … 192 195 * 193 196 * @param date 197 * The string containing the date. 194 198 * @param format 195 * @return 199 * The format of the date. 200 * @return The date in Epoch format. 196 201 */ 197 202 public long getEpoch(String date, String format) { … … 210 215 * Returns current time in Epoch format 211 216 * 212 * @return 217 * @return The current date in Epoch format. 213 218 */ 214 219 private long currentTime() { -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java
r31331 r31333 93 93 94 94 /** 95 * Sets the image under the mouse cursor. 96 * 97 * @param image 98 */ 99 public void setHoveredImage(MapillaryAbstractImage image) { 95 * Highlights the image under the cursor. 96 * 97 * @param image 98 * The image under the cursor. 99 */ 100 public void setHighlightedImage(MapillaryAbstractImage image) { 100 101 highlightedImage = image; 101 102 } … … 104 105 * Returns the image under the mouse cursor. 105 106 * 106 * @return 107 * @return The image under the mouse cursor. 107 108 */ 108 109 public MapillaryAbstractImage getHoveredImage() { … … 210 211 211 212 /** 212 * Selects a new image and then starts a new MapillaryImageDownloadThread 213 * thread in order to download its surrounding thumbnails. If the user does 214 * ctrl+click, this isn't triggered. 213 * Selects a new image and then starts a new 214 * {@link MapillaryImageDownloadThread} thread in order to download its 215 * surrounding thumbnails. If the user does ctrl+click, this isn't 216 * triggered. 215 217 * 216 218 * @param image … … 222 224 223 225 /** 224 * Selects a new image and then starts a new MapillaryImageDownloadThread 225 * thread in order to download its surrounding thumbnails. If the user does 226 * ctrl+click, this isn't triggered. You can choose whether to center the 227 * view on the new image or not. 228 * 229 * @param image 226 * Selects a new image and then starts a new 227 * {@link MapillaryImageDownloadThread} thread in order to download its 228 * surrounding thumbnails. If the user does ctrl+click, this isn't 229 * triggered. You can choose whether to center the view on the new image or 230 * not. 231 * 232 * @param image 233 * The {@link MapillaryImage} which is going to be selected. 230 234 * @param zoom 235 * True if the view must be centered on the image; false 236 * otherwise. 231 237 */ 232 238 public void setSelectedImage(MapillaryAbstractImage image, boolean zoom) { … … 291 297 292 298 /** 293 * Adds a set of MapillaryImage objects to the list of selected images. 299 * Adds a set of {@code MapillaryAbstractImage} objects to the list of 300 * selected images. 294 301 * 295 302 * @param images 303 * A List object containing the set of images to be added. 296 304 */ 297 305 public void addMultiSelectedImage(List<MapillaryAbstractImage> images) { … … 307 315 308 316 /** 309 * Returns a list containing all MapillaryImage objects selected with ctrl +310 * click311 * 312 * @return 317 * Returns a List containing all {@code MapillaryAbstractImage} objects 318 * selected with ctrl + click 319 * 320 * @return A List object containing all the images selected. 313 321 */ 314 322 public List<MapillaryAbstractImage> getMultiSelectedImages() { … … 329 337 * Returns the amount of images contained by this object. 330 338 * 331 * @return 339 * @return The amount of images in stored. 332 340 */ 333 341 public int size() { -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryDataListener.java
r31328 r31333 3 3 public interface MapillaryDataListener { 4 4 5 /** 6 * Fired when any image is added to the database. 7 */ 5 8 public void imagesAdded(); 6 9 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImage.java
r31328 r31333 17 17 private MapillarySequence sequence; 18 18 19 /** Epoch time when the image was taken. */20 19 /** The user that made the image */ 21 20 private String user; … … 63 62 * 64 63 * @param sign 64 * A String that identifies the type of sign. 65 65 */ 66 66 public void addSign(String sign) { … … 68 68 } 69 69 70 /** 71 * Returns a List containing the signs assigned to this image. 72 * 73 * @return A List object containing the signs assigned to this image. 74 */ 70 75 public List<String> getSigns() { 71 76 return signs; 72 77 } 73 78 79 /** 80 * Sets the username of the person who took the image. 81 * @param user A String containing the username of the person who took the image. 82 */ 74 83 public void setUser(String user) { 75 84 this.user = user; -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImportedImage.java
r31328 r31333 39 39 } 40 40 41 /** 42 * Returns the File object where the picture is located. 43 * @return The File object where the picture is located. 44 */ 41 45 public File getFile() { 42 46 return file; -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java
r31331 r31333 9 9 import org.openstreetmap.josm.plugins.mapillary.downloads.MapillaryDownloader; 10 10 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryFilterDialog; 11 import org.openstreetmap.josm.plugins.mapillary.gui.Mapillary ToggleDialog;11 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryMainDialog; 12 12 import org.openstreetmap.josm.Main; 13 13 import org.openstreetmap.josm.gui.layer.Layer; … … 110 110 } 111 111 MapillaryPlugin.setMenuEnabled(MapillaryPlugin.EXPORT_MENU, true); 112 if (!Mapillary ToggleDialog.getInstance().isShowing())113 Mapillary ToggleDialog.getInstance().getButton().doClick();112 if (!MapillaryMainDialog.getInstance().isShowing()) 113 MapillaryMainDialog.getInstance().getButton().doClick(); 114 114 createHatchTexture(); 115 115 data.dataUpdated(); … … 178 178 @Override 179 179 public void destroy() { 180 Mapillary ToggleDialog.getInstance().setImage(null);181 Mapillary ToggleDialog.getInstance().updateImage();180 MapillaryMainDialog.getInstance().setImage(null); 181 MapillaryMainDialog.getInstance().updateImage(); 182 182 data.getImages().clear(); 183 183 MapillaryLayer.INSTANCE = null; … … 278 278 MapillaryLayer.BLUE = null; 279 279 MapillaryLayer.RED = null; 280 Mapillary ToggleDialog.getInstance().blueButton.setEnabled(false);281 Mapillary ToggleDialog.getInstance().redButton.setEnabled(false);280 MapillaryMainDialog.getInstance().blueButton.setEnabled(false); 281 MapillaryMainDialog.getInstance().redButton.setEnabled(false); 282 282 283 283 // Sets blue and red lines and enables/disables the buttons … … 291 291 mv.getPoint(closestImages[0].getLatLon()).y, 292 292 selected.x, selected.y); 293 Mapillary ToggleDialog.getInstance().blueButton.setEnabled(true);293 MapillaryMainDialog.getInstance().blueButton.setEnabled(true); 294 294 } 295 295 if (closestImages[1] != null) { … … 299 299 mv.getPoint(closestImages[1].getLatLon()).y, 300 300 selected.x, selected.y); 301 Mapillary ToggleDialog.getInstance().redButton.setEnabled(true);301 MapillaryMainDialog.getInstance().redButton.setEnabled(true); 302 302 } 303 303 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryMouseAdapter.java
r31313 r31333 13 13 import org.openstreetmap.josm.plugins.mapillary.commands.CommandTurnImage; 14 14 import org.openstreetmap.josm.plugins.mapillary.commands.MapillaryRecord; 15 import org.openstreetmap.josm.plugins.mapillary.gui.Mapillary ToggleDialog;15 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryMainDialog; 16 16 17 17 /** … … 231 231 if (MapillaryData.getInstance().getHoveredImage() != closestTemp 232 232 && closestTemp != null) { 233 MapillaryData.getInstance().setH overedImage(closestTemp);234 Mapillary ToggleDialog.getInstance().setImage(closestTemp);235 Mapillary ToggleDialog.getInstance().updateImage();233 MapillaryData.getInstance().setHighlightedImage(closestTemp); 234 MapillaryMainDialog.getInstance().setImage(closestTemp); 235 MapillaryMainDialog.getInstance().updateImage(); 236 236 } else if (MapillaryData.getInstance().getHoveredImage() != closestTemp 237 237 && closestTemp == null) { 238 MapillaryData.getInstance().setH overedImage(null);239 Mapillary ToggleDialog.getInstance().setImage(238 MapillaryData.getInstance().setHighlightedImage(null); 239 MapillaryMainDialog.getInstance().setImage( 240 240 MapillaryData.getInstance().getSelectedImage()); 241 Mapillary ToggleDialog.getInstance().updateImage();241 MapillaryMainDialog.getInstance().updateImage(); 242 242 } 243 243 MapillaryData.getInstance().dataUpdated(); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java
r31328 r31333 21 21 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryHistoryDialog; 22 22 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryPreferenceSetting; 23 import org.openstreetmap.josm.plugins.mapillary.gui.Mapillary ToggleDialog;23 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryMainDialog; 24 24 import org.openstreetmap.josm.plugins.mapillary.actions.*; 25 25 import org.openstreetmap.josm.tools.ImageProvider; … … 101 101 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { 102 102 if (oldFrame == null && newFrame != null) { // map frame added 103 Main.map.addToggleDialog(Mapillary ToggleDialog.getInstance(), false);103 Main.map.addToggleDialog(MapillaryMainDialog.getInstance(), false); 104 104 Main.map.addToggleDialog(MapillaryHistoryDialog.getInstance(), 105 105 false); … … 111 111 } 112 112 if (oldFrame != null && newFrame == null) { // map frame destroyed 113 Mapillary ToggleDialog.destroyInstance();113 MapillaryMainDialog.destroyInstance(); 114 114 MapillaryHistoryDialog.destroyInstance(); 115 115 MapillaryFilterDialog.destroyInstance(); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySequenceDownloadThread.java
r31331 r31333 120 120 121 121 private boolean isInside(MapillaryAbstractImage image) { 122 for (int i = 0; i < bounds.size(); i++) {122 for (int i = 0; i < bounds.size(); i++) 123 123 if (bounds.get(i).contains(image.getLatLon())) 124 124 return true; 125 }126 125 return false; 127 126 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySquareDownloadManagerThread.java
r31331 r31333 10 10 import org.openstreetmap.josm.plugins.mapillary.MapillaryLayer; 11 11 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryFilterDialog; 12 import org.openstreetmap.josm.plugins.mapillary.gui.Mapillary ToggleDialog;12 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryMainDialog; 13 13 14 14 /** … … 45 45 .setHelpText("Downloading image's information"); 46 46 completeImages(); 47 Mapillary ToggleDialog.getInstance().updateTitle();47 MapillaryMainDialog.getInstance().updateTitle(); 48 48 Main.map.statusLine.setHelpText("Downloading signs"); 49 49 downloadSigns(); … … 59 59 layer.data.dataUpdated(); 60 60 MapillaryFilterDialog.getInstance().refresh(); 61 Mapillary ToggleDialog.getInstance().updateImage();61 MapillaryMainDialog.getInstance().updateImage(); 62 62 } 63 63 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryImageDisplay.java
r31331 r31333 25 25 /** 26 26 * This object is a responsible JComponent which lets you zoom and drag. It is 27 * included in a {@link Mapillary ToggleDialog} object.27 * included in a {@link MapillaryMainDialog} object. 28 28 * 29 29 * @author Jorge 30 30 * @see MapillaryImageDisplay 31 * @see Mapillary ToggleDialog31 * @see MapillaryMainDialog 32 32 */ 33 33 public class MapillaryImageDisplay extends JComponent {
Note:
See TracChangeset
for help on using the changeset viewer.