Changeset 31178 in osm for applications/editors
- Timestamp:
- 2015-06-02T12:47:58+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryToggleDialog.java
r31175 r31178 10 10 import java.io.ByteArrayInputStream; 11 11 import java.io.IOException; 12 import java.util.Arrays; 12 13 import java.util.HashMap; 13 14 … … 55 56 56 57 public MapillaryToggleDialog() { 57 super(tr("Mapillary image"), "mapillary.png", tr("Open Mapillary window"),58 null, 200);58 super(tr("Mapillary image"), "mapillary.png", 59 tr("Open Mapillary window"), null, 200); 59 60 mapillaryImageDisplay = new MapillaryImageDisplay(); 60 61 this.add(mapillaryImageDisplay); 61 62 buttons = new JPanel(); 62 63 buttons.setLayout(new FlowLayout(FlowLayout.CENTER)); 63 blueButton.setBackground(Color.BLUE); 64 redButton.setBackground(Color.RED); 65 blueButton.setForeground(Color.WHITE); 66 redButton.setForeground(Color.WHITE); 64 blueButton.setForeground(Color.BLUE); 65 redButton.setForeground(Color.RED); 67 66 buttons.add(blueButton); 68 67 buttons.add(previousButton); 69 buttons.add(nextButton); 68 buttons.add(nextButton); 70 69 buttons.add(redButton); 71 70 72 71 this.add(buttons, BorderLayout.SOUTH); 72 73 createLayout( 74 mapillaryImageDisplay, 75 true, 76 Arrays.asList(new SideButton[] { blueButton, previousButton, 77 nextButton, redButton })); 73 78 } 74 79 … … 111 116 200000, new HashMap<String, String>()); 112 117 thumbnailCache.submit(this, false); 113 118 114 119 if (imageCache != null) 115 120 imageCache.cancelOutstandingTasks(); … … 189 194 } 190 195 } 191 196 192 197 class redAction extends AbstractAction { 193 198 public redAction() { … … 200 205 public void actionPerformed(ActionEvent e) { 201 206 if (MapillaryToggleDialog.getInstance().getImage() != null) { 202 MapillaryData.getInstance().setSelectedImage(MapillaryLayer.RED); 203 MapillaryToggleDialog.getInstance().setImage(MapillaryLayer.RED); 207 MapillaryData.getInstance() 208 .setSelectedImage(MapillaryLayer.RED); 209 MapillaryToggleDialog.getInstance() 210 .setImage(MapillaryLayer.RED); 204 211 MapillaryToggleDialog.getInstance().updateImage(); 205 212 Main.map.mapView.zoomTo(MapillaryData.getInstance() … … 208 215 } 209 216 } 210 217 211 218 class blueAction extends AbstractAction { 212 219 public blueAction() { … … 219 226 public void actionPerformed(ActionEvent e) { 220 227 if (MapillaryToggleDialog.getInstance().getImage() != null) { 221 MapillaryData.getInstance().setSelectedImage(MapillaryLayer.BLUE); 222 MapillaryToggleDialog.getInstance().setImage(MapillaryLayer.BLUE); 228 MapillaryData.getInstance().setSelectedImage( 229 MapillaryLayer.BLUE); 230 MapillaryToggleDialog.getInstance().setImage( 231 MapillaryLayer.BLUE); 223 232 MapillaryToggleDialog.getInstance().updateImage(); 224 233 Main.map.mapView.zoomTo(MapillaryData.getInstance() … … 242 251 } 243 252 }); 244 } else if (data != null) {253 } else if (data != null) { 245 254 try { 246 255 BufferedImage img = ImageIO.read(new ByteArrayInputStream(data -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySequenceDownloadThread.java
r31176 r31178 65 65 .getJsonNumber(j).doubleValue())); 66 66 } catch (Exception e) { 67 System.out.println(e);67 Main.error(e); 68 68 } 69 69 }
Note:
See TracChangeset
for help on using the changeset viewer.