- Timestamp:
- 2012-09-08T12:18:04+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java
r5501 r5505 79 79 80 80 JFileChooser fc; 81 81 82 82 if (zipRequired) { 83 83 fc = createAndOpenFileChooser(false, false, tr("Save session"), joz, JFileChooser.FILES_ONLY, "lastDirectory"); … … 109 109 if (fn.indexOf('.') == -1) { 110 110 file = new File(file.getPath() + (zip ? ".joz" : ".jos")); 111 }112 if (!SaveActionBase.confirmOverwrite(file))113 return;111 if (!SaveActionBase.confirmOverwrite(file)) 112 return; 113 } 114 114 115 115 List<Layer> layersOut = new ArrayList<Layer>(); -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r5430 r5505 238 238 if (layer != null) { 239 239 Main.main.addLayer(layer); 240 layer.hook_up_mouse_events(); // Main.map.mapView should exist241 // now. Can add mouse listener242 Main.map.mapView.addPropertyChangeListener(layer);243 if (Main.map.getToggleDialog(ImageViewerDialog.class) == null) {244 ImageViewerDialog.newInstance();245 Main.map.addToggleDialog(ImageViewerDialog.getInstance());246 }247 240 248 241 if (! canceled && layer.data.size() > 0) { … … 270 263 } 271 264 272 p rivateGeoImageLayer(final List<ImageEntry> data, GpxLayer gpxLayer) {265 public GeoImageLayer(final List<ImageEntry> data, GpxLayer gpxLayer) { 273 266 274 267 super(tr("Geotagged Images")); … … 723 716 private MapModeChangeListener mapModeListener = null; 724 717 725 private void hook_up_mouse_events() { 718 @Override 719 public void hookUpMapView() { 726 720 mouseAdapter = new MouseAdapter() { 727 721 private final boolean isMapModeOk() { … … 808 802 } 809 803 }); 804 805 Main.map.mapView.addPropertyChangeListener(this); 806 if (Main.map.getToggleDialog(ImageViewerDialog.class) == null) { 807 ImageViewerDialog.newInstance(); 808 Main.map.addToggleDialog(ImageViewerDialog.getInstance()); 809 } 810 810 } 811 811 … … 839 839 } 840 840 841 public GpxLayer getGpxLayer() { 842 return gpxLayer; 843 } 844 841 845 public void jumpToNextMarker() { 842 846 showNextPhoto(); -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java
r4241 r5505 80 80 return exifTime; 81 81 } 82 LatLon getExifCoor() {82 public LatLon getExifCoor() { 83 83 return exifCoor; 84 84 } 85 85 public Double getExifImgDir() { 86 86 return exifImgDir; 87 } 88 89 public boolean hasThumbnail() { 90 return thumbnail != null; 87 91 } 88 92 … … 102 106 this.elevation = elevation; 103 107 } 104 void setFile(File file) {108 public void setFile(File file) { 105 109 this.file = file; 106 110 } 107 void setExifOrientation(Integer exifOrientation) {111 public void setExifOrientation(Integer exifOrientation) { 108 112 this.exifOrientation = exifOrientation; 109 113 } 110 void setExifTime(Date exifTime) {114 public void setExifTime(Date exifTime) { 111 115 this.exifTime = exifTime; 112 116 } 113 void setGpsTime(Date gpsTime) {117 public void setGpsTime(Date gpsTime) { 114 118 this.gpsTime = gpsTime; 115 119 } 116 void setExifCoor(LatLon exifCoor) {120 public void setExifCoor(LatLon exifCoor) { 117 121 this.exifCoor = exifCoor; 118 122 } 119 void setExifImgDir(double exifDir) {123 public void setExifImgDir(double exifDir) { 120 124 this.exifImgDir = exifDir; 121 125 } -
trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
r5501 r5505 58 58 registerSessionLayerImporter("imagery", ImagerySessionImporter.class); 59 59 registerSessionLayerImporter("tracks", GpxTracksSessionImporter.class); 60 registerSessionLayerImporter("geoimage", GeoImageSessionImporter.class); 60 61 } 61 62 … … 103 104 private String layerName; 104 105 private int layerIndex; 105 private Li nkedHashMap<Integer,SessionLayerImporter> layerDependencies;106 107 public ImportSupport(String layerName, int layerIndex, Li nkedHashMap<Integer,SessionLayerImporter> layerDependencies) {106 private List<LayerDependency> layerDependencies; 107 108 public ImportSupport(String layerName, int layerIndex, List<LayerDependency> layerDependencies) { 108 109 this.layerName = layerName; 109 110 this.layerIndex = layerIndex; … … 234 235 * layer. All the dependent importers have loaded completely at this point. 235 236 */ 236 public Li nkedHashMap<Integer,SessionLayerImporter> getLayerDependencies() {237 public List<LayerDependency> getLayerDependencies() { 237 238 return layerDependencies; 239 } 240 } 241 242 public static class LayerDependency { 243 private Integer index; 244 private Layer layer; 245 private SessionLayerImporter importer; 246 247 public LayerDependency(Integer index, Layer layer, SessionLayerImporter importer) { 248 this.index = index; 249 this.layer = layer; 250 this.importer = importer; 251 } 252 253 public SessionLayerImporter getImporter() { 254 return importer; 255 } 256 257 public Integer getIndex() { 258 return index; 259 } 260 261 public Layer getLayer() { 262 return layer; 238 263 } 239 264 } … … 338 363 } else { 339 364 importers.put(idx, imp); 340 Li nkedHashMap<Integer,SessionLayerImporter> depsImp = new LinkedHashMap<Integer,SessionLayerImporter>();365 List<LayerDependency> depsImp = new ArrayList<LayerDependency>(); 341 366 for (int d : deps.get(idx)) { 342 367 SessionLayerImporter dImp = importers.get(d); … … 356 381 } 357 382 } 358 depsImp. put(d, dImp);383 depsImp.add(new LayerDependency(d, layersMap.get(d), dImp)); 359 384 } 360 385 ImportSupport support = new ImportSupport(name, idx, depsImp); -
trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java
r5501 r5505 33 33 import org.openstreetmap.josm.gui.layer.TMSLayer; 34 34 import org.openstreetmap.josm.gui.layer.WMSLayer; 35 import org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer; 35 36 import org.openstreetmap.josm.tools.MultiMap; 36 37 import org.openstreetmap.josm.tools.Utils; … … 48 49 registerSessionLayerExporter(WMSLayer.class , ImagerySessionExporter.class); 49 50 registerSessionLayerExporter(GpxLayer.class , GpxTracksSessionExporter.class); 51 registerSessionLayerExporter(GeoImageLayer.class , GeoImageSessionExporter.class); 50 52 } 51 53
Note:
See TracChangeset
for help on using the changeset viewer.