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

Last change on this file since 30859 was 30859, checked in by donvip, 10 years ago

[josm_cadastre-fr] replace calls to System.out/err by calls to Main.info/warn/error

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