source: osm/applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionRefineGeoRef.java@ 32556

Last change on this file since 32556 was 32556, checked in by donvip, 8 years ago

checkstyle

File size: 1.3 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package cadastre_fr;
3
4import static org.openstreetmap.josm.tools.I18n.marktr;
5import static org.openstreetmap.josm.tools.I18n.tr;
6
7import java.awt.event.ActionEvent;
8
9import org.openstreetmap.josm.Main;
10import org.openstreetmap.josm.actions.JosmAction;
11
12public class MenuActionRefineGeoRef extends JosmAction {
13
14 public static String name = marktr("Refine georeferencing");
15
16 private WMSLayer wmsLayer;
17 private RasterImageGeoreferencer rasterImageGeoreferencer;
18
19 public MenuActionRefineGeoRef(WMSLayer wmsLayer) {
20 super(tr(name), null, tr("Improve georeferencing (only raster images)"), null, false);
21 this.wmsLayer = wmsLayer;
22 rasterImageGeoreferencer = new RasterImageGeoreferencer();
23 }
24
25 @Override
26 public void actionPerformed(ActionEvent arg0) {
27 if (!wmsLayer.isRaster()) {
28 Main.info("MenuActionRefineGeoRef called for unexpected layer type");
29 return;
30 }
31 if (CadastrePlugin.isCadastreProjection()) {
32 //wmsLayer = WMSDownloadAction.getLayer();
33 } else {
34 CadastrePlugin.askToChangeProjection();
35 }
36 rasterImageGeoreferencer.addListener();
37 rasterImageGeoreferencer.startGeoreferencing(wmsLayer);
38 }
39}
Note: See TracBrowser for help on using the repository browser.