Changeset 23795 in osm for applications


Ignore:
Timestamp:
2010-10-24T02:08:34+02:00 (14 years ago)
Author:
oliverw
Message:

Updated/fixed java doc and added license info if necessary.

Location:
applications/editors/josm/plugins
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/ColumbusCSV/src/org/openstreetmap/josm/plugins/columbusCSV/ColumbusCSVImporter.java

    r23708 r23795  
    3232/**
    3333 *
    34  * @author Oliver
     34 * @author Oliver Wieland <oliver.wieland@online.de>
    3535 *
    3636 */
  • applications/editors/josm/plugins/ColumbusCSV/src/org/openstreetmap/josm/plugins/columbusCSV/ColumbusCSVPlugin.java

    r23708 r23795  
    2323 * Plugin class to import Columbus V-900 CSV files into JOSM.
    2424 *
    25  * @author Oliver Wieland
     25 * @author Oliver Wieland <oliver.wieland@online.de> Wieland
    2626 *
    2727 */
  • applications/editors/josm/plugins/ColumbusCSV/src/org/openstreetmap/josm/plugins/columbusCSV/ColumbusCSVPreferences.java

    r23708 r23795  
    2929/**
    3030 * Implements the preferences dialog for this plugin.
    31  * @author Oliver
     31 * @author Oliver Wieland <oliver.wieland@online.de>
    3232 */
    3333public class ColumbusCSVPreferences implements PreferenceSetting, ItemListener {
  • applications/editors/josm/plugins/ColumbusCSV/src/org/openstreetmap/josm/plugins/columbusCSV/ColumbusCSVReader.java

    r23708 r23795  
    6969 *  </code>
    7070 *
    71  * @author Oliver
     71 * @author Oliver Wieland <oliver.wieland@online.de>
    7272 *
    7373 */
  • applications/editors/josm/plugins/ColumbusCSV/src/org/openstreetmap/josm/plugins/columbusCSV/WayPointHelper.java

    r23708 r23795  
    2929
    3030/**
    31  * @author Oliver Provides several static methods to access way point
     31 * @author Oliver Wieland <oliver.wieland@online.de> Provides several static methods to access way point
    3232 *         attributes.
    3333 */
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationMapMode.java

    r23709 r23795  
    2323
    2424/**
    25  * @author Oliver
    26  *
     25 * @author Oliver Wieland <oliver.wieland@online.de>
     26 * Provides the map mode and controls visibility of the elevation profile layer/panel.
    2727 */
    2828public class ElevationMapMode extends MapMode implements IElevationModelListener {
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationModel.java

    r23754 r23795  
    3838 * @see IElevationModelTrackListener
    3939 * @see IElevationModelSliceListener
    40  * @author Oliver
     40 * @author Oliver Wieland <oliver.wieland@online.de>
    4141 */
    4242public class ElevationModel extends ElevationProfileBase implements IGpxVisitor {
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationProfileBase.java

    r23764 r23795  
    3838 * {@link IElevationProfile} {@link IGpxWaypointVisitor} {@link GpxIterator}
    3939 *
    40  * @author Oliver
     40 * @author Oliver Wieland <oliver.wieland@online.de>
    4141 *
    4242 */
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationProfileLeaf.java

    r23709 r23795  
     1/**
     2 * This program is free software: you can redistribute it and/or modify it under
     3 * the terms of the GNU General Public License as published by the
     4 * Free Software Foundation, either version 3 of the License, or
     5 * (at your option) any later version.
     6 *
     7 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
     8 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     9 * See the GNU General Public License for more details.
     10 *
     11 * You should have received a copy of the GNU General Public License along with this program.
     12 * If not, see <http://www.gnu.org/licenses/>.
     13 */
    114package org.openstreetmap.josm.plugins.elevation;
    215
     
    1023 *
    1124 * ElevationModelSlice is intended to be used internally.
    12  * @author oliverwieland
     25 * @author Oliver Wieland <oliver.wieland@online.de>
    1326 *
    1427 */
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationProfileNode.java

    r23709 r23795  
     1/**
     2 * This program is free software: you can redistribute it and/or modify it under
     3 * the terms of the GNU General Public License as published by the
     4 * Free Software Foundation, either version 3 of the License, or
     5 * (at your option) any later version.
     6 *
     7 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
     8 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     9 * See the GNU General Public License for more details.
     10 *
     11 * You should have received a copy of the GNU General Public License along with this program.
     12 * If not, see <http://www.gnu.org/licenses/>.
     13 */
    114package org.openstreetmap.josm.plugins.elevation;
    215
     
    1124 * {@link ElevationProfileLeaf} which are accessible via {@link ElevationProfileBase#getChildren()}.
    1225 *
    13  * @author Oliver
     26 * @author Oliver Wieland <oliver.wieland@online.de>
    1427 *
    1528 * @see ElevationProfileBase
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationProfilePlugin.java

    r23721 r23795  
    2626/**
    2727 * Plugin class for displaying an elevation profile of the tracks.
    28  * @author Oliver
     28 * @author Oliver Wieland <oliver.wieland@online.de>
    2929 *
    3030 */
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ElevationWayPointKind.java

    r23764 r23795  
    1616
    1717/**
    18  * @author Oliver
    19  *
     18 * @author Oliver Wieland <oliver.wieland@online.de>
     19 * Enumeration which classifies way points within an elevation profile.
    2020 */
    2121public enum ElevationWayPointKind {
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/GeoidCorrectionKind.java

    r23709 r23795  
    1616
    1717/**
    18  * @author Oliver
    19  *
     18 * @author Oliver Wieland <oliver.wieland@online.de>
     19 * Enumeration for available elevation correction modes.
    2020 */
    2121public enum GeoidCorrectionKind {
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/GeoidData.java

    r23709 r23795  
    1616
    1717/**
    18  * Holds the geoid correction data.
    19  * @author Oliver
     18 * Holds the geoid correction data. The data has been generated; usually this class does not need to change.
     19 * @author Oliver Wieland <oliver.wieland@online.de>
    2020 */
    2121public class GeoidData {
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/GpxIterator.java

    r23709 r23795  
    2525/**
    2626 * Utility class to apply a visitor on GPX containers (track, route, data).
    27  * @author Oliver
     27 * @author Oliver Wieland <oliver.wieland@online.de>
    2828 */
    2929public class GpxIterator {
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/IElevationModelListener.java

    r23709 r23795  
    1919 * repaint UI widgets).
    2020 * {@link ElevationModel}
    21  * @author Oliver
     21 * @author Oliver Wieland <oliver.wieland@online.de>
    2222 */
    2323public interface IElevationModelListener {
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/IElevationProfile.java

    r23736 r23795  
    2121
    2222/**
    23  * @author Oliver
    24  *
     23 * @author Oliver Wieland <oliver.wieland@online.de>
     24 * Interface for an elevation profile providing special properties/values.
    2525 */
    2626public interface IElevationProfile {
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/IGpxVisitor.java

    r23709 r23795  
    2121
    2222/**
    23  * Interface for all GPX visitor.
    24  * @author Oliver
     23 * Interface for all GPX visitors.
     24 * @author Oliver Wieland <oliver.wieland@online.de>
    2525 */
    2626public interface IGpxVisitor extends IGpxWaypointVisitor {
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/IGpxWaypointVisitor.java

    r23709 r23795  
    1818
    1919/**
    20  * @author Oliver
    21  *
     20 * @author Oliver Wieland <oliver.wieland@online.de>
     21 * Interface for all GPX data visitors. Hopefully this will be part of JOSM some day.
    2222 */
    2323public interface IGpxWaypointVisitor {
    2424        /**
    25          * Visits a way point. This method is called for isolated way points, ie. way points
     25         * Visits a way point. This method is called for isolated way points, i. e. way points
    2626         * without an associated route or track.
    2727         * @param wp The way point to visit.
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/UnitMode.java

    r23769 r23795  
     1/**
     2 * This program is free software: you can redistribute it and/or modify it under
     3 * the terms of the GNU General Public License as published by the
     4 * Free Software Foundation, either version 3 of the License, or
     5 * (at your option) any later version.
     6 *
     7 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
     8 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     9 * See the GNU General Public License for more details.
     10 *
     11 * You should have received a copy of the GNU General Public License along with this program.
     12 * If not, see <http://www.gnu.org/licenses/>.
     13 */
     14
    115package org.openstreetmap.josm.plugins.elevation;
    216
     17/**
     18 * @author Oliver Wieland <oliver.wieland@online.de>
     19 * Enumeration for different unit types.
     20 */
    321public enum UnitMode {
    422        NotSelected,
    523        Metric,
    624        Imperial
     25        // Chinese system missing
    726}
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/WayPointHelper.java

    r23791 r23795  
    1515package org.openstreetmap.josm.plugins.elevation;
    1616
    17 import java.awt.Color;
    1817import java.util.ArrayList;
    1918import java.util.Calendar;
     
    2524
    2625/**
    27  * @author Oliver Provides several static methods to access way point
    28  *         attributes.
     26 * Provides methods to access way point attributes and some utility methods regarding elevation stuff (
     27 * e. g. special text formats, unit conversion, geoid calc).
     28 * @author Oliver Wieland <oliver.wieland@online.de>
    2929 */
    3030public class WayPointHelper {
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/DefaultElevationProfileRenderer.java

    r23769 r23795  
    3737
    3838/**
    39  * @author Oliver
    40  *
     39 * Provides default rendering for elevation profile layer.
     40 * @author Oliver Wieland <oliver.wieland@online.de>
    4141 */
    4242public class DefaultElevationProfileRenderer implements
     
    184184                int rad = REGULAR_WPT_RADIUS;
    185185                g.setColor(c);
    186                 // g.drawOval(pnt.x - rad, pnt.y - rad, r2, r2);
    187186                drawSphere(g, Color.WHITE, c, pnt.x, pnt.y, rad);
    188187
     188                /* Paint full hour label */
    189189                if (kind == ElevationWayPointKind.FullHour) {
    190190                        int hour = WayPointHelper.getHourOfWayPoint(wpt);
     
    193193                }
    194194
     195                /* Paint label for elevation levels */
    195196                if (kind == ElevationWayPointKind.ElevationLevelGain) {
    196197                        drawLabelWithTriangle(WayPointHelper.getElevationText(ele), pnt.x, pnt.y
     
    207208                }
    208209
     210                /* Paint cursor labels */
    209211                if (kind == ElevationWayPointKind.Highlighted) {
    210                         int eleH = (int) WayPointHelper.getElevation(wpt);
    211                         int hour = WayPointHelper.getHourOfWayPoint(wpt);
    212                         int min = WayPointHelper.getMinuteOfWayPoint(wpt);
    213212                        drawSphere(g, Color.WHITE, c, pnt.x, pnt.y, BIG_WPT_RADIUS);
    214                         drawLabel(String.format("%02d:%02d", hour, min), pnt.x, pnt.y
     213                        drawLabel(WayPointHelper.getTimeText(wpt), pnt.x, pnt.y
    215214                                        - g.getFontMetrics().getHeight() - 5, g);
    216                         drawLabel(WayPointHelper.getElevationText(eleH), pnt.x, pnt.y
     215                        drawLabel(WayPointHelper.getElevationText(wpt), pnt.x, pnt.y
    217216                                        + g.getFontMetrics().getHeight() + 5, g);
    218217                }
     
    345344
    346345        /**
    347          * Renders a start/end point
     346         * Renders a start/end point.
    348347         *
    349348         * @param g
     
    367366
    368367        /**
    369          * Draw a shaded sphere.
     368         * Draws a shaded sphere.
    370369         *
    371370         * @param g
     
    401400
    402401        /**
    403          * Draws a label.
     402         * Draws a label within a filled rounded rectangle with standard gradient colors.
    404403         *
    405404         * @param s
     
    417416
    418417        /**
    419          * Draws a label.
     418         * Draws a label within a filled rounded rectangle with the specified second gradient color (first color is <tt>Color.WHITE<tt>).
    420419         *
    421420         * @param s
     
    518517
    519518        /**
    520          * Checks, if the rectangle has been 'reserved' by a previous draw action.
     519         * Checks, if the rectangle has been 'reserved' by an previous draw action.
    521520         *
    522521         * @param r
    523522         *            The area to check for.
    524          * @return true; if area is already occupied by another rectangle.
     523         * @return true, if area is already occupied by another rectangle.
    525524         */
    526525        private boolean isForbiddenArea(Rectangle r) {
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationColors.java

    r23721 r23795  
    1919/**
    2020 * Contains some extra predefined colors.
    21  * @author Oliver
     21 * @author Oliver Wieland <oliver.wieland@online.de>
    2222 */
    2323public class ElevationColors {
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileDialog.java

    r23769 r23795  
    5353
    5454/**
    55  * @author Oliver
     55 * @author Oliver Wieland <oliver.wieland@online.de>
    5656 * Implements a JOSM ToggleDialog to show the elevation profile. It monitors the
    5757 * connection between layer and elevation profile.
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileLayer.java

    r23789 r23795  
    3838 * min/max elevation markers.
    3939 *
    40  * @author Oliver
     40 * @author Oliver Wieland <oliver.wieland@online.de>
    4141 *
    4242 */
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfilePanel.java

    r23791 r23795  
     1/**
     2 * This program is free software: you can redistribute it and/or modify it under
     3 * the terms of the GNU General Public License as published by the
     4 * Free Software Foundation, either version 3 of the License, or
     5 * (at your option) any later version.
     6 *
     7 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
     8 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     9 * See the GNU General Public License for more details.
     10 *
     11 * You should have received a copy of the GNU General Public License along with this program.
     12 * If not, see <http://www.gnu.org/licenses/>.
     13 */
    114package org.openstreetmap.josm.plugins.elevation.gui;
    215
     
    3043/**
    3144 * Provides the panel showing the elevation profile.
    32  * @author Oliver
     45 * @author Oliver Wieland <oliver.wieland@online.de>
    3346 *
    3447 */
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/IElevationProfileRenderer.java

    r23757 r23795  
    2929 * details.
    3030 *
    31  * @author Oliver
     31 * @author Oliver Wieland <oliver.wieland@online.de>
    3232 *
    3333 */
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/IElevationProfileSelectionListener.java

    r23721 r23795  
     1/**
     2 * This program is free software: you can redistribute it and/or modify it under
     3 * the terms of the GNU General Public License as published by the
     4 * Free Software Foundation, either version 3 of the License, or
     5 * (at your option) any later version.
     6 *
     7 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
     8 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     9 * See the GNU General Public License for more details.
     10 *
     11 * You should have received a copy of the GNU General Public License along with this program.
     12 * If not, see <http://www.gnu.org/licenses/>.
     13 */
    114package org.openstreetmap.josm.plugins.elevation.gui;
    215
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/TextAlignment.java

    r23709 r23795  
    1616
    1717/**
    18  * @author Oliver
     18 * @author Oliver Wieland <oliver.wieland@online.de>
    1919 *
    2020 */
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/Triangle.java

    r23709 r23795  
    2626
    2727/**
    28  * @author Oliver
    29  *
    30  */
    31 /*
    32  * Class to represent a Triangle. Implementing the java.awt.Shape inteface.
     28 * @author Oliver Wieland <oliver.wieland@online.de>
     29 * Class to represent a triangle shape. {@see java.awt.Shape}.
    3330 */
    3431public class Triangle implements Shape {
    3532        private Polygon poly;
    3633
     34        /**
     35         * Copy constructor.
     36         * @param p
     37         */
    3738        public Triangle(Polygon p) {
     39                if (p == null || p.npoints != 3) throw new RuntimeException("Given polygon was null or had invalid number of points");
    3840                poly = p;
    3941        }
    4042
     43        /**
     44         * Creates a triangle from 3 given points. The points are used without any sanity check, so it is up to
     45         * the user that the points form a triangle.
     46         * @param p1
     47         * @param p2
     48         * @param p3
     49         */
    4150        public Triangle(Point p1, Point p2, Point p3) {
    4251                poly = new Polygon();
     
    4655        }
    4756
     57        /**
     58         * Draws an outlined triangle.
     59         * @param g
     60         */
    4861        public void draw(Graphics g) {
    4962                g.drawPolygon(poly);
    5063        }
    5164
     65        /**
     66         * Draws a filled triangle.
     67         * @param g
     68         */
    5269        public void fill(Graphics g) {
    5370                g.fillPolygon(poly);
    5471        }
    5572
    56         // methods implemented from interface Shape
    57 
     73        /* (non-Javadoc)
     74         * @see java.awt.Shape#getBounds()
     75         */
    5876        public Rectangle getBounds() {
    5977                return poly.getBounds();
    6078        }
    6179
     80        /* (non-Javadoc)
     81         * @see java.awt.Shape#getBounds2D()
     82         */
    6283        public Rectangle2D getBounds2D() {
    6384                return poly.getBounds2D();
    6485        }
    6586
     87        /* (non-Javadoc)
     88         * @see java.awt.Shape#contains(double, double)
     89         */
    6690        public boolean contains(double x, double y) {
    6791                return poly.contains(x, y);
    6892        }
    6993
     94        /* (non-Javadoc)
     95         * @see java.awt.Shape#contains(java.awt.geom.Point2D)
     96         */
    7097        public boolean contains(Point2D p) {
    7198                return poly.contains(p);
    7299        }
    73100
     101        /* (non-Javadoc)
     102         * @see java.awt.Shape#intersects(double, double, double, double)
     103         */
    74104        public boolean intersects(double x, double y, double w, double h) {
    75105                return poly.intersects(x, y, w, h);
    76106        }
    77107
     108        /* (non-Javadoc)
     109         * @see java.awt.Shape#intersects(java.awt.geom.Rectangle2D)
     110         */
    78111        public boolean intersects(Rectangle2D r) {
    79112                return poly.intersects(r);
    80113        }
    81114
     115        /* (non-Javadoc)
     116         * @see java.awt.Shape#contains(double, double, double, double)
     117         */
    82118        public boolean contains(double x, double y, double w, double h) {
    83119                return poly.contains(x, y, w, h);
    84120        }
    85121
     122        /* (non-Javadoc)
     123         * @see java.awt.Shape#contains(java.awt.geom.Rectangle2D)
     124         */
    86125        public boolean contains(Rectangle2D r) {
    87126                return poly.intersects(r);
    88127        }
    89128
     129        /* (non-Javadoc)
     130         * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform)
     131         */
    90132        public PathIterator getPathIterator(AffineTransform at) {
    91133                return poly.getPathIterator(at);
    92134        }
    93135
     136        /* (non-Javadoc)
     137         * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform, double)
     138         */
    94139        public PathIterator getPathIterator(AffineTransform at, double flatness) {
    95140                return poly.getPathIterator(at, flatness);
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/TriangleDir.java

    r23709 r23795  
    1616
    1717/**
    18  * @author Oliver
     18 * @author Oliver Wieland <oliver.wieland@online.de>
    1919 *
    2020 */
Note: See TracChangeset for help on using the changeset viewer.