Ignore:
Timestamp:
2009-11-24T10:16:52+01:00 (15 years ago)
Author:
stoecker
Message:

remove illegal line ending preventing patches

Location:
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Coordinate.java

    r16032 r18772  
    1212 * This class encapsulates a Point2D.Double and provide access
    1313 * via <tt>lat</tt> and <tt>lon</tt>.
    14  * 
     14 *
    1515 * @author Jan Peter Stotz
    16  * 
     16 *
    1717 */
    1818public class Coordinate implements Serializable {
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java

    r16969 r18772  
    1313 * Default map controller which implements map moving by pressing the right
    1414 * mouse button and zooming by double click or by mouse wheel.
    15  * 
     15 *
    1616 * @author Jan Peter Stotz
    17  * 
     17 *
    1818 */
    1919public class DefaultMapController extends JMapController implements MouseListener, MouseMotionListener,
     
    8787    /**
    8888     * Enables or disables that the map pane can be moved using the mouse.
    89      * 
     89     *
    9090     * @param movementEnabled
    9191     */
     
    106106     * <li>{@link MouseEvent#BUTTON3} (right mouse button)</li>
    107107     * </ul>
    108      * 
     108     *
    109109     * @param movementMouseButton
    110110     */
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Demo.java

    r14053 r18772  
    2020
    2121/**
    22  * 
     22 *
    2323 * Demonstrates the usage of {@link JMapViewer}
    24  * 
     24 *
    2525 * @author Jan Peter Stotz
    26  * 
     26 *
    2727 */
    2828public class Demo extends JFrame {
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapController.java

    r14053 r18772  
    1616 * <li>{@link MouseWheelListener}</li>
    1717 * </ul>
    18  * 
     18 *
    1919 * @author Jan Peter Stotz
    2020 */
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java

    r16391 r18772  
    2828
    2929/**
    30  * 
     30 *
    3131 * Provides a simple panel that displays pre-rendered map tiles loaded from the
    3232 * OpenStreetMap project.
    33  * 
     33 *
    3434 * @author Jan Peter Stotz
    35  * 
     35 *
    3636 */
    3737public class JMapViewer extends JPanel implements TileLoaderListener {
     
    5454
    5555    protected boolean tileGridVisible;
    56    
    57     protected TileController tileController; 
     56
     57    protected TileController tileController;
    5858
    5959    /**
     
    7171    protected JButton zoomInButton;
    7272    protected JButton zoomOutButton;
    73 
    74    
    7573
    7674    /**
     
    150148     * Changes the map pane so that it is centered on the specified coordinate
    151149     * at the given zoom level.
    152      * 
     150     *
    153151     * @param lat
    154152     *            latitude of the specified coordinate
     
    166164     * level is displayed on the map at the screen coordinate
    167165     * <code>mapPoint</code>.
    168      * 
     166     *
    169167     * @param mapPoint
    170168     *            point on the map denoted in pixels where the coordinate should
     
    252250        setDisplayPosition(x, y, newZoom);
    253251    }
    254    
     252
    255253    /**
    256254     * Sets the displayed map pane and zoom level so that all map markers are
     
    318316    /**
    319317     * Calculates the position on the map of a given coordinate
    320      * 
     318     *
    321319     * @param lat
    322320     * @param lon
    323321     * @param checkOutside
    324      * @return point on the map or <code>null</code> if the point is not visible and checkOutside set to <code>true</code> 
     322     * @return point on the map or <code>null</code> if the point is not visible and checkOutside set to <code>true</code>
    325323     */
    326324    public Point getMapPosition(double lat, double lon, boolean checkOutside) {
     
    336334        return new Point(x, y);
    337335    }
    338    
     336
    339337    /**
    340338     * Calculates the position on the map of a given coordinate
    341      * 
     339     *
    342340     * @param lat
    343341     * @param lon
     
    347345        return getMapPosition(lat, lon, true);
    348346    }
    349    
     347
    350348    /**
    351349     * Calculates the position on the map of a given coordinate
    352      * 
     350     *
    353351     * @param coord
    354352     * @return point on the map or <code>null</code> if the point is not visible
     
    361359        }
    362360    }
    363    
     361
    364362    /**
    365363     * Calculates the position on the map of a given coordinate
    366      * 
     364     *
    367365     * @param coord
    368366     * @return point on the map or <code>null</code> if the point is not visible and checkOutside set to <code>true</code>
     
    476474    /**
    477475     * Moves the visible map pane.
    478      * 
     476     *
    479477     * @param x
    480478     *            horizontal movement in pixel.
     
    540538     * derived implementations for adapting zoom dependent values. The new zoom
    541539     * level can be obtained via {@link #getZoom()}.
    542      * 
     540     *
    543541     * @param oldZoom
    544542     *            the previous zoom level
     
    567565    /**
    568566     * Enables or disables painting of the {@link MapMarker}
    569      * 
     567     *
    570568     * @param mapMarkersVisible
    571569     * @see #addMapMarker(MapMarker)
     
    644642    /**
    645643     * Enables or disables painting of the {@link MapSquare}
    646      * 
     644     *
    647645     * @param mapMarkersVisible
    648646     * @see #addMapSquare(MapSquare)
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JobDispatcher.java

    r16391 r18772  
    1313 * more than {@link #WORKER_THREAD_TIMEOUT} seconds (default: 30), the instance
    1414 * ends itself.
    15  * 
     15 *
    1616 * @author Jan Peter Stotz
    1717 */
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapMarkerDot.java

    r18286 r18772  
    1313 * is painted as a circle with a black border line and filled with a specified
    1414 * color.
    15  * 
     15 *
    1616 * @author Jan Peter Stotz
    17  * 
     17 *
    1818 */
    1919public class MapMarkerDot implements MapMarker {
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MemoryTileCache.java

    r14053 r18772  
    1313 * memory up to a certain limit ({@link #getCacheSize()}). If the limit is
    1414 * exceeded the least recently used {@link Tile} objects will be deleted.
    15  * 
     15 *
    1616 * @author Jan Peter Stotz
    1717 */
     
    8181
    8282    /**
    83      * Clears the cache deleting all tiles from memory 
     83     * Clears the cache deleting all tiles from memory
    8484     */
    8585    public void clear() {
     
    100100    /**
    101101     * Changes the maximum number of {@link Tile} objects that this cache holds.
    102      * 
     102     *
    103103     * @param cacheSize
    104104     *            new maximum number of tiles
     
    142142     * elements. It supports element removal in constant time - in difference to
    143143     * the Java implementation which needs O(n).
    144      * 
     144     *
    145145     * @author Jan Peter Stotz
    146146     */
     
    162162        /**
    163163         * Add the element to the head of the list.
    164          * 
     164         *
    165165         * @param new element to be added
    166166         */
     
    182182        /**
    183183         * Removes the specified elemntent form the list.
    184          * 
     184         *
    185185         * @param element
    186186         *            to be removed
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmFileCacheTileLoader.java

    r16850 r18772  
    2727 * saves all loaded files in a directory located in the the temporary directory.
    2828 * If a tile is present in this file cache it will not be loaded from OSM again.
    29  * 
     29 *
    3030 * @author Jan Peter Stotz
    3131 * @author Stefan Zeller
     
    7171                    throw new IOException("No temp directory set");
    7272                String subDirName = "JMapViewerTiles";
    73                 // On Linux/Unix systems we do not have a per user tmp directory. 
    74                 // Therefore we add the user name for getting a unique dir name. 
     73                // On Linux/Unix systems we do not have a per user tmp directory.
     74                // Therefore we add the user name for getting a unique dir name.
    7575                if (userName != null && userName.length() > 0)
    7676                    subDirName += "_" + userName;
     
    273273         * Performs a <code>HEAD</code> request for retrieving the
    274274         * <code>LastModified</code> header value.
    275          * 
     275         *
    276276         * Note: This does only work with servers providing the
    277277         * <code>LastModified</code> header:
     
    280280         * <li>{@link OsmTileLoader#MAP_MAPNIK} - not supported</li>
    281281         * </ul>
    282          * 
     282         *
    283283         * @param fileAge
    284284         * @return <code>true</code> if the tile on the server is newer than the
     
    371371     * if a newer tile is available using the mechanism specified for the
    372372     * selected tile source/server.
    373      * 
     373     *
    374374     * @param maxFileAge
    375375     *            maximum age in milliseconds
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmMercator.java

    r16978 r18772  
    99 * space is measured in pixels. The origin of the map space is the top left
    1010 * corner. The map space origin (0,0) has latitude ~85 and longitude -180
    11  * 
     11 *
    1212 * @author Tim Haussmann
    13  * 
     13 *
    1414 */
    1515
     
    2727     * Returns the absolut number of pixels in y or x, defined as: 2^Zoomlevel *
    2828     * TILE_WIDTH where TILE_WIDTH is the width of a tile in pixels
    29      * 
     29     *
    3030     * @param aZoomlevel
    3131     * @return
     
    4545    /**
    4646     * Transform longitude to pixelspace
    47      * 
     47     *
    4848     * <p>
    4949     * Mathematical optimization<br>
     
    5555     * </code>
    5656     * </p>
    57      * 
     57     *
    5858     * @param aLongitude
    5959     *            [-180..180]
     
    7474     * <code>
    7575     * log(u) := log((1.0 + sin(toRadians(aLat))) / (1.0 - sin(toRadians(aLat))<br>
    76      * 
     76     *
    7777     * y = -1 * (radius(aZoomlevel) / 2 * log(u)))) - falseNorthing(aZoomlevel))<br>
    7878     * y = -1 * (getMaxPixel(aZoomlevel) / 2 * PI / 2 * log(u)) - -1 * getMaxPixel(aZoomLevel) / 2<br>
     
    101101    /**
    102102     * Transforms pixel coordinate X to longitude
    103      * 
     103     *
    104104     * <p>
    105105     * Mathematical optimization<br>
     
    123123    /**
    124124     * Transforms pixel coordinate Y to latitude
    125      * 
     125     *
    126126     * @param aY
    127127     *            [0..2^Zoomlevel*TILE_WIDTH[
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java

    r18211 r18772  
    1515/**
    1616 * A {@link TileLoader} implementation that loads tiles from OSM via HTTP.
    17  * 
     17 *
    1818 * @author Jan Peter Stotz
    1919 */
     
    2121
    2222    /**
    23      * Holds the used user agent used for HTTP requests. If this field is 
     23     * Holds the used user agent used for HTTP requests. If this field is
    2424     * <code>null</code>, the default Java user agent is used.
    2525     */
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java

    r18211 r18772  
    1818 * Holds one map tile. Additionally the code for loading the tile image and
    1919 * painting it is also included in this class.
    20  * 
     20 *
    2121 * @author Jan Peter Stotz
    2222 */
     
    5252    /**
    5353     * Creates a tile with empty image.
    54      * 
     54     *
    5555     * @param source
    5656     * @param xtile
     
    191191     * Paints the tile-image on the {@link Graphics} <code>g</code> at the
    192192     * position <code>x</code>/<code>y</code>.
    193      * 
     193     *
    194194     * @param g
    195195     * @param x
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/TileController.java

    r16399 r18772  
    1111    protected TileCache tileCache;
    1212    protected TileSource tileSource;
    13    
     13
    1414    JobDispatcher jobDispatcher;
    15    
     15
    1616    public TileController(TileSource source, TileCache tileCache, TileLoaderListener listener) {
    1717        tileSource = new OsmTileSource.Mapnik();
     
    2020        jobDispatcher = JobDispatcher.getInstance();
    2121    }
    22    
     22
    2323    /**
    2424     * retrieves a tile from the cache. If the tile is not present in the cache
    2525     * a load job is added to the working queue of {@link JobThread}.
    26      * 
     26     *
    2727     * @param tilex
    2828     * @param tiley
     
    7676
    7777    /**
    78      * 
     78     *
    7979     */
    8080    public void cancelOutstandingJobs() {
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapMarker.java

    r16032 r18772  
    1010/**
    1111 * Interface to be implemented by all one dimensional elements that can be displayed on the map.
    12  * 
     12 *
    1313 * @author Jan Peter Stotz
    1414 * @see JMapViewer#addMapMarker(MapMarker)
     
    3030     * Paints the map marker on the map. The <code>position</code> specifies the
    3131     * coordinates within <code>g</code>
    32      * 
     32     *
    3333     * @param g
    3434     * @param position
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapSquare.java

    r16032 r18772  
    1111/**
    1212 * Interface to be implemented by squares that can be displayed on the map.
    13  * 
     13 *
    1414 * @author Stefan Zeller
    1515 * @see JMapViewer#addMapSquare(MapSquare)
     
    3232     * Paints the map square on the map. The <code>topLeft</code> and
    3333     * <code>bottomRight</code> specifies the coordinates within <code>g</code>
    34      * 
     34     *
    3535     * @param g
    3636     * @param position
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileCache.java

    r14053 r18772  
    99 * Implement this interface for creating your custom tile cache for
    1010 * {@link JMapViewer}.
    11  * 
     11 *
    1212 * @author Jan Peter Stotz
    1313 */
     
    1717     * Retrieves a tile from the cache if present, otherwise <code>null</code>
    1818     * will be returned.
    19      * 
     19     *
    2020     * @param source
    2121     * @param x
     
    3434     * via {@link #getTile(int, int, int)} is unspecified and depends on the
    3535     * implementation.
    36      * 
     36     *
    3737     * @param tile
    3838     */
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileLoader.java

    r14053 r18772  
    66 * Interface for implementing a tile loader. Tiles are usually loaded via HTTP
    77 * or from a file.
    8  * 
     8 *
    99 * @author Jan Peter Stotz
    1010 */
     
    1515     * should create and return a new {@link Job} instance that performs the
    1616     * load action.
    17      * 
     17     *
    1818     * @param tileLayerSource
    1919     * @param tilex
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileLoaderListener.java

    r14053 r18772  
    88
    99    /**
    10      * Will be called if a new {@link Tile} has been loaded successfully. 
    11      * Loaded can mean downloaded or loaded from file cache. 
    12      * 
     10     * Will be called if a new {@link Tile} has been loaded successfully.
     11     * Loaded can mean downloaded or loaded from file cache.
     12     *
    1313     * @param tile
    1414     */
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java

    r13758 r18772  
    66
    77/**
    8  * 
     8 *
    99 * @author Jan Peter Stotz
    1010 */
     
    4040     * Specifies the maximum zoom value. The number of zoom levels is [0..
    4141     * {@link #getMaxZoom()}].
    42      * 
     42     *
    4343     * @return maximum zoom value that has to be smaller or equal to
    4444     *         {@link JMapViewer#MAX_ZOOM}
     
    4747
    4848    /**
    49      * Specifies the minimum zoom value. This value is usually 0. 
    50      * Only for maps that cover a certain region up to a limited zoom level 
    51      * this method should return a value different than 0. 
    52      * 
     49     * Specifies the minimum zoom value. This value is usually 0.
     50     * Only for maps that cover a certain region up to a limited zoom level
     51     * this method should return a value different than 0.
     52     *
    5353     * @return minimum zoom value - usually 0
    5454     */
     
    6464     * A tile layer name has to be unique and has to consist only of characters
    6565     * valid for filenames.
    66      * 
     66     *
    6767     * @return Name of the tile layer
    6868     */
     
    7171    /**
    7272     * Constructs the tile url.
    73      * 
     73     *
    7474     * @param zoom
    7575     * @param tilex
     
    8282     * Specifies the tile image type. For tiles rendered by Mapnik or
    8383     * Osmarenderer this is usually <code>"png"</code>.
    84      * 
     84     *
    8585     * @return file extension of the tile image type
    8686     */
Note: See TracChangeset for help on using the changeset viewer.