Changeset 31324 in osm for applications/editors/josm/plugins/mapillary
- Timestamp:
- 2015-07-01T12:48:19+02:00 (9 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/downloads/MapillarySquareDownloadManagerThread.java
r31322 r31324 45 45 .setHelpText("Downloading image's information"); 46 46 completeImages(); 47 MapillaryToggleDialog.getInstance().updateTitle(); 47 48 Main.map.statusLine.setHelpText("Downloading signs"); 48 49 downloadSigns(); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryToggleDialog.java
r31322 r31324 45 45 */ 46 46 public class MapillaryToggleDialog extends ToggleDialog implements 47 ICachedLoaderListener, MapillaryDataListener { 48 49 public final static String BASE_TITLE = "Mapillary picture"; 50 51 public static MapillaryToggleDialog INSTANCE; 52 53 public volatile MapillaryAbstractImage image; 54 55 public final SideButton nextButton = new SideButton(new nextPictureAction()); 56 public final SideButton previousButton = new SideButton( 57 new previousPictureAction()); 58 public final SideButton redButton = new SideButton(new redAction()); 59 public final SideButton blueButton = new SideButton(new blueAction()); 60 61 private JPanel buttonsPanel; 62 63 public MapillaryImageDisplay mapillaryImageDisplay; 64 65 private MapillaryCache imageCache; 66 private MapillaryCache thumbnailCache; 67 68 public MapillaryToggleDialog() { 69 super(tr(BASE_TITLE), "mapillary.png", tr("Open Mapillary window"), 70 Shortcut.registerShortcut(tr("Mapillary dialog"), 71 tr("Open Mapillary main dialog"), KeyEvent.VK_M, 72 Shortcut.NONE), 200, false, MapillaryPreferenceSetting.class); 73 MapillaryData.getInstance().addListener(this); 74 addShortcuts(); 75 mapillaryImageDisplay = new MapillaryImageDisplay(); 76 77 blueButton.setForeground(Color.BLUE); 78 redButton.setForeground(Color.RED); 79 80 createLayout( 81 mapillaryImageDisplay, 82 Arrays.asList(new SideButton[] { blueButton, previousButton, 83 nextButton, redButton }), 84 Main.pref.getBoolean("mapillary.reverse-buttons")); 85 disableAllButtons(); 86 87 } 88 89 /** 90 * Adds the shortcuts to the buttons. 91 */ 92 private void addShortcuts() { 93 nextButton.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 94 KeyStroke.getKeyStroke("PAGE_DOWN"), "next"); 95 nextButton.getActionMap().put("next", new nextPictureAction()); 96 previousButton.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 97 KeyStroke.getKeyStroke("PAGE_UP"), "previous"); 98 previousButton.getActionMap().put("previous", new previousPictureAction()); 99 blueButton.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 100 KeyStroke.getKeyStroke("control PAGE_UP"), "blue"); 101 blueButton.getActionMap().put("blue", new blueAction()); 102 redButton.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 103 KeyStroke.getKeyStroke("control PAGE_DOWN"), "red"); 104 redButton.getActionMap().put("red", new redAction()); 105 } 106 107 public static MapillaryToggleDialog getInstance() { 108 if (INSTANCE == null) 109 INSTANCE = new MapillaryToggleDialog(); 110 return INSTANCE; 111 } 112 113 public static void destroyInstance() { 114 INSTANCE = null; 115 } 116 117 /** 118 * Downloads the image of the selected MapillaryImage and sets in the 119 * MapillaryImageDisplay object. 120 */ 121 public synchronized void updateImage() { 122 if (!SwingUtilities.isEventDispatchThread()) { 123 SwingUtilities.invokeLater(new Runnable() { 124 @Override 125 public void run() { 126 updateImage(); 127 } 128 }); 129 } else { 130 if (MapillaryLayer.INSTANCE == null) { 131 return; 132 } 133 if (this.image == null) { 134 mapillaryImageDisplay.setImage(null); 135 setTitle(tr(BASE_TITLE)); 136 disableAllButtons(); 137 return; 138 } 139 if (image instanceof MapillaryImage) { 140 mapillaryImageDisplay.hyperlink.setVisible(true); 141 MapillaryImage mapillaryImage = (MapillaryImage) this.image; 142 String title = tr(BASE_TITLE); 143 if (mapillaryImage.getUser() != null) 144 title += " -- " + mapillaryImage.getUser(); 145 if (mapillaryImage.getCapturedAt() != 0) 146 title += " -- " + mapillaryImage.getDate(); 147 setTitle(title); 148 // Enables/disables next/previous buttons 149 this.nextButton.setEnabled(false); 150 this.previousButton.setEnabled(false); 151 if (((MapillaryImage) image).getSequence() != null) { 152 MapillaryImage tempImage = (MapillaryImage) image; 153 while (tempImage.next() != null) { 154 tempImage = tempImage.next(); 155 if (tempImage.isVisible()) { 156 this.nextButton.setEnabled(true); 157 break; 158 } 159 } 160 } 161 if (((MapillaryImage) image).getSequence() != null) { 162 MapillaryImage tempImage = (MapillaryImage) image; 163 while (tempImage.previous() != null) { 164 tempImage = tempImage.previous(); 165 if (tempImage.isVisible()) { 166 this.previousButton.setEnabled(true); 167 break; 168 } 169 } 170 } 171 172 mapillaryImageDisplay.hyperlink.setURL(mapillaryImage.getKey()); 173 // Downloads the thumbnail. 174 this.mapillaryImageDisplay.setImage(null); 175 if (thumbnailCache != null) 176 thumbnailCache.cancelOutstandingTasks(); 177 thumbnailCache = new MapillaryCache(mapillaryImage.getKey(), 178 MapillaryCache.Type.THUMBNAIL); 179 thumbnailCache.submit(this, false); 180 181 // Downloads the full resolution image. 182 if (imageCache != null) 183 imageCache.cancelOutstandingTasks(); 184 imageCache = new MapillaryCache(mapillaryImage.getKey(), 185 MapillaryCache.Type.FULL_IMAGE); 186 imageCache.submit(this, false); 187 } else if (image instanceof MapillaryImportedImage) { 188 mapillaryImageDisplay.hyperlink.setVisible(false); 189 this.nextButton.setEnabled(false); 190 this.previousButton.setEnabled(false); 191 MapillaryImportedImage mapillaryImage = (MapillaryImportedImage) this.image; 192 try { 193 mapillaryImageDisplay.setImage(mapillaryImage.getImage()); 194 } catch (IOException e) { 195 Main.error(e); 196 } 197 mapillaryImageDisplay.hyperlink.setURL(null); 198 } 199 } 200 } 201 202 private void disableAllButtons() { 203 nextButton.setEnabled(false); 204 previousButton.setEnabled(false); 205 blueButton.setEnabled(false); 206 redButton.setEnabled(false); 207 mapillaryImageDisplay.hyperlink.setVisible(false); 208 } 209 210 /** 211 * Sets a new MapillaryImage to be shown. 212 * 213 * @param image 214 */ 215 public synchronized void setImage(MapillaryAbstractImage image) { 216 this.image = image; 217 } 218 219 /** 220 * Returns the MapillaryImage objects which is being shown. 221 * 222 * @return 223 */ 224 public synchronized MapillaryAbstractImage getImage() { 225 return this.image; 226 } 227 228 /** 229 * Action class form the next image button. 230 * 231 * @author Jorge 232 * 233 */ 234 class nextPictureAction extends AbstractAction { 235 public nextPictureAction() { 236 putValue(NAME, tr("Next picture")); 237 putValue(SHORT_DESCRIPTION, 238 tr("Shows the next picture in the sequence")); 239 } 240 241 @Override 242 public void actionPerformed(ActionEvent e) { 243 if (MapillaryToggleDialog.getInstance().getImage() != null) { 244 MapillaryData.getInstance().selectNext(); 245 } 246 } 247 } 248 249 /** 250 * Action class for the previous image button. 251 * 252 * @author Jorge 253 * 254 */ 255 class previousPictureAction extends AbstractAction { 256 public previousPictureAction() { 257 putValue(NAME, tr("Previous picture")); 258 putValue(SHORT_DESCRIPTION, 259 tr("Shows the previous picture in the sequence")); 260 } 261 262 @Override 263 public void actionPerformed(ActionEvent e) { 264 if (MapillaryToggleDialog.getInstance().getImage() != null) { 265 MapillaryData.getInstance().selectPrevious(); 266 } 267 } 268 } 269 270 /** 271 * Action class to jump to the image following the red line. 272 * 273 * @author nokutu 274 * 275 */ 276 class redAction extends AbstractAction { 277 public redAction() { 278 putValue(NAME, tr("Jump to red")); 279 putValue( 280 SHORT_DESCRIPTION, 281 tr("Jumps to the picture at the other side of the red line")); 282 } 283 284 @Override 285 public void actionPerformed(ActionEvent e) { 286 if (MapillaryToggleDialog.getInstance().getImage() != null) { 287 MapillaryData.getInstance().setSelectedImage( 288 MapillaryLayer.RED, true); 289 } 290 } 291 } 292 293 /** 294 * Action class to jump to the image following the blue line. 295 * 296 * @author nokutu 297 * 298 */ 299 class blueAction extends AbstractAction { 300 public blueAction() { 301 putValue(NAME, tr("Jump to blue")); 302 putValue( 303 SHORT_DESCRIPTION, 304 tr("Jumps to the picture at the other side of the blue line")); 305 } 306 307 @Override 308 public void actionPerformed(ActionEvent e) { 309 if (MapillaryToggleDialog.getInstance().getImage() != null) { 310 MapillaryData.getInstance().setSelectedImage( 311 MapillaryLayer.BLUE, true); 312 } 313 } 314 } 315 316 /** 317 * When the pictures are returned from the cache, they are set in the 318 * {@link MapillaryImageDisplay} object. 319 */ 320 @Override 321 public void loadingFinished(final CacheEntry data, 322 final CacheEntryAttributes attributes, final LoadResult result) { 323 if (!SwingUtilities.isEventDispatchThread()) { 324 SwingUtilities.invokeLater(new Runnable() { 325 @Override 326 public void run() { 327 loadingFinished(data, attributes, result); 328 } 329 }); 330 } else if (data != null && result == LoadResult.SUCCESS) { 331 try { 332 BufferedImage img = ImageIO.read(new ByteArrayInputStream(data 333 .getContent())); 334 if (img == null) 335 return; 336 if (this.mapillaryImageDisplay.getImage() == null) 337 mapillaryImageDisplay.setImage(img); 338 else if (img.getHeight() > this.mapillaryImageDisplay 339 .getImage().getHeight()) { 340 mapillaryImageDisplay.setImage(img); 341 } 342 } catch (IOException e) { 343 Main.error(e); 344 } 345 } 346 } 347 348 /** 349 * Creates the layout of the dialog. 350 * 351 * @param data 352 * The content of the dialog 353 * @param buttons 354 * The buttons where you can click 355 * @param reverse 356 * {@code true} if the buttons should go at the top; 357 * {@code false} otherwise. 358 */ 359 public void createLayout(Component data, List<SideButton> buttons, 360 boolean reverse) { 361 this.removeAll(); 362 JPanel panel = new JPanel(); 363 panel.setLayout(new BorderLayout()); 364 panel.add(data, BorderLayout.CENTER); 365 if (reverse) { 366 buttonsPanel = new JPanel(new GridLayout(1, 1)); 367 if (!buttons.isEmpty() && buttons.get(0) != null) { 368 final JPanel buttonRowPanel = new JPanel(Main.pref.getBoolean( 369 "dialog.align.left", false) ? new FlowLayout( 370 FlowLayout.LEFT) : new GridLayout(1, buttons.size())); 371 buttonsPanel.add(buttonRowPanel); 372 for (SideButton button : buttons) 373 buttonRowPanel.add(button); 374 } 375 panel.add(buttonsPanel, BorderLayout.NORTH); 376 createLayout(panel, true, null); 377 } else 378 createLayout(panel, true, buttons); 379 this.add(titleBar, BorderLayout.NORTH); 380 } 381 382 @Override 383 public void selectedImageChanged(MapillaryAbstractImage oldImage, 384 MapillaryAbstractImage newImage) { 385 setImage(MapillaryData.getInstance().getSelectedImage()); 386 updateImage(); 387 } 388 389 @Override 390 public void imagesAdded() { 391 } 47 ICachedLoaderListener, MapillaryDataListener { 48 49 public final static String BASE_TITLE = "Mapillary picture"; 50 51 public static MapillaryToggleDialog INSTANCE; 52 53 public volatile MapillaryAbstractImage image; 54 55 public final SideButton nextButton = new SideButton(new nextPictureAction()); 56 public final SideButton previousButton = new SideButton( 57 new previousPictureAction()); 58 public final SideButton redButton = new SideButton(new redAction()); 59 public final SideButton blueButton = new SideButton(new blueAction()); 60 61 private JPanel buttonsPanel; 62 63 public MapillaryImageDisplay mapillaryImageDisplay; 64 65 private MapillaryCache imageCache; 66 private MapillaryCache thumbnailCache; 67 68 public MapillaryToggleDialog() { 69 super(tr(BASE_TITLE), "mapillary.png", tr("Open Mapillary window"), 70 Shortcut.registerShortcut(tr("Mapillary dialog"), 71 tr("Open Mapillary main dialog"), KeyEvent.VK_M, 72 Shortcut.NONE), 200, false, 73 MapillaryPreferenceSetting.class); 74 MapillaryData.getInstance().addListener(this); 75 addShortcuts(); 76 mapillaryImageDisplay = new MapillaryImageDisplay(); 77 78 blueButton.setForeground(Color.BLUE); 79 redButton.setForeground(Color.RED); 80 81 createLayout( 82 mapillaryImageDisplay, 83 Arrays.asList(new SideButton[] { blueButton, previousButton, 84 nextButton, redButton }), 85 Main.pref.getBoolean("mapillary.reverse-buttons")); 86 disableAllButtons(); 87 88 } 89 90 /** 91 * Adds the shortcuts to the buttons. 92 */ 93 private void addShortcuts() { 94 nextButton.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 95 KeyStroke.getKeyStroke("PAGE_DOWN"), "next"); 96 nextButton.getActionMap().put("next", new nextPictureAction()); 97 previousButton.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 98 KeyStroke.getKeyStroke("PAGE_UP"), "previous"); 99 previousButton.getActionMap().put("previous", 100 new previousPictureAction()); 101 blueButton.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 102 KeyStroke.getKeyStroke("control PAGE_UP"), "blue"); 103 blueButton.getActionMap().put("blue", new blueAction()); 104 redButton.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 105 KeyStroke.getKeyStroke("control PAGE_DOWN"), "red"); 106 redButton.getActionMap().put("red", new redAction()); 107 } 108 109 public static MapillaryToggleDialog getInstance() { 110 if (INSTANCE == null) 111 INSTANCE = new MapillaryToggleDialog(); 112 return INSTANCE; 113 } 114 115 public static void destroyInstance() { 116 INSTANCE = null; 117 } 118 119 /** 120 * Downloads the image of the selected MapillaryImage and sets in the 121 * MapillaryImageDisplay object. 122 */ 123 public synchronized void updateImage() { 124 if (!SwingUtilities.isEventDispatchThread()) { 125 SwingUtilities.invokeLater(new Runnable() { 126 @Override 127 public void run() { 128 updateImage(); 129 } 130 }); 131 } else { 132 if (MapillaryLayer.INSTANCE == null) { 133 return; 134 } 135 if (this.image == null) { 136 mapillaryImageDisplay.setImage(null); 137 setTitle(tr(BASE_TITLE)); 138 disableAllButtons(); 139 return; 140 } 141 if (image instanceof MapillaryImage) { 142 mapillaryImageDisplay.hyperlink.setVisible(true); 143 MapillaryImage mapillaryImage = (MapillaryImage) this.image; 144 updateTitle(); 145 // Enables/disables next/previous buttons 146 this.nextButton.setEnabled(false); 147 this.previousButton.setEnabled(false); 148 if (((MapillaryImage) image).getSequence() != null) { 149 MapillaryImage tempImage = (MapillaryImage) image; 150 while (tempImage.next() != null) { 151 tempImage = tempImage.next(); 152 if (tempImage.isVisible()) { 153 this.nextButton.setEnabled(true); 154 break; 155 } 156 } 157 } 158 if (((MapillaryImage) image).getSequence() != null) { 159 MapillaryImage tempImage = (MapillaryImage) image; 160 while (tempImage.previous() != null) { 161 tempImage = tempImage.previous(); 162 if (tempImage.isVisible()) { 163 this.previousButton.setEnabled(true); 164 break; 165 } 166 } 167 } 168 169 mapillaryImageDisplay.hyperlink.setURL(mapillaryImage.getKey()); 170 // Downloads the thumbnail. 171 this.mapillaryImageDisplay.setImage(null); 172 if (thumbnailCache != null) 173 thumbnailCache.cancelOutstandingTasks(); 174 thumbnailCache = new MapillaryCache(mapillaryImage.getKey(), 175 MapillaryCache.Type.THUMBNAIL); 176 thumbnailCache.submit(this, false); 177 178 // Downloads the full resolution image. 179 if (imageCache != null) 180 imageCache.cancelOutstandingTasks(); 181 imageCache = new MapillaryCache(mapillaryImage.getKey(), 182 MapillaryCache.Type.FULL_IMAGE); 183 imageCache.submit(this, false); 184 } else if (image instanceof MapillaryImportedImage) { 185 mapillaryImageDisplay.hyperlink.setVisible(false); 186 this.nextButton.setEnabled(false); 187 this.previousButton.setEnabled(false); 188 MapillaryImportedImage mapillaryImage = (MapillaryImportedImage) this.image; 189 try { 190 mapillaryImageDisplay.setImage(mapillaryImage.getImage()); 191 } catch (IOException e) { 192 Main.error(e); 193 } 194 mapillaryImageDisplay.hyperlink.setURL(null); 195 } 196 } 197 } 198 199 private void disableAllButtons() { 200 nextButton.setEnabled(false); 201 previousButton.setEnabled(false); 202 blueButton.setEnabled(false); 203 redButton.setEnabled(false); 204 mapillaryImageDisplay.hyperlink.setVisible(false); 205 } 206 207 /** 208 * Sets a new MapillaryImage to be shown. 209 * 210 * @param image 211 */ 212 public synchronized void setImage(MapillaryAbstractImage image) { 213 this.image = image; 214 } 215 216 public synchronized void updateTitle() { 217 if (!SwingUtilities.isEventDispatchThread()) { 218 SwingUtilities.invokeLater(new Runnable() { 219 @Override 220 public void run() { 221 updateTitle(); 222 } 223 }); 224 } else { 225 MapillaryImage mapillaryImage = (MapillaryImage) this.image; 226 String title = tr(BASE_TITLE); 227 if (mapillaryImage.getUser() != null) 228 title += " -- " + mapillaryImage.getUser(); 229 if (mapillaryImage.getCapturedAt() != 0) 230 title += " -- " + mapillaryImage.getDate(); 231 setTitle(title); 232 } 233 } 234 235 /** 236 * Returns the MapillaryImage objects which is being shown. 237 * 238 * @return 239 */ 240 public synchronized MapillaryAbstractImage getImage() { 241 return this.image; 242 } 243 244 /** 245 * Action class form the next image button. 246 * 247 * @author Jorge 248 * 249 */ 250 class nextPictureAction extends AbstractAction { 251 public nextPictureAction() { 252 putValue(NAME, tr("Next picture")); 253 putValue(SHORT_DESCRIPTION, 254 tr("Shows the next picture in the sequence")); 255 } 256 257 @Override 258 public void actionPerformed(ActionEvent e) { 259 if (MapillaryToggleDialog.getInstance().getImage() != null) { 260 MapillaryData.getInstance().selectNext(); 261 } 262 } 263 } 264 265 /** 266 * Action class for the previous image button. 267 * 268 * @author Jorge 269 * 270 */ 271 class previousPictureAction extends AbstractAction { 272 public previousPictureAction() { 273 putValue(NAME, tr("Previous picture")); 274 putValue(SHORT_DESCRIPTION, 275 tr("Shows the previous picture in the sequence")); 276 } 277 278 @Override 279 public void actionPerformed(ActionEvent e) { 280 if (MapillaryToggleDialog.getInstance().getImage() != null) { 281 MapillaryData.getInstance().selectPrevious(); 282 } 283 } 284 } 285 286 /** 287 * Action class to jump to the image following the red line. 288 * 289 * @author nokutu 290 * 291 */ 292 class redAction extends AbstractAction { 293 public redAction() { 294 putValue(NAME, tr("Jump to red")); 295 putValue( 296 SHORT_DESCRIPTION, 297 tr("Jumps to the picture at the other side of the red line")); 298 } 299 300 @Override 301 public void actionPerformed(ActionEvent e) { 302 if (MapillaryToggleDialog.getInstance().getImage() != null) { 303 MapillaryData.getInstance().setSelectedImage( 304 MapillaryLayer.RED, true); 305 } 306 } 307 } 308 309 /** 310 * Action class to jump to the image following the blue line. 311 * 312 * @author nokutu 313 * 314 */ 315 class blueAction extends AbstractAction { 316 public blueAction() { 317 putValue(NAME, tr("Jump to blue")); 318 putValue( 319 SHORT_DESCRIPTION, 320 tr("Jumps to the picture at the other side of the blue line")); 321 } 322 323 @Override 324 public void actionPerformed(ActionEvent e) { 325 if (MapillaryToggleDialog.getInstance().getImage() != null) { 326 MapillaryData.getInstance().setSelectedImage( 327 MapillaryLayer.BLUE, true); 328 } 329 } 330 } 331 332 /** 333 * When the pictures are returned from the cache, they are set in the 334 * {@link MapillaryImageDisplay} object. 335 */ 336 @Override 337 public void loadingFinished(final CacheEntry data, 338 final CacheEntryAttributes attributes, final LoadResult result) { 339 if (!SwingUtilities.isEventDispatchThread()) { 340 SwingUtilities.invokeLater(new Runnable() { 341 @Override 342 public void run() { 343 loadingFinished(data, attributes, result); 344 } 345 }); 346 } else if (data != null && result == LoadResult.SUCCESS) { 347 try { 348 BufferedImage img = ImageIO.read(new ByteArrayInputStream(data 349 .getContent())); 350 if (img == null) 351 return; 352 if (this.mapillaryImageDisplay.getImage() == null) 353 mapillaryImageDisplay.setImage(img); 354 else if (img.getHeight() > this.mapillaryImageDisplay 355 .getImage().getHeight()) { 356 mapillaryImageDisplay.setImage(img); 357 } 358 } catch (IOException e) { 359 Main.error(e); 360 } 361 } 362 } 363 364 /** 365 * Creates the layout of the dialog. 366 * 367 * @param data 368 * The content of the dialog 369 * @param buttons 370 * The buttons where you can click 371 * @param reverse 372 * {@code true} if the buttons should go at the top; 373 * {@code false} otherwise. 374 */ 375 public void createLayout(Component data, List<SideButton> buttons, 376 boolean reverse) { 377 this.removeAll(); 378 JPanel panel = new JPanel(); 379 panel.setLayout(new BorderLayout()); 380 panel.add(data, BorderLayout.CENTER); 381 if (reverse) { 382 buttonsPanel = new JPanel(new GridLayout(1, 1)); 383 if (!buttons.isEmpty() && buttons.get(0) != null) { 384 final JPanel buttonRowPanel = new JPanel(Main.pref.getBoolean( 385 "dialog.align.left", false) ? new FlowLayout( 386 FlowLayout.LEFT) : new GridLayout(1, buttons.size())); 387 buttonsPanel.add(buttonRowPanel); 388 for (SideButton button : buttons) 389 buttonRowPanel.add(button); 390 } 391 panel.add(buttonsPanel, BorderLayout.NORTH); 392 createLayout(panel, true, null); 393 } else 394 createLayout(panel, true, buttons); 395 this.add(titleBar, BorderLayout.NORTH); 396 } 397 398 @Override 399 public void selectedImageChanged(MapillaryAbstractImage oldImage, 400 MapillaryAbstractImage newImage) { 401 setImage(MapillaryData.getInstance().getSelectedImage()); 402 updateImage(); 403 } 404 405 @Override 406 public void imagesAdded() { 407 } 392 408 }
Note:
See TracChangeset
for help on using the changeset viewer.