Changeset 31245 in osm for applications
- Timestamp:
- 2015-06-08T10:26:41+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/.classpath
r31232 r31245 4 4 <classpathentry combineaccessrules="false" kind="src" path="/JOSM"/> 5 5 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 6 <classpathentry combineaccessrules="false" kind="src" path="/JOSM-commons-imaging"/> 6 <classpathentry combineaccessrules="false" exported="true" kind="src" path="/JOSM-commons-imaging"/> 7 <classpathentry exported="true" kind="lib" path="/home/nokutu/josm/dist/commons-imaging.jar"/> 7 8 <classpathentry kind="output" path="bin"/> 8 9 </classpath> -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImageDisplay.java
r31223 r31245 19 19 20 20 import javax.swing.JComponent; 21 import javax.swing.JLabel; 22 import javax.swing.SwingConstants; 21 import javax.swing.JPanel; 23 22 24 23 /** … … 48 47 */ 49 48 private Rectangle selectedRect = null; 50 51 p rivate JLabel hyperlink;49 50 public HyperlinkLabel hyperlink; 52 51 53 52 private class ImgDisplayMouseListener implements MouseListener, … … 315 314 addMouseMotionListener(mouseListener); 316 315 this.setLayout(new BorderLayout()); 317 hyperlink = new JLabel("Prueba", SwingConstants.RIGHT); 318 hyperlink.setForeground(Color.BLUE); 319 this.add(hyperlink, BorderLayout.SOUTH); 316 JPanel southPanel = new JPanel(); 317 southPanel.setLayout(new BorderLayout()); 318 hyperlink = new HyperlinkLabel(); 319 southPanel.add(hyperlink, BorderLayout.EAST); 320 southPanel.setOpaque(false); 321 322 add(southPanel, BorderLayout.SOUTH); 320 323 } 321 324 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryToggleDialog.java
r31219 r31245 19 19 import org.openstreetmap.josm.data.cache.CacheEntryAttributes; 20 20 import org.openstreetmap.josm.data.cache.ICachedLoaderListener; 21 import org.openstreetmap.josm.data.cache.JCSCacheManager;22 21 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; 23 22 import org.openstreetmap.josm.gui.SideButton; … … 113 112 this.previousButton.setEnabled(false); 114 113 115 try { 116 this.mapillaryImageDisplay.setImage(null); 117 MapillaryPlugin.CACHE = JCSCacheManager.getCache("mapillary"); 118 if (thumbnailCache != null) 119 thumbnailCache.cancelOutstandingTasks(); 120 thumbnailCache = new MapillaryCache(image.getKey(), 121 MapillaryCache.Type.THUMBNAIL); 122 thumbnailCache.submit(this, false); 123 124 if (imageCache != null) 125 imageCache.cancelOutstandingTasks(); 126 imageCache = new MapillaryCache(image.getKey(), 127 MapillaryCache.Type.FULL_IMAGE); 128 imageCache.submit(this, false); 129 } catch (IOException e) { 130 Main.error(e); 131 } 114 mapillaryImageDisplay.hyperlink.setURL(image.getKey()); 115 this.mapillaryImageDisplay.setImage(null); 116 if (thumbnailCache != null) 117 thumbnailCache.cancelOutstandingTasks(); 118 thumbnailCache = new MapillaryCache(image.getKey(), 119 MapillaryCache.Type.THUMBNAIL); 120 thumbnailCache.submit(this, false); 121 122 if (imageCache != null) 123 imageCache.cancelOutstandingTasks(); 124 imageCache = new MapillaryCache(image.getKey(), 125 MapillaryCache.Type.FULL_IMAGE); 126 imageCache.submit(this, false); 127 132 128 } 133 129 } … … 266 262 } 267 263 } catch (IOException e) { 268 // TODO Auto-generated catch block269 264 e.printStackTrace(); 270 265 } … … 275 270 * Creates the layout of the dialog. 276 271 * 277 * @param data The content of the dialog 278 * @param buttons The buttons where you can click 279 * @param reverse {@code true} if the buttons should go at the top; {@code false} otherwise. 272 * @param data 273 * The content of the dialog 274 * @param buttons 275 * The buttons where you can click 276 * @param reverse 277 * {@code true} if the buttons should go at the top; 278 * {@code false} otherwise. 280 279 */ 281 280 public void createLayout(Component data, List<SideButton> buttons, -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/MapillaryCache.java
r31185 r31245 66 66 return false; 67 67 } 68 69 public void cancelOutstandingTasks() { 70 // TODO 71 } 68 72 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/commands/CommandMoveImage.java
r31222 r31245 7 7 import org.openstreetmap.josm.plugins.mapillary.MapillaryImage; 8 8 9 /** 10 * Command created when an image's position is changed. 11 * 12 * @author nokutu 13 * 14 */ 9 15 public class CommandMoveImage extends MapillaryCommand { 10 16 private List<MapillaryImage> images; … … 15 21 this.images = new ArrayList<>(images); 16 22 this.x = x; 17 this.y = y; 23 this.y = y; 18 24 } 19 20 25 21 26 @Override -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/commands/CommandTurnImage.java
r31222 r31245 7 7 import org.openstreetmap.josm.plugins.mapillary.MapillaryImage; 8 8 9 /** 10 * Command created when a image's direction is changed. 11 * 12 * @author nokutu 13 * 14 */ 9 15 public class CommandTurnImage extends MapillaryCommand { 10 16 private List<MapillaryImage> images; … … 15 21 this.ca = ca; 16 22 } 17 18 23 19 24 @Override -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/commands/MapillaryCommand.java
r31222 r31245 1 1 package org.openstreetmap.josm.plugins.mapillary.commands; 2 2 3 /** 4 * Abstract class for any Mapillary command. 5 * 6 * @author nokutu 7 * 8 */ 9 public abstract class MapillaryCommand { 3 10 4 public abstract class MapillaryCommand {5 6 11 public abstract void undo(); 12 7 13 public abstract void redo(); 8 14 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/commands/MapillaryRecord.java
r31222 r31245 3 3 import java.util.ArrayList; 4 4 5 5 /** 6 * History record system in order to let you undo commands 7 * @author nokutu 8 * 9 */ 6 10 public class MapillaryRecord { 7 11 public static MapillaryRecord INSTANCE; 8 12 9 13 public ArrayList<MapillaryCommand> commandList; 10 14 /** Last written command */ 11 15 public int position; 12 16 13 17 public MapillaryRecord() { 14 18 commandList = new ArrayList<>(); 15 19 position = -1; 16 20 } 17 21 18 22 public static synchronized MapillaryRecord getInstance() { 19 23 if (MapillaryRecord.INSTANCE == null) … … 21 25 return MapillaryRecord.INSTANCE; 22 26 } 23 27 28 /** 29 * Adds a new command to the list. 30 * 31 * @param command 32 */ 24 33 public void addCommand(MapillaryCommand command) { 25 34 commandList.add(position + 1, command); … … 29 38 } 30 39 } 31 40 41 /** 42 * Undo latest command. 43 */ 32 44 public void undo() { 33 45 if (position == -1) … … 36 48 position--; 37 49 } 38 50 51 /** 52 * Redo latest undoed action. 53 */ 39 54 public void redo() { 40 55 if (position >= commandList.size()) -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySequenceDownloadThread.java
r31219 r31245 53 53 JsonArray jsonseq = jsonall.getJsonArray("ss"); 54 54 // At the moment there is a bug with some sequences at Mapillay API, 55 // so if they are w orng he use this variable to skip them.55 // so if they are wrong he use this variable to skip them. 56 56 boolean isSequenceWrong = false; 57 57 for (int i = 0; i < jsonseq.size(); i++) {
Note:
See TracChangeset
for help on using the changeset viewer.