Ignore:
Timestamp:
2015-06-16T18:31:23+02:00 (9 years ago)
Author:
nokutu
Message:

Code cleaned and commented

Location:
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java

    r31270 r31271  
    1515 *
    1616 * @author nokutu
    17  * @see MapillaryImage
     17 * @see MapillaryAbstractImage
    1818 * @see MapillarySequence
    1919 *
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryMouseAdapter.java

    r31270 r31271  
    180180        public void mouseMoved(MouseEvent e) {
    181181                MapillaryAbstractImage closestTemp = getClosest(e.getPoint());
    182 
     182                // TODO check if it is possible to do this while the OSM data layer is
     183                // selected.
    183184                if (Main.map.mapView.getActiveLayer() instanceof MapillaryLayer
    184185                                && MapillaryData.getInstance().getHoveredImage() != closestTemp
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java

    r31270 r31271  
    4343        public static final ImageIcon MAP_SIGNAL = new ImageProvider("signal.png")
    4444                        .get();
    45         public static final ImageIcon MAP_ICON_HOVER = new ImageProvider("hover.png").get();
     45        public static final ImageIcon MAP_ICON_HOVER = new ImageProvider(
     46                        "hover.png").get();
    4647        public static final int ICON_SIZE = 24;
    4748
     
    7475                IMPORT_MENU = MainMenu.add(Main.main.menu.fileMenu, importAction,
    7576                                false, 14);
    76                 SIGNAL_MENU = MainMenu.add(Main.main.menu.dataMenu, signalAction,
    77                                 false);
    78                 ZOOM_MENU = MainMenu.add(Main.main.menu.viewMenu, zoomAction,
    79                                 false, 15);
     77                SIGNAL_MENU = MainMenu
     78                                .add(Main.main.menu.dataMenu, signalAction, false);
     79                ZOOM_MENU = MainMenu
     80                                .add(Main.main.menu.viewMenu, zoomAction, false, 15);
    8081
    8182                EXPORT_MENU.setEnabled(false);
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportAction.java

    r31266 r31271  
    2727import org.openstreetmap.josm.tools.Shortcut;
    2828
     29/**
     30 * Imports a set of picture files into JOSM. They must be in jpg or png format.
     31 *
     32 * @author nokutu
     33 *
     34 */
    2935public class MapillaryImportAction extends JosmAction {
    3036
    3137        public JFileChooser chooser;
    3238
     39        /**
     40         * Amount of pictures without the proper EXIF tags.
     41         */
    3342        private int noTagsPics = 0;
    3443
     
    8392        }
    8493
     94        /**
     95         * Reads a jpg pictures that contains the needed GPS information (position
     96         * and direction) and creates a new icon in that position.
     97         *
     98         * @param file
     99         * @throws ImageReadException
     100         * @throws IOException
     101         */
    85102        public void readJPG(File file) throws ImageReadException, IOException {
    86103                final ImageMetadata metadata = Imaging.getMetadata(file);
     
    122139        }
    123140
     141        /**
     142         * Reads a image file that doesn't contain the needed GPS information. And
     143         * creates a new icon in the middle of the map.
     144         *
     145         * @param file
     146         */
    124147        private void readNoTags(File file) {
    125148                double HORIZONTAL_DISTANCE = 0.0001;
     
    132155                                Main.map.mapView.getCenter());
    133156                MapillaryData.getInstance().add(
    134                                 new MapillaryImportedImage(pos.lat(), pos.lon() + horDev, 0, file));
     157                                new MapillaryImportedImage(pos.lat(), pos.lon() + horDev, 0,
     158                                                file));
    135159                noTagsPics++;
    136160        }
Note: See TracChangeset for help on using the changeset viewer.