Ignore:
Timestamp:
2018-08-11T17:29:48+02:00 (6 years ago)
Author:
Don-vip
Message:

see #15229 - deprecate all Main methods related to projections. New ProjectionRegistry class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java

    r13867 r14120  
    2626import org.openstreetmap.josm.data.coor.LatLon;
    2727import org.openstreetmap.josm.data.imagery.OffsetBookmark;
     28import org.openstreetmap.josm.data.projection.ProjectionRegistry;
    2829import org.openstreetmap.josm.gui.ExtendedDialog;
    2930import org.openstreetmap.josm.gui.MainApplication;
     
    7475        }
    7576        old = layer.getDisplaySettings().getOffsetBookmark();
    76         EastNorth curOff = old == null ? EastNorth.ZERO : old.getDisplacement(Main.getProjection());
     77        EastNorth curOff = old == null ? EastNorth.ZERO : old.getDisplacement(ProjectionRegistry.getProjection());
    7778        LatLon center;
    7879        if (MainApplication.isDisplayingMapView()) {
    79             center = Main.getProjection().eastNorth2latlon(MainApplication.getMap().mapView.getCenter());
     80            center = ProjectionRegistry.getProjection().eastNorth2latlon(MainApplication.getMap().mapView.getCenter());
    8081        } else {
    8182            center = LatLon.ZERO;
    8283        }
    8384        tempOffset = new OffsetBookmark(
    84                 Main.getProjection().toCode(),
     85                ProjectionRegistry.getProjection().toCode(),
    8586                layer.getInfo().getId(),
    8687                layer.getInfo().getName(),
     
    258259                    "You can also enter east and north offset in the {0} coordinates.\n" +
    259260                    "If you want to save the offset as bookmark, enter the bookmark name below",
    260                     Main.getProjection().toString())), GBC.eop());
     261                    ProjectionRegistry.getProjection().toString())), GBC.eop());
    261262            pnl.add(new JLabel(tr("Offset:")), GBC.std());
    262263            pnl.add(tOffset, GBC.eol().fill(GBC.HORIZONTAL).insets(0, 0, 0, 5));
     
    313314            if (layer != null) {
    314315                // Support projections with very small numbers (e.g. 4326)
    315                 int precision = Main.getProjection().getDefaultZoomInPPD() >= 1.0 ? 2 : 7;
     316                int precision = ProjectionRegistry.getProjection().getDefaultZoomInPPD() >= 1.0 ? 2 : 7;
    316317                // US locale to force decimal separator to be '.'
    317318                try (Formatter us = new Formatter(Locale.US)) {
Note: See TracChangeset for help on using the changeset viewer.