Changeset 8510 in josm for trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
- Timestamp:
- 2015-06-20T23:42:21+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
r8509 r8510 84 84 content.add(imgDisplay, BorderLayout.CENTER); 85 85 86 Dimension buttonDim = new Dimension(26, 26);86 Dimension buttonDim = new Dimension(26, 26); 87 87 88 88 ImageAction prevAction = new ImageAction(COMMAND_PREVIOUS, ImageProvider.get("dialogs", "previous"), tr("Previous")); … … 160 160 btnCollapse = new JButton(new ImageAction(COMMAND_COLLAPSE, 161 161 ImageProvider.get("dialogs", "collapse"), tr("Move dialog to the side pane"))); 162 btnCollapse.setPreferredSize(new Dimension(20, 20));162 btnCollapse.setPreferredSize(new Dimension(20, 20)); 163 163 btnCollapse.setAlignmentY(Component.TOP_ALIGNMENT); 164 164 … … 203 203 class ImageAction extends AbstractAction { 204 204 private final String action; 205 205 206 public ImageAction(String action, ImageIcon icon, String toolTipText) { 206 207 this.action = action; … … 223 224 } else if (COMMAND_LAST.equals(action) && currentLayer != null) { 224 225 currentLayer.showLastPhoto(); 225 226 226 } else if (COMMAND_CENTERVIEW.equals(action)) { 227 227 centerView = ((JToggleButton) e.getSource()).isSelected(); … … 229 229 Main.map.mapView.zoomTo(currentEntry.getPos()); 230 230 } 231 232 231 } else if (COMMAND_ZOOM.equals(action)) { 233 232 imgDisplay.zoomBestFitOrOne(); 234 235 233 } else if (COMMAND_REMOVE.equals(action)) { 236 234 if (currentLayer != null) { … … 284 282 boolean imageChanged; 285 283 286 synchronized (this) {284 synchronized (this) { 287 285 // TODO: pop up image dialog but don't load image again 288 286 … … 392 390 public void activeLayerChange(Layer oldLayer, Layer newLayer) { 393 391 if (currentLayer == null && newLayer instanceof GeoImageLayer) { 394 ((GeoImageLayer) newLayer).showFirstPhoto();392 ((GeoImageLayer) newLayer).showFirstPhoto(); 395 393 } 396 394 } … … 399 397 public void layerAdded(Layer newLayer) { 400 398 if (currentLayer == null && newLayer instanceof GeoImageLayer) { 401 ((GeoImageLayer) newLayer).showFirstPhoto();399 ((GeoImageLayer) newLayer).showFirstPhoto(); 402 400 } 403 401 }
Note:
See TracChangeset
for help on using the changeset viewer.