Changeset 33561 in osm


Ignore:
Timestamp:
2017-08-27T19:19:51+02:00 (7 years ago)
Author:
donvip
Message:

fix warnings

Location:
applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageEntries.java

    r33086 r33561  
    99
    1010import org.insignificant.josm.plugins.imagewaypoint.ImageEntry.IImageReadyListener;
    11 import org.openstreetmap.josm.Main;
    1211import org.openstreetmap.josm.data.gpx.WayPoint;
     12import org.openstreetmap.josm.gui.MainApplication;
    1313import org.openstreetmap.josm.gui.layer.GpxLayer;
    1414import org.openstreetmap.josm.gui.layer.Layer;
     
    7777        this.locatedImages.clear();
    7878
    79         final Collection<Layer> layerCollection = Main.getLayerManager().getLayers();
     79        final Collection<Layer> layerCollection = MainApplication.getLayerManager().getLayers();
    8080        final Layer[] layers = layerCollection.toArray(new Layer[layerCollection.size()]);
    8181
  • applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageWayPointDialog.java

    r33229 r33561  
    1515import org.insignificant.josm.plugins.imagewaypoint.actions.RotateLeftAction;
    1616import org.insignificant.josm.plugins.imagewaypoint.actions.RotateRightAction;
    17 import org.openstreetmap.josm.Main;
     17import org.openstreetmap.josm.gui.MainApplication;
    1818import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
    1919import org.openstreetmap.josm.tools.Shortcut;
     
    7070        this.rotateRightAction.setEnabled(null != ImageEntries.getInstance().getCurrentImageEntry());
    7171
    72         if (null != Main.map) {
    73             Main.map.repaint();
     72        if (null != MainApplication.getMap()) {
     73            MainApplication.getMap().repaint();
    7474        }
    7575    }
  • applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageWayPointLayer.java

    r33086 r33561  
    1313import javax.swing.Icon;
    1414
    15 import org.openstreetmap.josm.Main;
    1615import org.openstreetmap.josm.data.Bounds;
    1716import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
     17import org.openstreetmap.josm.gui.MainApplication;
    1818import org.openstreetmap.josm.gui.MapView;
    1919import org.openstreetmap.josm.gui.layer.Layer;
     
    4040                    // partly obscures another will match the click first
    4141                    for (int index = images.length - 1; !found && index >= 0; index--) {
    42                         final Rectangle bounds = images[index].getBounds(Main.map.mapView);
     42                        final Rectangle bounds = images[index].getBounds(MainApplication.getMap().mapView);
    4343                        if (null != bounds && bounds.contains(event.getPoint())) {
    4444                            found = true;
     
    5555        @Override
    5656        public void onAvailableImageEntriesChanged(final ImageEntries entries) {
    57             Main.map.repaint();
     57            MainApplication.getMap().repaint();
    5858        }
    5959
    6060        @Override
    6161        public void onSelectedImageEntryChanged(final ImageEntries entries) {
    62             Main.map.repaint();
     62            MainApplication.getMap().repaint();
    6363        }
    6464    }
     
    7070        super(tr("Imported Images"));
    7171
    72         Main.getLayerManager().addLayer(this);
     72        MainApplication.getLayerManager().addLayer(this);
    7373
    7474        this.layerMouseListener = new ImageWayPointMouseListener(this);
    75         Main.map.mapView.addMouseListener(this.layerMouseListener);
     75        MainApplication.getMap().mapView.addMouseListener(this.layerMouseListener);
    7676
    7777        this.imageChangeListener = new ImageChangeListener();
     
    156156        super.destroy();
    157157
    158         Main.map.mapView.removeMouseListener(this.layerMouseListener);
     158        MainApplication.getMap().mapView.removeMouseListener(this.layerMouseListener);
    159159        ImageEntries.getInstance().removeListener(this.imageChangeListener);
    160160    }
  • applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageWayPointPlugin.java

    r33557 r33561  
    1010import java.util.Locale;
    1111
    12 import org.openstreetmap.josm.Main;
    1312import org.openstreetmap.josm.actions.ExtensionFileFilter;
     13import org.openstreetmap.josm.gui.MainApplication;
    1414import org.openstreetmap.josm.gui.MapFrame;
    1515import org.openstreetmap.josm.gui.io.importexport.FileImporter;
     
    5050                // check to see whether there's already an ImageWayPointLayer
    5151                boolean foundImageWayPointLayer = false;
    52                 final Collection<Layer> layerCollection = Main.getLayerManager().getLayers();
     52                final Collection<Layer> layerCollection = MainApplication.getLayerManager().getLayers();
    5353                final Iterator<Layer> layerIterator = layerCollection.iterator();
    5454                while (layerIterator.hasNext() && !foundImageWayPointLayer) {
Note: See TracChangeset for help on using the changeset viewer.