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

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

findbugs

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