Changeset 6830 in josm for trunk/src/org
- Timestamp:
- 2014-02-10T00:51:53+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 135 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
r6814 r6830 40 40 * @since 996 41 41 * 42 * @author Henry Loenwind , based on much copy&Paste from other Actions.42 * @author Henry Loenwind 43 43 * @author Sebastian Masch 44 44 */ -
trunk/src/org/openstreetmap/josm/actions/DiskAccessAction.java
r6380 r6830 76 76 * @param title The string that goes in the dialog window's title bar 77 77 * @param extension The file extension that will be selected as the default file filter 78 * @param selectionMode The selection mode that allows the user to:<br />78 * @param selectionMode The selection mode that allows the user to:<br><ul> 79 79 * <li>just select files ({@code JFileChooser.FILES_ONLY})</li> 80 80 * <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li> 81 * <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li> 81 * <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul> 82 82 * @param allTypes If true, all the files types known by JOSM will be proposed in the "file type" combobox. 83 83 * If false, only the file filters that include {@code extension} will be proposed … … 97 97 * @param title The string that goes in the dialog window's title bar 98 98 * @param filter The only file filter that will be proposed by the dialog 99 * @param selectionMode The selection mode that allows the user to:<br />99 * @param selectionMode The selection mode that allows the user to:<br><ul> 100 100 * <li>just select files ({@code JFileChooser.FILES_ONLY})</li> 101 101 * <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li> 102 * <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li> 102 * <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul> 103 103 * @param lastDirProperty The name of the property used to setup the JFileChooser initial directory. This property will then be updated to the new "last directory" chosen by the user 104 104 * @return The {@code JFileChooser}. … … 116 116 * @param filters The file filters that will be proposed by the dialog 117 117 * @param defaultFilter The file filter that will be selected by default 118 * @param selectionMode The selection mode that allows the user to:<br />118 * @param selectionMode The selection mode that allows the user to:<br><ul> 119 119 * <li>just select files ({@code JFileChooser.FILES_ONLY})</li> 120 120 * <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li> 121 * <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li> 121 * <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul> 122 122 * @param lastDirProperty The name of the property used to setup the JFileChooser initial directory. This property will then be updated to the new "last directory" chosen by the user 123 123 * @return The {@code JFileChooser}. -
trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java
r6814 r6830 70 70 * 71 71 * @param targetLayer the target layer. Must not be null. 72 * @param id the primitive id. id >0 required.72 * @param id the primitive id. id > 0 required. 73 73 * @param type the primitive type. type != null required 74 74 * @exception IllegalArgumentException thrown if targetLayer is null 75 * @exception IllegalArgumentException thrown if id <= 075 * @exception IllegalArgumentException thrown if id <= 0 76 76 * @exception IllegalArgumentException thrown if type == null 77 77 */ -
trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
r6639 r6830 300 300 } 301 301 302 // Adds the menu entry, Shortcuts, etc. 302 /** 303 * Constructs a new {@code JoinAreasAction}. 304 */ 303 305 public JoinAreasAction() { 304 306 super(tr("Join overlapping Areas"), "joinareas", tr("Joins areas that overlap each other"), … … 399 401 * Tests if the areas have some intersections to join. 400 402 * @param areas Areas to test 401 * @return @{code true} if areas are joinable403 * @return {@code true} if areas are joinable 402 404 */ 403 405 private boolean testJoin(List<Multipolygon> areas) { -
trunk/src/org/openstreetmap/josm/actions/MirrorAction.java
r6380 r6830 28 28 * Note: If a ways are selected, their nodes are mirrored 29 29 * 30 * @author Teemu Koskinen , based on much copy&Paste from other Actions.30 * @author Teemu Koskinen 31 31 */ 32 32 public final class MirrorAction extends JosmAction { 33 33 34 /** 35 * Constructs a new {@code MirrorAction}. 36 */ 34 37 public MirrorAction() { 35 38 super(tr("Mirror"), "mirror", tr("Mirror selected nodes and ways."), -
trunk/src/org/openstreetmap/josm/actions/PreferencesAction.java
r6431 r6830 44 44 45 45 /** 46 * Create the preference action with " &Preferences" as label.46 * Create the preference action with "Preferences" as label. 47 47 */ 48 48 public PreferencesAction() { -
trunk/src/org/openstreetmap/josm/actions/RestartAction.java
r6643 r6830 23 23 /** 24 24 * Restarts JOSM as it was launched. Comes from "restart" plugin, originally written by Upliner. 25 * <br /><br/>25 * <br><br> 26 26 * Mechanisms have been improved based on #8561 discussions and <a href="http://lewisleo.blogspot.jp/2012/08/programmatically-restart-java.html">this article</a>. 27 27 * @since 5857 … … 50 50 Main.exitJosm(true, 9); 51 51 } 52 52 53 53 try { 54 54 restartJOSM(); -
trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
r6815 r6830 120 120 121 121 /** 122 * Creates a new "Save" dialog for a single {@link ExtensionFileFilter} and makes it visible.<br />122 * Creates a new "Save" dialog for a single {@link ExtensionFileFilter} and makes it visible.<br> 123 123 * When the user has chosen a file, checks the file extension, and confirms overwrite if needed. 124 124 * … … 135 135 136 136 /** 137 * Creates a new "Save" dialog for a given file extension and makes it visible.<br />137 * Creates a new "Save" dialog for a given file extension and makes it visible.<br> 138 138 * When the user has chosen a file, checks the file extension, and confirms overwrite if needed. 139 139 * -
trunk/src/org/openstreetmap/josm/actions/SelectNonBranchingWaySequences.java
r6623 r6830 111 111 /** 112 112 * Finds out if the current selection can be extended. 113 * <p />113 * <p> 114 114 * The members outerNodes, nodes must have been initialized. 115 115 * How to update these members when extending the selection, @see extend(). 116 * 116 * </p> 117 117 * @param selection current selection 118 118 * @return a way by which to extend the selection, or null -
trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
r6679 r6830 286 286 * 287 287 * assume that OrginalNode is in the way 288 * 289 * -> the new node will be put into the parameter newNodes. 290 * -> the add-node command will be put into the parameter cmds. 291 * -> the changed way will be returned and must be put into cmds by the caller! 288 * <ul> 289 * <li>the new node will be put into the parameter newNodes.</li> 290 * <li>the add-node command will be put into the parameter cmds.</li> 291 * <li>the changed way will be returned and must be put into cmds by the caller!</li> 292 * </ul> 292 293 */ 293 294 private Way modifyWay(Node originalNode, Way w, List<Command> cmds, List<Node> newNodes) { -
trunk/src/org/openstreetmap/josm/actions/audio/AudioNextAction.java
r6380 r6830 13 13 14 14 /** 15 * Play the sound track from the Audio Marker after the one most recently played.<br />15 * Play the sound track from the Audio Marker after the one most recently played.<br> 16 16 * Play from the first such Marker if none has been played, or repeat the last marker if at the end. 17 17 * @since 547 -
trunk/src/org/openstreetmap/josm/actions/audio/AudioPlayPauseAction.java
r6380 r6830 16 16 17 17 /** 18 * If not playing, play the sound track from the first Audio Marker, or from the point at which it was paused.<br />19 * If playing, pause the sound.<br />18 * If not playing, play the sound track from the first Audio Marker, or from the point at which it was paused.<br> 19 * If playing, pause the sound.<br> 20 20 * If fast forwarding or slow forwarding, resume normal speed. 21 21 * @since 547 -
trunk/src/org/openstreetmap/josm/actions/audio/AudioPrevAction.java
r6380 r6830 13 13 14 14 /** 15 * Play the sound track from the Audio Marker before the one most recently played.<br />15 * Play the sound track from the Audio Marker before the one most recently played.<br> 16 16 * Play from the first such Marker if none has been played or already at the first marker. 17 17 * @since 547 -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
r6589 r6830 96 96 * {@link Future}, but make sure not to freeze up JOSM. Example: 97 97 * <pre> 98 * Future <?>future = task.download(...);98 * Future<?> future = task.download(...); 99 99 * // DON'T run this on the Swing EDT or JOSM will freeze 100 100 * future.get(); // waits for the dowload task to complete … … 104 104 * the Swing EDT: 105 105 * <pre> 106 * final Future <?>future = task.download(...);106 * final Future<?> future = task.download(...); 107 107 * Runnable runAfterTask = new Runnable() { 108 108 * public void run() { -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTask.java
r6084 r6830 8 8 import java.text.MessageFormat; 9 9 import java.util.Collection; 10 import java.util. Set;10 import java.util.HashMap; 11 11 import java.util.HashSet; 12 import java.util.HashMap;13 12 import java.util.Map; 14 13 import java.util.Map.Entry; 14 import java.util.Set; 15 15 16 16 import javax.swing.JOptionPane; … … 101 101 * 102 102 * @param targetLayer the target layer. Must not be null. 103 * @param id the primitive id. id >0 required.103 * @param id the primitive id. id > 0 required. 104 104 * @param type the primitive type. type != null required 105 * @exception IllegalArgumentException thrown if id <= 0105 * @exception IllegalArgumentException thrown if id <= 0 106 106 * @exception IllegalArgumentException thrown if type == null 107 107 * @exception IllegalArgumentException thrown if targetLayer == null … … 124 124 * constructor 125 125 * 126 * @param targetLayer 126 * @param targetLayer the target layer. Must not be null. 127 127 * @param primitiveId a PrimitiveId object. 128 * @exception IllegalArgumentException thrown if id <= 0128 * @exception IllegalArgumentException thrown if id <= 0 129 129 * @exception IllegalArgumentException thrown if targetLayer == null 130 130 * -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTask.java
r6069 r6830 25 25 * {@link Future}, but make sure not to freeze up JOSM. Example: 26 26 * <pre> 27 * Future <?>future = task.download(...);27 * Future<?> future = task.download(...); 28 28 * // DON'T run this on the Swing EDT or JOSM will freeze 29 29 * future.get(); // waits for the dowload task to complete … … 33 33 * the Swing EDT: 34 34 * <pre> 35 * final Future <?>future = task.download(...);35 * final Future<?> future = task.download(...); 36 36 * Runnable runAfterTask = new Runnable() { 37 37 * public void run() { -
trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java
r6388 r6830 52 52 53 53 /** 54 * @author Alexander Kachkaev <alexander@kachkaev.ru>, 201154 * @author Alexander Kachkaev <alexander@kachkaev.ru>, 2011 55 55 */ 56 56 public class ImproveWayAccuracyAction extends MapMode implements MapViewPaintable, -
trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyHelper.java
r6362 r6830 20 20 * segment to divide. 21 21 * 22 * @author Alexander Kachkaev <alexander@kachkaev.ru>, 201122 * @author Alexander Kachkaev <alexander@kachkaev.ru>, 2011 23 23 */ 24 24 final class ImproveWayAccuracyHelper { … … 27 27 // Hide default constructor for utils classes 28 28 } 29 29 30 30 /** 31 31 * Finds the way to work on. If the mouse is on the node, extracts one of -
trunk/src/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommand.java
r6296 r6830 18 18 * Command that changes the role of a relation member 19 19 * 20 * @author Teemu Koskinen <teemu.koskinen@mbnet.fi>20 * @author Teemu Koskinen <teemu.koskinen@mbnet.fi> 21 21 */ 22 22 public class ChangeRelationMemberRoleCommand extends Command { -
trunk/src/org/openstreetmap/josm/command/RotateCommand.java
r6246 r6830 16 16 * RotateCommand rotates a number of objects around their centre. 17 17 * 18 * @author Frederik Ramm <frederik@remote.org>18 * @author Frederik Ramm 19 19 */ 20 20 public class RotateCommand extends TransformNodesCommand { -
trunk/src/org/openstreetmap/josm/command/TransformNodesCommand.java
r6610 r6830 20 20 * Abstract class with common services for nodes rotation and scaling commands. 21 21 * 22 * @author Olivier Croquette <ocroquette@free.fr>22 * @author Olivier Croquette <ocroquette@free.fr> 23 23 */ 24 24 public abstract class TransformNodesCommand extends Command { -
trunk/src/org/openstreetmap/josm/data/Bounds.java
r6822 r6830 30 30 /** 31 31 * Returns min latitude of bounds. Efficient shortcut for {@code getMin().lat()}. 32 * 32 * 33 33 * @return min latitude of bounds. 34 34 * @since 6203 … … 40 40 /** 41 41 * Returns min longitude of bounds. Efficient shortcut for {@code getMin().lon()}. 42 * 42 * 43 43 * @return min longitude of bounds. 44 44 * @since 6203 … … 54 54 /** 55 55 * Returns max latitude of bounds. Efficient shortcut for {@code getMax().lat()}. 56 * 56 * 57 57 * @return max latitude of bounds. 58 58 * @since 6203 … … 64 64 /** 65 65 * Returns max longitude of bounds. Efficient shortcut for {@code getMax().lon()}. 66 * 66 * 67 67 * @return max longitude of bounds. 68 68 * @since 6203 … … 95 95 * Single point Bounds defined by lat/lon {@code b}. 96 96 * Coordinates will be rounded to osm precision if {@code roundToOsmPrecision} is true. 97 * 97 * 98 98 * @param b lat/lon of given point. 99 99 * @param roundToOsmPrecision defines if lat/lon will be rounded. … … 102 102 this(b.lat(), b.lon(), roundToOsmPrecision); 103 103 } 104 104 105 105 /** 106 106 * Single point Bounds defined by point [lat,lon]. 107 107 * Coordinates will be rounded to osm precision if {@code roundToOsmPrecision} is true. 108 * 108 * 109 109 * @param lat latitude of given point. 110 110 * @param lon longitude of given point. … … 232 232 * 233 233 * @param center the center coordinate pair. Must not be null. 234 * @param latExtent the latitude extent. >0 required.235 * @param lonExtent the longitude extent. >0 required.234 * @param latExtent the latitude extent. > 0 required. 235 * @param lonExtent the longitude extent. > 0 required. 236 236 * @throws IllegalArgumentException thrown if center is null 237 * @throws IllegalArgumentException thrown if latExtent <= 0238 * @throws IllegalArgumentException thrown if lonExtent <= 0237 * @throws IllegalArgumentException thrown if latExtent <= 0 238 * @throws IllegalArgumentException thrown if lonExtent <= 0 239 239 */ 240 240 public Bounds(LatLon center, double latExtent, double lonExtent) { 241 241 CheckParameterUtil.ensureParameterNotNull(center, "center"); 242 242 if (latExtent <= 0.0) 243 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0.0 exp tected, got {1}", "latExtent", latExtent));243 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0.0 expected, got {1}", "latExtent", latExtent)); 244 244 if (lonExtent <= 0.0) 245 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0.0 exp tected, got {1}", "lonExtent", lonExtent));245 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0.0 expected, got {1}", "lonExtent", lonExtent)); 246 246 247 247 this.minLat = LatLon.roundToOsmPrecision(LatLon.toIntervalLat(center.lat() - latExtent / 2)); … … 253 253 /** 254 254 * Creates BBox with same coordinates. 255 * 255 * 256 256 * @return BBox with same coordinates. 257 257 * @since 6203 … … 260 260 return new BBox(minLon, minLat, maxLon, maxLat); 261 261 } 262 262 263 263 @Override public String toString() { 264 264 return "Bounds["+minLat+","+minLon+","+maxLat+","+maxLon+"]"; … … 277 277 */ 278 278 public LatLon getCenter() { 279 if (crosses180thMeridian()) { 279 if (crosses180thMeridian()) { 280 280 double lat = (minLat + maxLat) / 2; 281 281 double lon = (minLon + maxLon - 360.0) / 2; … … 296 296 extend(ll.lat(), ll.lon()); 297 297 } 298 298 299 299 /** 300 300 * Extend the bounds if necessary to include the given point [lat,lon]. … … 358 358 /** 359 359 * The two bounds intersect? Compared to java Shape.intersects, if does not use 360 * the interior but the closure. (" >=" instead of ">")360 * the interior but the closure. (">=" instead of ">") 361 361 */ 362 362 public boolean intersects(Bounds b) { … … 413 413 */ 414 414 public boolean isCollapsed() { 415 return Double.doubleToLongBits(minLat) == Double.doubleToLongBits(maxLat) 415 return Double.doubleToLongBits(minLat) == Double.doubleToLongBits(maxLat) 416 416 && Double.doubleToLongBits(minLon) == Double.doubleToLongBits(maxLon); 417 417 } -
trunk/src/org/openstreetmap/josm/data/ProjectionBounds.java
r6380 r6830 67 67 /** 68 68 * The two bounds intersect? Compared to java Shape.intersects, if does not use 69 * the interior but the closure. (" >=" instead of ">")69 * the interior but the closure. (">=" instead of ">") 70 70 */ 71 71 public boolean intersects(ProjectionBounds b) { -
trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
r6566 r6830 30 30 * where valid values are in the [-180,180] and positive values specify positions east of the prime meridian. 31 31 * <br> 32 * <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Latitude_and_Longitude_of_the_Earth.svg/500px-Latitude_and_Longitude_of_the_Earth.svg.png">32 * <img alt="lat/lon" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Latitude_and_Longitude_of_the_Earth.svg/500px-Latitude_and_Longitude_of_the_Earth.svg.png"> 33 33 * <br> 34 34 * This class is immutable. … … 292 292 * 293 293 * @param other the "destination" position 294 * @return heading in the range 0 <= hd <2*PI294 * @return heading in the range 0 <= hd < 2*PI 295 295 */ 296 296 public double heading(LatLon other) { -
trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java
r6380 r6830 14 14 /** 15 15 * Objects of this class represent a gpx file with tracks, waypoints and routes. 16 * It uses GPX v1.1, see {@link <a href="http://www.topografix.com/GPX/1/1/">the spec</a>}16 * It uses GPX v1.1, see <a href="http://www.topografix.com/GPX/1/1/">the spec</a> 17 17 * for details. 18 18 * 19 * @author Raphael Mack <ramack@raphael-mack.de>19 * @author Raphael Mack <ramack@raphael-mack.de> 20 20 */ 21 21 public class GpxData extends WithAttributes { … … 255 255 }; 256 256 } 257 257 258 258 /** 259 259 * Iterates over all track segments and then over all routes. … … 320 320 } 321 321 } 322 322 323 323 } -
trunk/src/org/openstreetmap/josm/data/gpx/WithAttributes.java
r6142 r6830 11 11 * Base class for various classes in the GPX model. 12 12 * 13 * @author Frederik Ramm <frederik@remote.org>13 * @author Frederik Ramm 14 14 * @since 444 15 15 */ -
trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
r6690 r6830 27 27 * Class that stores info about an image background layer. 28 28 * 29 * @author Frederik Ramm <frederik@remote.org>29 * @author Frederik Ramm 30 30 */ 31 31 public class ImageryInfo implements Comparable<ImageryInfo>, Attributed { … … 83 83 */ 84 84 public static class ImageryBounds extends Bounds { 85 85 86 86 /** 87 87 * Constructs a new {@code ImageryBounds} from string. -
trunk/src/org/openstreetmap/josm/data/imagery/types/EntryType.java
r6069 r6830 25 25 * 26 26 * <pre> 27 * <complexType name="entry" >28 * <complexContent >29 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType" >30 * <sequence >31 * <element name="pixelPerDegree" type="{http://www.w3.org/2001/XMLSchema}double"/ >32 * <element name="east" type="{http://www.w3.org/2001/XMLSchema}double"/ >33 * <element name="north" type="{http://www.w3.org/2001/XMLSchema}double"/ >34 * <element name="lastUsed" type="{http://www.w3.org/2001/XMLSchema}date"/ >35 * <element name="lastModified" type="{http://www.w3.org/2001/XMLSchema}date"/ >36 * <element name="filename" type="{http://www.w3.org/2001/XMLSchema}string"/ >37 * </sequence >38 * </restriction >39 * </complexContent >40 * </complexType >27 * <complexType name="entry"> 28 * <complexContent> 29 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 30 * <sequence> 31 * <element name="pixelPerDegree" type="{http://www.w3.org/2001/XMLSchema}double"/> 32 * <element name="east" type="{http://www.w3.org/2001/XMLSchema}double"/> 33 * <element name="north" type="{http://www.w3.org/2001/XMLSchema}double"/> 34 * <element name="lastUsed" type="{http://www.w3.org/2001/XMLSchema}date"/> 35 * <element name="lastModified" type="{http://www.w3.org/2001/XMLSchema}date"/> 36 * <element name="filename" type="{http://www.w3.org/2001/XMLSchema}string"/> 37 * </sequence> 38 * </restriction> 39 * </complexContent> 40 * </complexType> 41 41 * </pre> 42 *43 42 * 44 43 */ -
trunk/src/org/openstreetmap/josm/data/imagery/types/ProjectionType.java
r6069 r6830 5 5 // Generated on: 2011.01.09 at 07:33:18 PM CET 6 6 // 7 8 9 7 package org.openstreetmap.josm.data.imagery.types; 10 8 11 9 import java.util.ArrayList; 12 10 import java.util.List; 11 13 12 import javax.xml.bind.annotation.XmlAccessType; 14 13 import javax.xml.bind.annotation.XmlAccessorType; 15 14 import javax.xml.bind.annotation.XmlAttribute; 16 15 import javax.xml.bind.annotation.XmlType; 17 18 16 19 17 /** … … 23 21 * 24 22 * <pre> 25 * <complexType name="projection" >26 * <complexContent >27 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType" >28 * <sequence >29 * <element name="entry" type="{http://josm.openstreetmap.de/wms-cache}entry" maxOccurs="unbounded" minOccurs="0"/ >30 * </sequence >31 * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" / >32 * <attribute name="cache-directory" type="{http://www.w3.org/2001/XMLSchema}string" / >33 * </restriction >34 * </complexContent >35 * </complexType >23 * <complexType name="projection"> 24 * <complexContent> 25 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 26 * <sequence> 27 * <element name="entry" type="{http://josm.openstreetmap.de/wms-cache}entry" maxOccurs="unbounded" minOccurs="0"/> 28 * </sequence> 29 * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /> 30 * <attribute name="cache-directory" type="{http://www.w3.org/2001/XMLSchema}string" /> 31 * </restriction> 32 * </complexContent> 33 * </complexType> 36 34 * </pre> 37 *38 35 * 39 36 */ -
trunk/src/org/openstreetmap/josm/data/imagery/types/WmsCacheType.java
r6069 r6830 5 5 // Generated on: 2011.01.09 at 07:33:18 PM CET 6 6 // 7 8 9 7 package org.openstreetmap.josm.data.imagery.types; 10 8 11 9 import java.util.ArrayList; 12 10 import java.util.List; 11 13 12 import javax.xml.bind.annotation.XmlAccessType; 14 13 import javax.xml.bind.annotation.XmlAccessorType; … … 16 15 import javax.xml.bind.annotation.XmlRootElement; 17 16 import javax.xml.bind.annotation.XmlType; 18 19 17 20 18 /** … … 24 22 * 25 23 * <pre> 26 * <complexType >27 * <complexContent >28 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType" >29 * <sequence >30 * <element name="projection" type="{http://josm.openstreetmap.de/wms-cache}projection" maxOccurs="unbounded" minOccurs="0"/ >31 * </sequence >32 * <attribute name="tileSize" use="required" type="{http://www.w3.org/2001/XMLSchema}int" / >33 * <attribute name="totalFileSize" use="required" type="{http://www.w3.org/2001/XMLSchema}int" / >34 * </restriction >35 * </complexContent >36 * </complexType >24 * <complexType> 25 * <complexContent> 26 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 27 * <sequence> 28 * <element name="projection" type="{http://josm.openstreetmap.de/wms-cache}projection" maxOccurs="unbounded" minOccurs="0"/> 29 * </sequence> 30 * <attribute name="tileSize" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /> 31 * <attribute name="totalFileSize" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /> 32 * </restriction> 33 * </complexContent> 34 * </complexType> 37 35 * </pre> 38 *39 36 * 40 37 */ -
trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
r6821 r6830 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.osm; 3 4 import org.openstreetmap.josm.tools.Utils;5 3 6 4 import static org.openstreetmap.josm.tools.I18n.tr; … … 19 17 import java.util.concurrent.atomic.AtomicLong; 20 18 19 import org.openstreetmap.josm.tools.Utils; 20 21 21 /** 22 22 * Abstract class to represent common features of the datatypes primitives. … … 160 160 /** 161 161 * 162 * @return True if primitive is new (not yet uploaded the server, id <= 0)162 * @return True if primitive is new (not yet uploaded the server, id <= 0) 163 163 */ 164 164 @Override … … 184 184 * is set to false. 185 185 * 186 * @param id the id. >0 required187 * @param version the version >0 required188 * @throws IllegalArgumentException thrown if id <= 0189 * @throws IllegalArgumentException thrown if version <= 0186 * @param id the id. > 0 required 187 * @param version the version > 0 required 188 * @throws IllegalArgumentException thrown if id <= 0 189 * @throws IllegalArgumentException thrown if version <= 0 190 190 * @throws DataIntegrityProblemException If id is changed and primitive was already added to the dataset 191 191 */ … … 256 256 * primitive. 257 257 * 258 * @param changesetId the id. >= 0 required.258 * @param changesetId the id. >= 0 required. 259 259 * @throws IllegalStateException thrown if this primitive is new. 260 * @throws IllegalArgumentException thrown if id <0260 * @throws IllegalArgumentException thrown if id < 0 261 261 */ 262 262 @Override -
trunk/src/org/openstreetmap/josm/data/osm/Changeset.java
r6380 r6830 52 52 53 53 /** 54 * Creates a changeset with id <code>id</code>. If id >0, sets incomplete to true.54 * Creates a changeset with id <code>id</code>. If id > 0, sets incomplete to true. 55 55 * 56 56 * @param id the id -
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r6643 r6830 778 778 * exists 779 779 * 780 * @param id uniqueId of the primitive. Might be <0 for newly created primitives780 * @param id uniqueId of the primitive. Might be < 0 for newly created primitives 781 781 * @param type the type of the primitive. Must not be null. 782 782 * @return the primitive -
trunk/src/org/openstreetmap/josm/data/osm/Node.java
r6639 r6830 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.osm; 3 4 import java.util.Collection; 5 import java.util.Set; 6 import java.util.TreeSet; 3 7 4 8 import org.openstreetmap.josm.Main; … … 11 15 import org.openstreetmap.josm.tools.Predicate; 12 16 import org.openstreetmap.josm.tools.Utils; 13 14 import java.util.Collection;15 import java.util.Set;16 import java.util.TreeSet;17 17 18 18 /** … … 139 139 /** 140 140 * Constructs an incomplete {@code Node} object with the given id. 141 * @param id The id. Must be >= 0142 * @throws IllegalArgumentException if id <0141 * @param id The id. Must be >= 0 142 * @throws IllegalArgumentException if id < 0 143 143 */ 144 144 public Node(long id) throws IllegalArgumentException { … … 148 148 /** 149 149 * Constructs a new {@code Node} with the given id and version. 150 * @param id The id. Must be >= 0150 * @param id The id. Must be >= 0 151 151 * @param version The version 152 * @throws IllegalArgumentException if id <0152 * @throws IllegalArgumentException if id < 0 153 153 */ 154 154 public Node(long id, int version) throws IllegalArgumentException { -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r6733 r6830 241 241 * Creates a new primitive for the given id. 242 242 * 243 * If allowNegativeId is set, provided id can be <0 and will be set to primitive without any processing.243 * If allowNegativeId is set, provided id can be < 0 and will be set to primitive without any processing. 244 244 * If allowNegativeId is not set, then id will have to be 0 (in that case new unique id will be generated) or 245 245 * positive number. … … 247 247 * @param id the id 248 248 * @param allowNegativeId 249 * @throws IllegalArgumentException thrown if id <0 and allowNegativeId is false249 * @throws IllegalArgumentException thrown if id < 0 and allowNegativeId is false 250 250 */ 251 251 protected OsmPrimitive(long id, boolean allowNegativeId) throws IllegalArgumentException { … … 269 269 * Creates a new primitive for the given id and version. 270 270 * 271 * If allowNegativeId is set, provided id can be <0 and will be set to primitive without any processing.271 * If allowNegativeId is set, provided id can be < 0 and will be set to primitive without any processing. 272 272 * If allowNegativeId is not set, then id will have to be 0 (in that case new unique id will be generated) or 273 273 * positive number. 274 274 * 275 * If id is not >0 version is ignored and set to 0.275 * If id is not > 0 version is ignored and set to 0. 276 276 * 277 277 * @param id 278 278 * @param version 279 279 * @param allowNegativeId 280 * @throws IllegalArgumentException thrown if id <0 and allowNegativeId is false280 * @throws IllegalArgumentException thrown if id < 0 and allowNegativeId is false 281 281 */ 282 282 protected OsmPrimitive(long id, int version, boolean allowNegativeId) throws IllegalArgumentException { … … 356 356 * is set to false. 357 357 * 358 * @param id the id. >0 required359 * @param version the version >0 required360 * @throws IllegalArgumentException thrown if id <= 0361 * @throws IllegalArgumentException thrown if version <= 0358 * @param id the id. > 0 required 359 * @param version the version > 0 required 360 * @throws IllegalArgumentException thrown if id <= 0 361 * @throws IllegalArgumentException thrown if version <= 0 362 362 * @throws DataIntegrityProblemException If id is changed and primitive was already added to the dataset 363 363 */ … … 1143 1143 * semantic attributes. 1144 1144 * <ol> 1145 * <li>equal id</ ol>1145 * <li>equal id</li> 1146 1146 * <li>both are complete or both are incomplete</li> 1147 1147 * <li>both have the same tags</li> … … 1165 1165 * technical attributes. The attributes: 1166 1166 * <ol> 1167 * <li>deleted</ ol>1168 * <li>modified</ ol>1169 * <li>timestamp</ ol>1170 * <li>version</ ol>1171 * <li>visible</ ol>1172 * <li>user</ ol>1167 * <li>deleted</li> 1168 * <li>modified</li> 1169 * <li>timestamp</li> 1170 * <li>version</li> 1171 * <li>visible</li> 1172 * <li>user</li> 1173 1173 * </ol> 1174 1174 * have to be equal -
trunk/src/org/openstreetmap/josm/data/osm/Relation.java
r6717 r6830 21 21 * An relation, having a set of tags and any number (0...n) of members. 22 22 * 23 * @author Frederik Ramm <frederik@remote.org>23 * @author Frederik Ramm 24 24 */ 25 25 public final class Relation extends OsmPrimitive implements IRelation { … … 204 204 205 205 /** 206 * Creates a new relation for the given id. If the id >0, the way is marked206 * Creates a new relation for the given id. If the id > 0, the way is marked 207 207 * as incomplete. 208 208 * 209 * @param id the id. >0 required210 * @throws IllegalArgumentException thrown if id <0209 * @param id the id. > 0 required 210 * @throws IllegalArgumentException thrown if id < 0 211 211 */ 212 212 public Relation(long id) throws IllegalArgumentException { -
trunk/src/org/openstreetmap/josm/data/osm/RelationMemberData.java
r6069 r6830 48 48 49 49 /** 50 * PrimitiveId implementation. Returns the same value as {@link #getMemberId() ()}50 * PrimitiveId implementation. Returns the same value as {@link #getMemberId()} 51 51 */ 52 52 @Override -
trunk/src/org/openstreetmap/josm/data/osm/Storage.java
r6717 r6830 14 14 * A Set-like class that allows looking up equivalent preexising instance. 15 15 * It is useful whereever one would use self-mapping construct like 16 * <code>Map <T,T>.put(t,t), that is, for caches, uniqueness filters or similar.16 * <code>Map<T,T>.put(t,t)</code>, that is, for caches, uniqueness filters or similar. 17 17 * 18 18 * The semantics of equivalency can be external to the object, using the … … 24 24 * <ul><li>A String cache: 25 25 * <pre> 26 * Storage <String>cache = new Storage(); // use default Hash26 * Storage<String> cache = new Storage(); // use default Hash 27 27 * for (String input : data) { 28 28 * String onlyOne = cache.putIfUnique(input); … … 32 32 * <li>Identity-based set: 33 33 * <pre> 34 * Storage <Object> identity = new Storage(new Hash<Object,Object>{34 * Storage<Object> identity = new Storage(new Hash<Object,Object> { 35 35 * public int getHashCode(Object o) { 36 36 * return System.identityHashCode(o); … … 44 44 * <pre> 45 45 * class Thing { int id; } 46 * Storage <Thing> things = new Storage(new Hash<Thing,Thing>() {46 * Storage<Thing> things = new Storage(new Hash<Thing,Thing>() { 47 47 * public int getHashCode(Thing t) { 48 48 * return t.id; … … 52 52 * } 53 53 * }); 54 * Map <Integer,Thing> fk = things.foreignKey(new Hash<Integer,Thing>() {54 * Map<Integer,Thing> fk = things.foreignKey(new Hash<Integer,Thing>() { 55 55 * public int getHashCode(Integer i) { 56 56 * return i.getIntValue(); … … 64 64 * assert things.get(new Thing(3)) == fk.get(3); 65 65 * </pre></li> 66 * 66 * </ul> 67 67 * 68 68 * @author nenik -
trunk/src/org/openstreetmap/josm/data/osm/Way.java
r6717 r6830 126 126 * @param index the position 127 127 * @return the node at position <code>index</code> 128 * @exception IndexOutOfBoundsException thrown if <code>index</code> <0129 * or <code>index</code> >= {@link #getNodesCount()}128 * @exception IndexOutOfBoundsException thrown if <code>index</code> < 0 129 * or <code>index</code> >= {@link #getNodesCount()} 130 130 * @since 1862 131 131 */ … … 254 254 255 255 /** 256 * Contructs a new {@code Way} for the given id. If the id >0, the way is marked256 * Contructs a new {@code Way} for the given id. If the id > 0, the way is marked 257 257 * as incomplete. If id == 0 then way is marked as new 258 258 * 259 * @param id the id. >= 0 required260 * @throws IllegalArgumentException if id <0259 * @param id the id. >= 0 required 260 * @throws IllegalArgumentException if id < 0 261 261 * @since 343 262 262 */ … … 267 267 /** 268 268 * Contructs a new {@code Way} with given id and version. 269 * @param id the id. >= 0 required269 * @param id the id. >= 0 required 270 270 * @param version the version 271 * @throws IllegalArgumentException if id <0271 * @throws IllegalArgumentException if id < 0 272 272 * @since 2620 273 273 */ -
trunk/src/org/openstreetmap/josm/data/osm/event/AbstractDatasetChangedEvent.java
r5170 r6830 22 22 /** 23 23 * Returns list of primitives modified by this event. 24 * <br />24 * <br> 25 25 * <strong>WARNING</strong> This value might be incorrect in case 26 26 * of {@link DataChangedEvent}. It returns all primitives in the dataset -
trunk/src/org/openstreetmap/josm/data/osm/history/History.java
r6623 r6830 43 43 * Creates a new history for an OSM primitive 44 44 * 45 * @param id the id. >0 required.45 * @param id the id. > 0 required. 46 46 * @param type the primitive type. Must not be null. 47 47 * @param versions a list of versions. Can be null. 48 * @throws IllegalArgumentException thrown if id <= 048 * @throws IllegalArgumentException thrown if id <= 0 49 49 * @throws IllegalArgumentException if type is null 50 50 * -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java
r6449 r6830 83 83 * and version <code>version</code>. null, if no such primitive exists. 84 84 * 85 * @param id the id of the primitive. >0 required.85 * @param id the id of the primitive. > 0 required. 86 86 * @param type the primitive type. Must not be null. 87 * @param version the version of the primitive. >0 required87 * @param version the version of the primitive. > 0 required 88 88 * @return the history primitive for the primitive with id <code>id</code>, 89 89 * type <code>type</code>, and version <code>version</code> … … 135 135 * and type <code>type</code>. 136 136 * 137 * @param id the id the if of the primitive. >0 required137 * @param id the id the if of the primitive. > 0 required 138 138 * @param type the type of the primitive. Must not be null. 139 139 * @return the history. null, if there isn't a history for <code>id</code> and 140 140 * <code>type</code>. 141 * @throws IllegalArgumentException thrown if id <= 0141 * @throws IllegalArgumentException thrown if id <= 0 142 142 * @throws IllegalArgumentException thrown if type is null 143 143 */ -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryNode.java
r6069 r6830 22 22 * Constructs a new {@code HistoryNode}. 23 23 * 24 * @param id the id ( >0 required)25 * @param version the version ( >0 required)24 * @param id the id (> 0 required) 25 * @param version the version (> 0 required) 26 26 * @param visible whether the node is still visible 27 * @param user the user (! null required)28 * @param changesetId the changeset id ( >0 required)29 * @param timestamp the timestamp (! null required)27 * @param user the user (!= null required) 28 * @param changesetId the changeset id (> 0 required) 29 * @param timestamp the timestamp (!= null required) 30 30 * @param coords the coordinates 31 31 * @throws IllegalArgumentException if preconditions are violated … … 39 39 * This is needed to build virtual HistoryNodes for modified nodes, which do not have a timestamp and a changeset id. 40 40 * 41 * @param id the id ( >0 required)42 * @param version the version ( >0 required)41 * @param id the id (> 0 required) 42 * @param version the version (> 0 required) 43 43 * @param visible whether the node is still visible 44 * @param user the user (! null required)45 * @param changesetId the changeset id ( >0 required if {@code checkHistoricParams} is true)46 * @param timestamp the timestamp (! null required if {@code checkHistoricParams} is true)44 * @param user the user (!= null required) 45 * @param changesetId the changeset id (> 0 required if {@code checkHistoricParams} is true) 46 * @param timestamp the timestamp (!= null required if {@code checkHistoricParams} is true) 47 47 * @param coords the coordinates 48 48 * @param checkHistoricParams if true, checks values of {@code changesetId} and {@code timestamp} -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java
r6440 r6830 47 47 * Constructs a new {@code HistoryOsmPrimitive}. 48 48 * 49 * @param id the id ( >0 required)50 * @param version the version ( >0 required)49 * @param id the id (> 0 required) 50 * @param version the version (> 0 required) 51 51 * @param visible whether the primitive is still visible 52 * @param user the user (! null required)53 * @param changesetId the changeset id ( >0 required)54 * @param timestamp the timestamp (! null required)52 * @param user the user (!= null required) 53 * @param changesetId the changeset id (> 0 required) 54 * @param timestamp the timestamp (!= null required) 55 55 * 56 56 * @throws IllegalArgumentException if preconditions are violated … … 64 64 * This is needed to build virtual HistoryOsmPrimitives for modified primitives, which do not have a timestamp and a changeset id. 65 65 * 66 * @param id the id ( >0 required)67 * @param version the version ( >0 required)66 * @param id the id (> 0 required) 67 * @param version the version (> 0 required) 68 68 * @param visible whether the primitive is still visible 69 * @param user the user (! null required)70 * @param changesetId the changeset id ( >0 required if {@code checkHistoricParams} is true)71 * @param timestamp the timestamp (! null required if {@code checkHistoricParams} is true)69 * @param user the user (!= null required) 70 * @param changesetId the changeset id (> 0 required if {@code checkHistoricParams} is true) 71 * @param timestamp the timestamp (!= null required if {@code checkHistoricParams} is true) 72 72 * @param checkHistoricParams if true, checks values of {@code changesetId} and {@code timestamp} 73 73 * -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java
r6317 r6830 26 26 * constructor 27 27 * 28 * @param id the id ( >0 required)29 * @param version the version ( >0 required)28 * @param id the id (> 0 required) 29 * @param version the version (> 0 required) 30 30 * @param visible whether the primitive is still visible 31 * @param user the user (! null required)32 * @param changesetId the changeset id ( >0 required)33 * @param timestamp the timestamp (! null required)31 * @param user the user (!= null required) 32 * @param changesetId the changeset id (> 0 required) 33 * @param timestamp the timestamp (!= null required) 34 34 * 35 35 * @throws IllegalArgumentException if preconditions are violated … … 42 42 * constructor 43 43 * 44 * @param id the id ( >0 required)45 * @param version the version ( >0 required)44 * @param id the id (> 0 required) 45 * @param version the version (> 0 required) 46 46 * @param visible whether the primitive is still visible 47 * @param user the user (! null required)48 * @param changesetId the changeset id ( >0 required if {@code checkHistoricParams} is true)49 * @param timestamp the timestamp (! null required if {@code checkHistoricParams} is true)47 * @param user the user (!= null required) 48 * @param changesetId the changeset id (> 0 required if {@code checkHistoricParams} is true) 49 * @param timestamp the timestamp (!= null required if {@code checkHistoricParams} is true) 50 50 * @param checkHistoricParams If true, checks values of {@code changesetId} and {@code timestamp} 51 51 * … … 60 60 * constructor 61 61 * 62 * @param id the id ( >0 required)63 * @param version the version ( >0 required)62 * @param id the id (> 0 required) 63 * @param version the version (> 0 required) 64 64 * @param visible whether the primitive is still visible 65 * @param user the user (! null required)66 * @param changesetId the changeset id ( >0 required)67 * @param timestamp the timestamp (! null required)65 * @param user the user (!= null required) 66 * @param changesetId the changeset id (> 0 required) 67 * @param timestamp the timestamp (!= null required) 68 68 * @param members list of members for this relation 69 69 * -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryWay.java
r6317 r6830 26 26 * Constructs a new {@code HistoryWay}. 27 27 * 28 * @param id the id ( >0 required)29 * @param version the version ( >0 required)28 * @param id the id (> 0 required) 29 * @param version the version (> 0 required) 30 30 * @param visible whether the node is still visible 31 * @param user the user (! null required)32 * @param changesetId the changeset id ( >0 required if {@code checkHistoricParams} is true)33 * @param timestamp the timestamp (! null required if {@code checkHistoricParams} is true)31 * @param user the user (!= null required) 32 * @param changesetId the changeset id (> 0 required if {@code checkHistoricParams} is true) 33 * @param timestamp the timestamp (!= null required if {@code checkHistoricParams} is true) 34 34 * @throws IllegalArgumentException if preconditions are violated 35 35 */ … … 42 42 * This is needed to build virtual HistoryWays for modified ways, which do not have a timestamp and a changeset id. 43 43 * 44 * @param id the id ( >0 required)45 * @param version the version ( >0 required)44 * @param id the id (> 0 required) 45 * @param version the version (> 0 required) 46 46 * @param visible whether the node is still visible 47 * @param user the user (! null required)48 * @param changesetId the changeset id ( >0 required if {@code checkHistoricParams} is true)49 * @param timestamp the timestamp (! null required if {@code checkHistoricParams} is true)47 * @param user the user (!= null required) 48 * @param changesetId the changeset id (> 0 required if {@code checkHistoricParams} is true) 49 * @param timestamp the timestamp (!= null required if {@code checkHistoricParams} is true) 50 50 * @param checkHistoricParams if true, checks values of {@code changesetId} and {@code timestamp} 51 51 * @throws IllegalArgumentException if preconditions are violated … … 59 59 * Constructs a new {@code HistoryWay} with a given list of node ids. 60 60 * 61 * @param id the id ( >0 required)62 * @param version the version ( >0 required)61 * @param id the id (> 0 required) 62 * @param version the version (> 0 required) 63 63 * @param visible whether the node is still visible 64 * @param user the user (! null required)65 * @param changesetId the changeset id ( >0 required if {@code checkHistoricParams} is true)66 * @param timestamp the timestamp (! null required if {@code checkHistoricParams} is true)67 * @param nodeIdList the node ids (! null required)64 * @param user the user (!= null required) 65 * @param changesetId the changeset id (> 0 required if {@code checkHistoricParams} is true) 66 * @param timestamp the timestamp (!= null required if {@code checkHistoricParams} is true) 67 * @param nodeIdList the node ids (!= null required) 68 68 * @throws IllegalArgumentException if preconditions are violated 69 69 */ … … 95 95 * @param idx the index 96 96 * @return the idx-th node id 97 * @exception IndexOutOfBoundsException thrown, if idx <0 || idx >= {#see {@link #getNumNodes()}97 * @exception IndexOutOfBoundsException thrown, if idx < 0 || idx >= {#see {@link #getNumNodes()} 98 98 */ 99 99 public long getNodeId(int idx) throws IndexOutOfBoundsException { -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r6380 r6830 281 281 * With this bug, <code>gv.setGlyphTransform(i, trfm)</code> has a different 282 282 * effect than on most other systems, namely the translation components 283 * ("m02" & "m12", {@link AffineTransform}) appear to be twice as large, as284 * they actually are. The rotation is unaffected (scale & shear not tested283 * ("m02" & "m12", {@link AffineTransform}) appear to be twice as large, as 284 * they actually are. The rotation is unaffected (scale & shear not tested 285 285 * so far). 286 286 * … … 445 445 /** 446 446 * Displays text at specified position including its halo, if applicable. 447 * 447 * 448 448 * @param gv Text's glyphs to display. If {@code null}, use text from {@code s} instead. 449 449 * @param s text to display if {@code gv} is {@code null} … … 484 484 } 485 485 } 486 486 487 487 protected void drawArea(OsmPrimitive osm, Path2D.Double path, Color color, MapImage fillImage, TextElement text) { 488 488 -
trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java
r6463 r6830 184 184 185 185 /** 186 * Returns the <i>radius of curvature in the meridian< i>186 * Returns the <i>radius of curvature in the meridian</i> 187 187 * for this reference ellipsoid at the specified latitude. 188 188 * -
trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java
r6822 r6830 200 200 * @param gs A GridShift object containing the coordinate to shift 201 201 * @return True if the coordinate is within a Sub Grid, false if not 202 * @throws IOException203 202 */ 204 203 public boolean gridShiftForward(NTV2GridShift gs) { … … 223 222 * @param gs A GridShift object containing the coordinate to shift 224 223 * @return True if the coordinate is within a Sub Grid, false if not 225 * @throws IOException226 224 */ 227 225 public boolean gridShiftReverse(NTV2GridShift gs) { -
trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
r6781 r6830 63 63 * A OSM data validator. 64 64 * 65 * @author Francisco R. Santos <frsantos@gmail.com>65 * @author Francisco R. Santos <frsantos@gmail.com> 66 66 */ 67 67 public class OsmValidator implements LayerChangeListener { … … 119 119 ConditionalKeys.class, // 3200 .. 3299 120 120 }; 121 121 122 122 private static Map<String, Test> allTestsMap; 123 123 static { … … 226 226 return new TreeMap<String, Test>(allTestsMap); 227 227 } 228 228 229 229 /** 230 230 * Returns the instance of the given test class. … … 281 281 /** 282 282 * Initialize grid details based on current projection system. Values based on 283 * the original value fixed for EPSG:4326 (10000) using heuristics (that is, test& error283 * the original value fixed for EPSG:4326 (10000) using heuristics (that is, test&error 284 284 * until most bugs were discovered while keeping the processing time reasonable) 285 285 */ -
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
r6639 r6830 101 101 /** The map of potential duplicates. 102 102 * 103 * If there is exactly one node for a given pos, the map includes a pair <pos, Node>.103 * If there is exactly one node for a given pos, the map includes a pair <pos, Node>. 104 104 * If there are multiple nodes for a given pos, the map includes a pair 105 * <pos, NodesByEqualTagsMap>105 * <pos, NodesByEqualTagsMap> 106 106 */ 107 107 private Storage<Object> potentialDuplicates; -
trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java
r6659 r6830 29 29 30 30 /** 31 * Checks for nodes in power lines/minor_lines that do not have a power=tower/pole tag.<br />31 * Checks for nodes in power lines/minor_lines that do not have a power=tower/pole tag.<br> 32 32 * See #7812 for discussions about this test. 33 33 */ -
trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java
r6791 r6830 33 33 /** 34 34 * Tests if there are segments that crosses in the same layer. 35 * <br />35 * <br> 36 36 * This class is abstract since highway/railway/waterway/… ways must be handled separately. 37 37 * An actual implementation must override {@link #isPrimitiveUsable(OsmPrimitive)} … … 53 53 super(tr("Unconnected highways")); 54 54 } 55 55 56 56 @Override 57 57 public boolean isPrimitiveUsable(OsmPrimitive p) { … … 71 71 super(tr("Unconnected railways")); 72 72 } 73 73 74 74 @Override 75 75 public boolean isPrimitiveUsable(OsmPrimitive p) { … … 89 89 super(tr("Unconnected waterways")); 90 90 } 91 91 92 92 @Override 93 93 public boolean isPrimitiveUsable(OsmPrimitive p) { … … 107 107 super(tr("Unconnected natural lands and landuses")); 108 108 } 109 109 110 110 @Override 111 111 public boolean isPrimitiveUsable(OsmPrimitive p) { … … 125 125 super(tr("Unconnected power ways")); 126 126 } 127 127 128 128 @Override 129 129 public boolean isPrimitiveUsable(OsmPrimitive p) { -
trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java
r6623 r6830 35 35 public static final int DIALOG_DISABLED_OPTION = Integer.MIN_VALUE; 36 36 37 /** (preference key = >return value) mappings valid for the current operation (no, those two maps cannot be combined) */37 /** (preference key => return value) mappings valid for the current operation (no, those two maps cannot be combined) */ 38 38 protected static final Map<String, Integer> sessionChoices = new HashMap<String, Integer>(); 39 /** (preference key = >return value) mappings valid for the current session */39 /** (preference key => return value) mappings valid for the current session */ 40 40 protected static final Map<String, Integer> immediateChoices = new HashMap<String, Integer>(); 41 41 /** a set indication that (preference key) is or may be stored for the currently active bulk operation */ -
trunk/src/org/openstreetmap/josm/gui/FileDrop.java
r6798 r6830 39 39 * dropped onto, but only {@link javax.swing.JComponent}s will indicate 40 40 * the drop event with a changed border. 41 * <p />41 * <p> 42 42 * To use this class, construct a new <tt>FileDrop</tt> by passing 43 43 * it the target component and a <tt>Listener</tt> to receive notification 44 44 * when file(s) have been dropped. Here is an example: 45 * <p />46 * <code> <pre>45 * <p> 46 * <code> 47 47 * JPanel myPanel = new JPanel(); 48 48 * new FileDrop( myPanel, new FileDrop.Listener() … … 53 53 * } // end filesDropped 54 54 * }); // end FileDrop.Listener 55 * </ pre></code>56 * <p />55 * </code> 56 * <p> 57 57 * You can specify the border that will appear when files are being dragged by 58 58 * calling the constructor with a {@link javax.swing.border.Border}. Only 59 59 * <tt>JComponent</tt>s will show any indication with a border. 60 * <p />60 * <p> 61 61 * You can turn on some debugging features by passing a <tt>PrintStream</tt> 62 62 * object (such as <tt>System.out</tt>) into the full constructor. A <tt>null</tt> 63 63 * value will result in no extra debugging information being output. 64 * <p />64 * <p> 65 65 * 66 66 * <p>I'm releasing this code into the Public Domain. Enjoy. … … 449 449 * Implement this inner interface to listen for when files are dropped. For example 450 450 * your class declaration may begin like this: 451 * <code> <pre>451 * <code> 452 452 * public class MyClass implements FileDrop.Listener 453 453 * ... … … 457 457 * } // end filesDropped 458 458 * ... 459 * </ pre></code>459 * </code> 460 460 */ 461 461 public static interface Listener { -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r6806 r6830 152 152 /** --debug Print debugging messages to console */ 153 153 DEBUG(false), 154 /** --language= <language>Set the language */154 /** --language=<language> Set the language */ 155 155 LANGUAGE(true), 156 156 /** --reset-preferences Reset the preferences to default */ 157 157 RESET_PREFERENCES(false), 158 /** --load-preferences= <url-to-xml>Changes preferences according to the XML file */158 /** --load-preferences=<url-to-xml> Changes preferences according to the XML file */ 159 159 LOAD_PREFERENCES(true), 160 /** --set= <key>=<value>Set preference key to value */160 /** --set=<key>=<value> Set preference key to value */ 161 161 SET(true), 162 162 /** --geometry=widthxheight(+|-)x(+|-)y Standard unix geometry argument */ … … 167 167 MAXIMIZE(false), 168 168 /** --download=minlat,minlon,maxlat,maxlon Download the bounding box <br> 169 * --download= <URL> Download the location at the URL (with lat=x&lon=y&zoom=z) <br>170 * --download= <filename>Open a file (any file type that can be opened with File/Open) */169 * --download=<URL> Download the location at the URL (with lat=x&lon=y&zoom=z) <br> 170 * --download=<filename> Open a file (any file type that can be opened with File/Open) */ 171 171 DOWNLOAD(true), 172 172 /** --downloadgps=minlat,minlon,maxlat,maxlon Download the bounding box as raw GPS <br> 173 * --downloadgps= <URL> Download the location at the URL (with lat=x&lon=y&zoom=z) as raw GPS */173 * --downloadgps=<URL> Download the location at the URL (with lat=x&lon=y&zoom=z) as raw GPS */ 174 174 DOWNLOADGPS(true), 175 /** --selection= <searchstring>Select with the given search */175 /** --selection=<searchstring> Select with the given search */ 176 176 SELECTION(true); 177 177 … … 275 275 System.exit(1); 276 276 } 277 277 278 278 final boolean languageGiven = args.containsKey(Option.LANGUAGE); 279 279 … … 313 313 314 314 Main.commandLineArgs = Utils.copyArray(argArray); 315 315 316 316 if (args.containsKey(Option.VERSION)) { 317 317 System.out.println(Version.getInstance().getAgentString()); … … 428 428 RemoteControl.start(); 429 429 } 430 430 431 431 if (MessageNotifier.PROP_NOTIFIER_ENABLED.get()) { 432 432 MessageNotifier.start(); -
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r6738 r6830 129 129 130 130 /* File menu */ 131 /** File ->New Layer **/131 /** File / New Layer **/ 132 132 public final NewAction newAction = new NewAction(); 133 /** File ->Open... **/133 /** File / Open... **/ 134 134 public final OpenFileAction openFile = new OpenFileAction(); 135 /** File -> Open Recent >**/135 /** File / Open Recent > **/ 136 136 public final RecentlyOpenedFilesMenu recentlyOpened = new RecentlyOpenedFilesMenu(); 137 /** File ->Open Location... **/137 /** File / Open Location... **/ 138 138 public final OpenLocationAction openLocation = new OpenLocationAction(); 139 /** File ->Save **/139 /** File / Save **/ 140 140 public final SaveAction save = SaveAction.getInstance(); 141 /** File ->Save As... **/141 /** File / Save As... **/ 142 142 public final SaveAsAction saveAs = SaveAsAction.getInstance(); 143 /** File -> Session >Load Session **/143 /** File / Session > Load Session **/ 144 144 public SessionLoadAction sessionLoad; 145 /** File -> Session >Save Session As... **/145 /** File / Session > Save Session As... **/ 146 146 public SessionSaveAsAction sessionSaveAs; 147 /** File ->Export to GPX... **/147 /** File / Export to GPX... **/ 148 148 public final GpxExportAction gpxExport = new GpxExportAction(); 149 /** File ->Download from OSM... **/149 /** File / Download from OSM... **/ 150 150 public final DownloadAction download = new DownloadAction(); 151 /** File ->Download object... **/151 /** File / Download object... **/ 152 152 public final DownloadPrimitiveAction downloadPrimitive = new DownloadPrimitiveAction(); 153 /** File ->Download parent ways/relations... **/153 /** File / Download parent ways/relations... **/ 154 154 public final DownloadReferrersAction downloadReferrers = new DownloadReferrersAction(); 155 /** File ->Close open changesets... **/155 /** File / Close open changesets... **/ 156 156 public final CloseChangesetAction closeChangesetAction = new CloseChangesetAction(); 157 /** File ->Update data **/157 /** File / Update data **/ 158 158 public final JosmAction update = new UpdateDataAction(); 159 /** File ->Update selection **/159 /** File / Update selection **/ 160 160 public final JosmAction updateSelection = new UpdateSelectionAction(); 161 /** File ->Update modified **/161 /** File / Update modified **/ 162 162 public final JosmAction updateModified = new UpdateModifiedAction(); 163 /** File ->Upload data **/163 /** File / Upload data **/ 164 164 public final JosmAction upload = new UploadAction(); 165 /** File ->Upload selection **/165 /** File / Upload selection **/ 166 166 public final JosmAction uploadSelection = new UploadSelectionAction(); 167 /** File ->Restart **/167 /** File / Restart **/ 168 168 public final RestartAction restart = new RestartAction(); 169 /** File ->Exit **/169 /** File / Exit **/ 170 170 public final ExitAction exit = new ExitAction(); 171 171 172 172 /* Edit menu */ 173 /** Edit ->Undo... */173 /** Edit / Undo... */ 174 174 public final UndoAction undo = new UndoAction(); 175 /** Edit ->Redo */175 /** Edit / Redo */ 176 176 public final RedoAction redo = new RedoAction(); 177 /** Edit ->Copy */177 /** Edit / Copy */ 178 178 public final CopyAction copy = new CopyAction(); 179 /** Edit ->Copy Coordinates */179 /** Edit / Copy Coordinates */ 180 180 public final JosmAction copyCoordinates = new CopyCoordinatesAction(); 181 /** Edit ->Paste */181 /** Edit / Paste */ 182 182 public final PasteAction paste = new PasteAction(); 183 /** Edit ->Paste Tags */183 /** Edit / Paste Tags */ 184 184 public final PasteTagsAction pasteTags = new PasteTagsAction(); 185 /** Edit ->Duplicate */185 /** Edit / Duplicate */ 186 186 public final DuplicateAction duplicate = new DuplicateAction(); 187 /** Edit ->Delete */187 /** Edit / Delete */ 188 188 public final DeleteAction delete = new DeleteAction(); 189 /** Edit ->Purge... */189 /** Edit / Purge... */ 190 190 public final JosmAction purge = new PurgeAction(); 191 /** Edit ->Merge layer */191 /** Edit / Merge layer */ 192 192 public final MergeLayerAction merge = new MergeLayerAction(); 193 /** Edit ->Merge selection */193 /** Edit / Merge selection */ 194 194 public final MergeSelectionAction mergeSelected = new MergeSelectionAction(); 195 /** Edit ->Search... */195 /** Edit / Search... */ 196 196 public final SearchAction search = new SearchAction(); 197 /** Edit ->Preferences */197 /** Edit / Preferences */ 198 198 public final PreferencesAction preferences = new PreferencesAction(); 199 199 200 200 /* View menu */ 201 /** View ->Wireframe View */201 /** View / Wireframe View */ 202 202 public final WireframeToggleAction wireFrameToggleAction = new WireframeToggleAction(); 203 203 public final JosmAction toggleGPXLines = new ToggleGPXLinesAction(); 204 /** View ->Advanced info */204 /** View / Advanced info */ 205 205 public final InfoAction info = new InfoAction(); 206 /** View ->Advanced info (web) */206 /** View / Advanced info (web) */ 207 207 public final InfoWebAction infoweb = new InfoWebAction(); 208 /** View ->History */208 /** View / History */ 209 209 public final HistoryInfoAction historyinfo = new HistoryInfoAction(); 210 /** View ->History (web) */210 /** View / History (web) */ 211 211 public final HistoryInfoWebAction historyinfoweb = new HistoryInfoWebAction(); 212 /** View ->"Zoom to"... actions */212 /** View / "Zoom to"... actions */ 213 213 public final Map<String, AutoScaleAction> autoScaleActions = new HashMap<String, AutoScaleAction>(); 214 /** View ->Jump to position */214 /** View / Jump to position */ 215 215 public final JumpToAction jumpToAct = new JumpToAction(); 216 216 217 217 /* Tools menu */ 218 /** Tools ->Split Way */218 /** Tools / Split Way */ 219 219 public final SplitWayAction splitWay = new SplitWayAction(); 220 /** Tools ->Combine Way */220 /** Tools / Combine Way */ 221 221 public final CombineWayAction combineWay = new CombineWayAction(); 222 /** Tools ->Reverse Ways */222 /** Tools / Reverse Ways */ 223 223 public final ReverseWayAction reverseWay = new ReverseWayAction(); 224 /** Tools ->Simplify Way */224 /** Tools / Simplify Way */ 225 225 public final SimplifyWayAction simplifyWay = new SimplifyWayAction(); 226 /** Tools ->Align Nodes in Circle */226 /** Tools / Align Nodes in Circle */ 227 227 public final AlignInCircleAction alignInCircle = new AlignInCircleAction(); 228 /** Tools ->Align Nodes in Line */228 /** Tools / Align Nodes in Line */ 229 229 public final AlignInLineAction alignInLine = new AlignInLineAction(); 230 /** Tools ->Distribute Nodes */230 /** Tools / Distribute Nodes */ 231 231 public final DistributeAction distribute = new DistributeAction(); 232 /** Tools ->Orthogonalize Shape */232 /** Tools / Orthogonalize Shape */ 233 233 public final OrthogonalizeAction ortho = new OrthogonalizeAction(); 234 234 /** Orthogonalize undo. Action is not shown in the menu. Only triggered by shortcut */ 235 235 public final Undo orthoUndo = new Undo(); 236 /** Tools ->Mirror */236 /** Tools / Mirror */ 237 237 public final MirrorAction mirror = new MirrorAction(); 238 /** Tools ->Follow line */238 /** Tools / Follow line */ 239 239 public final FollowLineAction followLine = new FollowLineAction(); 240 /** Tools ->Add Node... */240 /** Tools / Add Node... */ 241 241 public final AddNodeAction addNode = new AddNodeAction(); 242 /** Tools ->Move Node... */242 /** Tools / Move Node... */ 243 243 public final MoveNodeAction moveNode = new MoveNodeAction(); 244 /** Tools ->Create Circle */244 /** Tools / Create Circle */ 245 245 public final CreateCircleAction createCircle = new CreateCircleAction(); 246 /** Tools ->Merge Nodes */246 /** Tools / Merge Nodes */ 247 247 public final MergeNodesAction mergeNodes = new MergeNodesAction(); 248 /** Tools ->Join Node to Way */248 /** Tools / Join Node to Way */ 249 249 public final JoinNodeWayAction joinNodeWay = new JoinNodeWayAction(); 250 /** Tools ->Disconnect Node from Way */250 /** Tools / Disconnect Node from Way */ 251 251 public final UnJoinNodeWayAction unJoinNodeWay = new UnJoinNodeWayAction(); 252 /** Tools ->Unglue Ways */252 /** Tools / Unglue Ways */ 253 253 public final UnGlueAction unglueNodes = new UnGlueAction(); 254 /** Tools ->Join overlapping Areas */254 /** Tools / Join overlapping Areas */ 255 255 public final JoinAreasAction joinAreas = new JoinAreasAction(); 256 /** Tools ->Create multipolygon */256 /** Tools / Create multipolygon */ 257 257 public final CreateMultipolygonAction createMultipolygon = new CreateMultipolygonAction(false); 258 /** Tools ->Update multipolygon */258 /** Tools / Update multipolygon */ 259 259 public final CreateMultipolygonAction updateMultipolygon = new CreateMultipolygonAction(true); 260 260 261 261 /* Selection menu */ 262 /** Selection ->Select All */262 /** Selection / Select All */ 263 263 public final SelectAllAction selectAll = new SelectAllAction(); 264 /** Selection ->Unselect All */264 /** Selection / Unselect All */ 265 265 public final UnselectAllAction unselectAll = new UnselectAllAction(); 266 /** Selection ->Non-branching way sequences */266 /** Selection / Non-branching way sequences */ 267 267 public final SelectNonBranchingWaySequencesAction nonBranchingWaySequences = new SelectNonBranchingWaySequencesAction(); 268 268 269 269 /* Audio menu */ 270 /** Audio ->Play/Pause */270 /** Audio / Play/Pause */ 271 271 public final JosmAction audioPlayPause = new AudioPlayPauseAction(); 272 /** Audio ->Next marker */272 /** Audio / Next marker */ 273 273 public final JosmAction audioNext = new AudioNextAction(); 274 /** Audio ->Previous Marker */274 /** Audio / Previous Marker */ 275 275 public final JosmAction audioPrev = new AudioPrevAction(); 276 /** Audio ->Forward */276 /** Audio / Forward */ 277 277 public final JosmAction audioFwd = new AudioFwdAction(); 278 /** Audio ->Back */278 /** Audio / Back */ 279 279 public final JosmAction audioBack = new AudioBackAction(); 280 /** Audio ->Faster */280 /** Audio / Faster */ 281 281 public final JosmAction audioFaster = new AudioFasterAction(); 282 /** Audio ->Slower */282 /** Audio / Slower */ 283 283 public final JosmAction audioSlower = new AudioSlowerAction(); 284 284 285 285 /* Windows Menu */ 286 /** Windows ->Changeset Manager */286 /** Windows / Changeset Manager */ 287 287 public final ChangesetManagerToggleAction changesetManager = new ChangesetManagerToggleAction(); 288 288 289 289 /* Help menu */ 290 /** Help ->Help */290 /** Help / Help */ 291 291 public final HelpAction help = new HelpAction(); 292 /** Help ->About */292 /** Help / About */ 293 293 public final AboutAction about = new AboutAction(); 294 /** Help ->Show Status Report */294 /** Help / Show Status Report */ 295 295 public final ShowStatusReportAction statusreport = new ShowStatusReportAction(); 296 296 … … 324 324 * dataMenu contains plugin actions that are related to certain tagging schemes (addressing opening hours), 325 325 * importing external data and using external web APIs 326 * @since 6082 327 */ 326 * @since 6082 327 */ 328 328 public final JMenu dataMenu = addMenu(marktr("Data"), KeyEvent.VK_D, 5, ht("/Menu/Data")); 329 329 /** … … 337 337 public final JMenu presetsMenu = addMenu(marktr("Presets"), KeyEvent.VK_P, 7, ht("/Menu/Presets")); 338 338 /** 339 * submenu in Imagery menu that contains plugin-managed additional imagery layers 339 * submenu in Imagery menu that contains plugin-managed additional imagery layers 340 340 * @since 6097 341 341 */ … … 348 348 * gpsMenu contains all plugin actions that are related 349 349 * to using GPS data, including opening, uploading and real-time tracking 350 * @since 6082 350 * @since 6082 351 351 */ 352 352 public final JMenu gpsMenu = addMenu(marktr("GPS"), KeyEvent.VK_G, 9, ht("/Menu/GPS")); … … 408 408 } 409 409 }; 410 410 411 411 /** 412 412 * @since 6088 413 413 * @return the default position of tnew top-level menus 414 414 */ 415 public int getDefaultMenuPos() { 416 return defaultMenuPos; 415 public int getDefaultMenuPos() { 416 return defaultMenuPos; 417 417 } 418 418 … … 586 586 public MainMenu() { 587 587 JMenuItem current; 588 588 589 589 moreToolsMenu.setVisible(false); 590 590 dataMenu.setVisible(false); 591 591 gpsMenu.setVisible(false); 592 592 593 593 add(fileMenu, newAction); 594 594 add(fileMenu, openFile); … … 710 710 add(imageryMenu, PreferencesAction.forPreferenceTab(tr("Imagery preferences"), 711 711 tr("Click to open the imagery tab in the preferences"), ImageryPreference.class)); 712 712 713 713 add(selectionMenu, selectAll); 714 714 add(selectionMenu, unselectAll); -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r6654 r6830 68 68 /** 69 69 * This is a component used in the {@link MapFrame} for browsing the map. It use is to 70 * provide the MapMode's enough capabilities to operate.<br /><br/>70 * provide the MapMode's enough capabilities to operate.<br><br> 71 71 * 72 72 * {@code MapView} holds meta-data about the data set currently displayed, as scale level, 73 73 * center point viewed, what scrolling mode or editing mode is selected or with 74 * what projection the map is viewed etc..<br /><br/>74 * what projection the map is viewed etc..<br><br> 75 75 * 76 76 * {@code MapView} is able to administrate several layers. … … 732 732 * Example: 733 733 * <pre> 734 * List <WMSLayer>wmsLayers = getLayersOfType(WMSLayer.class);734 * List<WMSLayer> wmsLayers = getLayersOfType(WMSLayer.class); 735 735 * </pre> 736 736 * -
trunk/src/org/openstreetmap/josm/gui/OsmPrimitivRenderer.java
r6380 r6830 24 24 * 25 25 * @author imi 26 * @author Frederik Ramm <frederik@remote.org>26 * @author Frederik Ramm 27 27 */ 28 28 public class OsmPrimitivRenderer implements ListCellRenderer, TableCellRenderer { -
trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java
r6380 r6830 180 180 181 181 /** 182 * Task can run in background if returned value <>null. Note that it's tasks responsibility182 * Task can run in background if returned value != null. Note that it's tasks responsibility 183 183 * to ensure proper synchronization, PleaseWaitRunnable doesn't with it. 184 * @return If returned value is <>null then task can run in background. TaskId could be used in future for "Always run in background" checkbox184 * @return If returned value is != null then task can run in background. TaskId could be used in future for "Always run in background" checkbox 185 185 */ 186 186 public ProgressTaskId canRunInBackground() { -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java
r6822 r6830 50 50 * <ol> 51 51 * <li>the table model and the list selection for for a {@link JTable} which shows my entries. 52 * See {@link #getMyTableModel()} </li>and {@link ListMergeModel#getMySelectionModel()}</li>52 * See {@link #getMyTableModel()} and {@link ListMergeModel#getMySelectionModel()}</li> 53 53 * <li>dito for their entries and merged entries</li> 54 54 * </ol> … … 410 410 * @param rows the indices 411 411 * @param current the row index before which the nodes are inserted 412 * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes412 * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes 413 413 * 414 414 */ … … 424 424 * @param rows the indices 425 425 * @param current the row index before which the nodes are inserted 426 * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes426 * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes 427 427 * 428 428 */ … … 437 437 * @param rows the indices 438 438 * @param current the row index before which the nodes are inserted 439 * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes439 * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes 440 440 * 441 441 */ … … 451 451 * @param rows the indices 452 452 * @param current the row index after which the nodes are inserted 453 * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes453 * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes 454 454 * 455 455 */ … … 466 466 * @param rows the indices 467 467 * @param current the row index after which the nodes are inserted 468 * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes468 * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes 469 469 * 470 470 */ … … 479 479 * @param rows the indices 480 480 * @param current the row index after which the nodes are inserted 481 * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes481 * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes 482 482 * 483 483 */ … … 633 633 * participates in the current {@link ComparePairType} 634 634 * 635 * @see ComparePairListModel#getSelectedComparePair()635 * @see ListMergeModel.ComparePairListModel#getSelectedComparePair() 636 636 */ 637 637 public boolean isParticipatingInCurrentComparePair() { … … 831 831 private final List<ComparePairType> compareModes; 832 832 833 /** 834 * Constructs a new {@code ComparePairListModel}. 835 */ 833 836 public ComparePairListModel() { 834 837 this.compareModes = new ArrayList<ComparePairType>(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentDownloadTask.java
r6084 r6830 63 63 * Creates a download task for a single changeset 64 64 * 65 * @param changesetId the changeset id. >0 required.66 * @throws IllegalArgumentException thrown if changesetId <= 065 * @param changesetId the changeset id. > 0 required. 66 * @throws IllegalArgumentException thrown if changesetId <= 0 67 67 */ 68 68 public ChangesetContentDownloadTask(int changesetId) throws IllegalArgumentException{ … … 74 74 75 75 /** 76 * Creates a download task for a collection of changesets. null values and id <=0 in76 * Creates a download task for a collection of changesets. null values and id <=0 in 77 77 * the collection are sillently discarded. 78 78 * … … 100 100 101 101 /** 102 * Creates a download task for a collection of changesets. null values and id <=0 in102 * Creates a download task for a collection of changesets. null values and id <=0 in 103 103 * the collection are sillently discarded. 104 104 * -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetHeaderDownloadTask.java
r6313 r6830 104 104 * whose parent is {@link Main#parent}. 105 105 * 106 * Null ids or or ids <= 0 in the id collection are ignored.106 * Null ids or or ids <= 0 in the id collection are ignored. 107 107 * 108 108 * @param ids the collection of ids. Empty collection assumed if null. … … 118 118 * whose parent is the parent window of <code>dialogParent</code>. 119 119 * 120 * Null ids or or ids <= 0 in the id collection are ignored.120 * Null ids or or ids <= 0 in the id collection are ignored. 121 121 * 122 122 * @param dialogParent the parent reference component for the {@link org.openstreetmap.josm.gui.PleaseWaitDialog}. Must not be null. -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java
r6361 r6830 41 41 * if (task.isCanceled() || task.hasError()) 42 42 * return; 43 * List <Relation>parents = task.getParents();43 * List<Relation> parents = task.getParents(); 44 44 * // do something with the parent relations 45 45 * } … … 64 64 * Creates a new task for asynchronously downloading the parents of a child relation. 65 65 * 66 * @param child the child relation. Must not be null. Must have an id >0.66 * @param child the child relation. Must not be null. Must have an id > 0. 67 67 * @param layer the OSM data layer. Must not be null. 68 68 * @param full if true, parent relations are fully downloaded (i.e. with their members) -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeModel.java
r6084 r6830 15 15 /** 16 16 * This is a {@link TreeModel} which provides the hierarchical structure of {@link Relation}s 17 * to a {@link javax.swing. tree.JTree}.17 * to a {@link javax.swing.JTree}. 18 18 * 19 19 * The model is initialized with a root relation or with a list of {@link RelationMember}s, see -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java
r6792 r6830 26 26 * (that are shared by other members). 27 27 * 28 * @author Christiaan Welvaart <cjw@time4t.net>28 * @author Christiaan Welvaart <cjw@time4t.net> 29 29 * 30 30 */ -
trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
r6380 r6830 37 37 * Provides max/min lat/lon input fields as well as the "URL from www.openstreetmap.org" text field. 38 38 * 39 * @author Frederik Ramm <frederik@remote.org>39 * @author Frederik Ramm 40 40 * 41 41 */ -
trunk/src/org/openstreetmap/josm/gui/download/TileSelection.java
r6084 r6830 15 15 * Provides a tile coordinate input field. 16 16 * 17 * @author Frederik Ramm <frederik@remote.org>17 * @author Frederik Ramm 18 18 * 19 19 */ … … 27 27 } 28 28 29 /** 30 * Constructs a new {@code TileSelection}. 31 */ 29 32 public TileSelection() { 30 33 build(); -
trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java
r6440 r6830 10 10 import java.util.Collection; 11 11 import java.util.HashSet; 12 import java.util.List;13 12 import java.util.Set; 14 13 … … 57 56 private OsmServerHistoryReader reader = null; 58 57 58 /** 59 * Constructs a new {@code HistoryLoadTask}. 60 */ 59 61 public HistoryLoadTask() { 60 62 super(tr("Load history"), true); … … 63 65 64 66 /** 65 * C reates a new task67 * Constructs a new {@code HistoryLoadTask}. 66 68 * 67 69 * @param parent the component to be used as reference to find the … … 95 97 * Adds an object whose history is to be loaded. 96 98 * 97 * @param pid the primitive id. Must not be null. Id >0 required.99 * @param pid the primitive id. Must not be null. Id > 0 required. 98 100 * @return this task 99 101 */ … … 133 135 * Adds an object to be loaded, the object is specified by an OSM primitive. 134 136 * 135 * @param primitive the OSM primitive. Must not be null. primitive.getId() >0 required.137 * @param primitive the OSM primitive. Must not be null. primitive.getId() > 0 required. 136 138 * @return this task 137 139 * @throws IllegalArgumentException thrown if the primitive is null 138 * @throws IllegalArgumentException thrown if primitive.getId() <= 0140 * @throws IllegalArgumentException thrown if primitive.getId() <= 0 139 141 */ 140 142 public HistoryLoadTask add(OsmPrimitive primitive) { … … 148 150 * 149 151 * @param primitives the OSM primitives. Must not be <code>null</code>. 150 * <code>primitive.getId() >0</code> required.152 * <code>primitive.getId() > 0</code> required. 151 153 * @return this task 152 154 * @throws IllegalArgumentException thrown if primitives is <code>null</code> -
trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetTask.java
r6316 r6830 31 31 /** 32 32 * Closes all changesets in <code>changesets</code> if they are not null, if they 33 * are still open and if they have an id >0. Other changesets in the collection33 * are still open and if they have an id > 0. Other changesets in the collection 34 34 * are ignored. 35 35 * -
trunk/src/org/openstreetmap/josm/gui/io/SaveLayerTask.java
r6643 r6830 17 17 * ExecutorService executorService = ... 18 18 * SaveLayerTask task = new SaveLayerTask(layer, monitor); 19 * Future <?>taskFuture = executorServce.submit(task)19 * Future<?> taskFuture = executorServce.submit(task) 20 20 * try { 21 21 * // wait for the task to complete -
trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java
r6316 r6830 31 31 * ExecutorService executorService = ... 32 32 * UploadLayerTask task = new UploadLayerTask(layer, monitor); 33 * Future <?>taskFuture = executorServce.submit(task)33 * Future<?> taskFuture = executorServce.submit(task) 34 34 * try { 35 35 * // wait for the task to complete -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r6775 r6830 231 231 return sp; 232 232 } 233 233 234 234 @Override 235 235 public boolean isInfoResizable() { … … 393 393 /** 394 394 * transition function: 395 * w(0)=1, w(1)=0, 0 <=w(x)<=1396 * @param x number: 0 <=x<=1395 * w(0)=1, w(1)=0, 0<=w(x)<=1 396 * @param x number: 0<=x<=1 397 397 * @return the weighted value 398 398 */ -
trunk/src/org/openstreetmap/josm/gui/layer/Layer.java
r6708 r6830 450 450 451 451 /** 452 * Replies the savable state of this layer (i.e if it can be saved through a "File- >Save" dialog).452 * Replies the savable state of this layer (i.e if it can be saved through a "File->Save" dialog). 453 453 * @return true if this layer can be saved to a file 454 454 * @since 5459 … … 468 468 469 469 /** 470 * Creates a new "Save" dialog for this layer and makes it visible.<br />470 * Creates a new "Save" dialog for this layer and makes it visible.<br> 471 471 * When the user has chosen a file, checks the file extension, and confirms overwrite if needed. 472 472 * @return The output {@code File} -
trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
r6798 r6830 87 87 * Class that displays a slippy map layer. 88 88 * 89 * @author Frederik Ramm <frederik@remote.org>90 * @author LuVar <lubomir.varga@freemap.sk>91 * @author Dave Hansen <dave@sr71.net>92 * @author Upliner <upliner@gmail.com>89 * @author Frederik Ramm 90 * @author LuVar <lubomir.varga@freemap.sk> 91 * @author Dave Hansen <dave@sr71.net> 92 * @author Upliner <upliner@gmail.com> 93 93 * 94 94 */ … … 736 736 * Check if zooming out is allowed 737 737 * 738 * @return true, if zooming out is allowed (currentZoomLevel >minZoomLevel)738 * @return true, if zooming out is allowed (currentZoomLevel > minZoomLevel) 739 739 */ 740 740 public boolean zoomDecreaseAllowed() { -
trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
r6497 r6830 514 514 * 515 515 * @param request 516 * @return -1 if request is no longer needed, otherwise priority of request (lower number <=>more important request)516 * @return -1 if request is no longer needed, otherwise priority of request (lower number <=> more important request) 517 517 */ 518 518 private int getRequestPriority(WMSRequest request) { … … 738 738 739 739 public static class ChangeResolutionAction extends AbstractAction implements LayerAction { 740 740 741 741 /** 742 742 * Constructs a new {@code ChangeResolutionAction} -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/AudioMarker.java
r6380 r6830 17 17 * Marker class with audio playback capability. 18 18 * 19 * @author Frederik Ramm <frederik@remote.org>19 * @author Frederik Ramm 20 20 * 21 21 */ -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ButtonMarker.java
r6380 r6830 19 19 * Marker class with button look-and-feel. 20 20 * 21 * @author Frederik Ramm <frederik@remote.org>21 * @author Frederik Ramm 22 22 * 23 23 */ -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ImageMarker.java
r6380 r6830 31 31 * displays an image view dialog. Re-uses some code from GeoImageLayer. 32 32 * 33 * @author Frederik Ramm <frederik@remote.org>33 * @author Frederik Ramm 34 34 * 35 35 */ -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
r6615 r6830 60 60 * will create AudioMarkers for .wav files, ImageMarkers for .png/.jpg/.jpeg 61 61 * files, and WebMarkers for everything else. (The creation of a WebMarker will 62 * fail if there's no valid URL in the <link>tag, so it might still make sense62 * fail if there's no valid URL in the <link> tag, so it might still make sense 63 63 * to add Makers for such waypoints at the end of the list.) 64 64 * 65 * The default implementation only looks at the value of the <link>tag inside66 * the <wpt>tag of the GPX file.65 * The default implementation only looks at the value of the <link> tag inside 66 * the <wpt> tag of the GPX file. 67 67 * 68 68 * <h2>HowTo implement a new Marker</h2> … … 78 78 * </ul> 79 79 * 80 * @author Frederik Ramm <frederik@remote.org>80 * @author Frederik Ramm 81 81 */ 82 82 public class Marker implements TemplateEngineDataProvider { … … 288 288 public double time; 289 289 /** Time offset in seconds from the gpx point from which it was derived, may be adjusted later to sync with other data, so not final */ 290 public double offset; 290 public double offset; 291 291 292 292 private String cachedText; 293 293 private int textVersion = -1; 294 294 private CachedLatLon coor; 295 295 296 296 private boolean erroneous = false; 297 297 … … 416 416 } 417 417 } 418 418 419 419 protected void paintIcon(MapView mv, Graphics g, int x, int y) { 420 420 if (!erroneous) { … … 424 424 int width = symbol.getIconWidth(); 425 425 int height = symbol.getIconHeight(); 426 426 427 427 redSymbol = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); 428 428 Graphics2D gbi = redSymbol.createGraphics(); … … 501 501 throw new UnsupportedOperationException(); 502 502 } 503 503 504 504 /** 505 505 * Determines if this marker is erroneous. … … 510 510 return erroneous; 511 511 } 512 512 513 513 /** 514 514 * Sets this marker erroneous or not. -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerProducers.java
r6380 r6830 12 12 * the Marker are consecutively called until one returns a Marker object. 13 13 * 14 * @author Frederik Ramm <frederik@remote.org>14 * @author Frederik Ramm 15 15 */ 16 16 public interface MarkerProducers { -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java
r6362 r6830 31 31 * Singleton marker class to track position of audio. 32 32 * 33 * @author David Earl <david@frankieandshadow.com>33 * @author David Earl <david@frankieandshadow.com> 34 34 * @since 572 35 35 */ -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/WebMarker.java
r6380 r6830 23 23 * Marker class with Web URL activation. 24 24 * 25 * @author Frederik Ramm <frederik@remote.org>25 * @author Frederik Ramm 26 26 * 27 27 */ … … 41 41 setErroneous(true); 42 42 new Notification( 43 "<b>" + tr("There was an error while trying to display the URL for this marker") + "</b><br>" + 43 "<b>" + tr("There was an error while trying to display the URL for this marker") + "</b><br>" + 44 44 tr("(URL was: ") + webUrl.toString() + ")" + "<br>" + error) 45 45 .setIcon(JOptionPane.ERROR_MESSAGE) … … 59 59 return wpt; 60 60 } 61 61 62 62 private final void updateErroneous() { 63 63 if ("file".equals(webUrl.getProtocol())) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
r6792 r6830 294 294 * 295 295 * @param osm the primitive to create styles for 296 * @param scale the scale (in meters per 100 px), must be >0296 * @param scale the scale (in meters per 100 px), must be > 0 297 297 * @param multipolyOuterWay support for a very old multipolygon tagging style 298 298 * where you add the tags both to the outer and the inner way. -
trunk/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java
r6623 r6830 31 31 * options <tt>mappaint.nameOrder</tt> and <tt>mappaint.nameComplementOrder</tt>.</li> 32 32 * </ul> 33 * </p>34 33 * 35 34 */ … … 202 201 return result; 203 202 } 204 203 205 204 /** 206 205 * Sets the name tags to be looked up in order to build up the label. … … 221 220 this.nameComplementTags = buildNameTags(nameComplementTags); 222 221 } 223 222 224 223 /** 225 224 * Replies an unmodifiable list of the name tags used to compose the label. -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java
r6426 r6830 22 22 23 23 /** 24 * The View - >Map Paint Styles menu24 * The View -> Map Paint Styles menu 25 25 * @since 5086 26 26 */ -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r6670 r6830 49 49 return styles; 50 50 } 51 51 52 52 private MapPaintStyles() { 53 53 // Hide default constructor for utils classes … … 388 388 389 389 /*********************************** 390 * MapPaintSylesUpdateListener & related code390 * MapPaintSylesUpdateListener & related code 391 391 * (get informed when the list of MapPaint StyleSources changes) 392 392 */ -
trunk/src/org/openstreetmap/josm/gui/mappaint/Range.java
r6561 r6830 3 3 4 4 /** 5 * An interval of the form "lower < x <= upper" where 0 <= lower <upper.5 * An interval of the form "lower < x <= upper" where 0 <= lower < upper. 6 6 * (upper can be Double.POSITIVE_INFINITY) 7 7 * immutable class -
trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
r6362 r6830 16 16 * Splits the range of possible scale values (0 < scale < +Infinity) into multiple 17 17 * subranges, for each scale range it keeps a list of styles. 18 * Immutable class, equals & hashCode is required (the same for StyleList, ElemStyle18 * Immutable class, equals & hashCode is required (the same for StyleList, ElemStyle 19 19 * and its subclasses). 20 20 */ -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
r6687 r6830 138 138 139 139 /** 140 * link between primitives, e.g. relation >[role=outer] way140 * link between primitives, e.g. relation >[role=outer] way 141 141 */ 142 142 LINK -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r6809 r6830 88 88 } 89 89 } 90 90 91 91 private ExpressionFactory() { 92 92 // Hide default constructor for utils classes … … 531 531 * Percent-encode a string. (See https://en.wikipedia.org/wiki/Percent-encoding) 532 532 * This is especially useful for data urls, e.g. 533 * <code>icon-image: concat("data:image/svg+xml,", URL_encode(" <svg>...</svg>"));</code>533 * <code>icon-image: concat("data:image/svg+xml,", URL_encode("<svg>...</svg>"));</code> 534 534 * @param s arbitrary string 535 535 * @return the encoded string … … 546 546 * XML-encode a string. 547 547 * 548 * Escapes special characters in xml. Alternative to using <![CDATA[ ... ]]> 549 * blocks. 548 * Escapes special characters in xml. Alternative to using <![CDATA[ ... ]]> blocks. 550 549 * @param s arbitrary string 551 550 * @return the encoded string -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
r6774 r6830 205 205 206 206 /** 207 * comma delimited list of floats (at least 2, all >= 0)207 * comma delimited list of floats (at least 2, all >= 0) 208 208 */ 209 209 List<Float> float_array() : -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r6825 r6830 48 48 * an "inverse" notation:</p> 49 49 * <pre> 50 * selector_a >selector_b { ... } // the standard notation (child selector)51 * relation[type=route] >way { ... } // example (all ways of a route)50 * selector_a > selector_b { ... } // the standard notation (child selector) 51 * relation[type=route] > way { ... } // example (all ways of a route) 52 52 * 53 * selector_a <selector_b { ... } // the inverse notation (parent selector)54 * node[traffic_calming] <way { ... } // example (way that has a traffic calming node)53 * selector_a < selector_b { ... } // the inverse notation (parent selector) 54 * node[traffic_calming] < way { ... } // example (way that has a traffic calming node) 55 55 * </pre> 56 56 * -
trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java
r6084 r6830 21 21 import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec; 22 22 import org.openstreetmap.josm.gui.help.HelpUtil; 23 import org.openstreetmap.josm.gui.widgets.JosmTextField; 23 24 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator; 24 25 import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel; 25 26 import org.openstreetmap.josm.tools.CheckParameterUtil; 26 27 import org.openstreetmap.josm.tools.ImageProvider; 27 import org.openstreetmap.josm.gui.widgets.JosmTextField;28 28 29 29 /** 30 30 * Panel allowing the user to setup advanced OAuth parameters: 31 * <ul> 31 32 * <li>Consumer key</li> 32 33 * <li>Consumer secret</li> … … 34 35 * <li>Access token URL</li> 35 36 * <li>Authorize URL</li> 37 * </ul> 36 38 * 37 39 * @see OAuthParameters -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEntry.java
r6670 r6830 120 120 /** 121 121 * extract file part from url, e.g.: 122 * http://www.test.com/file.xml?format=text -->file.xml122 * http://www.test.com/file.xml?format=text --> file.xml 123 123 */ 124 124 public String getFileNamePart() { -
trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java
r6792 r6830 194 194 * adds a tag given by a name/value pair to the tag editor model. 195 195 * 196 * If there is no tag with name <code>name</ name> yet, a new {@link TagModel} is created196 * If there is no tag with name <code>name</code> yet, a new {@link TagModel} is created 197 197 * and append to this model. 198 198 * 199 * If there is a tag with name <code>name</ name>, <code>value</code> is merged to the list199 * If there is a tag with name <code>name</code>, <code>value</code> is merged to the list 200 200 * of values for this tag. 201 201 * -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
r6824 r6830 240 240 241 241 /** 242 * Enum denoting how a match (see {@link Item#matches}) is performed.242 * Enum denoting how a match (see {@link TaggingPresetItem#matches}) is performed. 243 243 */ 244 244 public static enum MatchType { … … 1379 1379 /** 1380 1380 * allow escaped comma in comma separated list: 1381 * "A\, B\, C,one\, two" -- >["A, B, C", "one, two"]1381 * "A\, B\, C,one\, two" --> ["A, B, C", "one, two"] 1382 1382 * @param delimiter the delimiter, e.g. a comma. separates the entries and 1383 1383 * must be escaped within one entry -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionItemPriority.java
r6437 r6830 79 79 /** 80 80 * Merges two priorities. 81 * The resulting priority is always >= the original ones.81 * The resulting priority is always >= the original ones. 82 82 */ 83 83 public AutoCompletionItemPriority mergeWith(AutoCompletionItemPriority other) { -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java
r6437 r6830 247 247 /** 248 248 * replies the idx-th item from the list of filtered items 249 * @param idx the index; must be in the range 0 <= idx <{@link #getFilteredSize()}249 * @param idx the index; must be in the range 0 <= idx < {@link #getFilteredSize()} 250 250 * @return the item 251 251 * -
trunk/src/org/openstreetmap/josm/gui/util/AdjustmentSynchronizer.java
r6316 r6830 21 21 22 22 /** 23 * Synchronizes scrollbar adjustments between a set of {@link Adjustable}s. 24 * Whenever the adjustment of one of the registered Adjustables is updated 23 * Synchronizes scrollbar adjustments between a set of {@link Adjustable}s. 24 * Whenever the adjustment of one of the registered Adjustables is updated 25 25 * the adjustment of the other registered Adjustables is adjusted too. 26 26 * @since 6147 … … 101 101 /** 102 102 * Wires a {@link JCheckBox} to the adjustment synchronizer, in such a way that: 103 * < li>104 * < ol>state changes in the checkbox control whether the adjustable participates105 * in synchronized adjustment</ ol>106 * < ol>state changes in this {@link AdjustmentSynchronizer} are reflected in the107 * {@link JCheckBox}</ ol>108 * </ li>103 * <ol> 104 * <li>state changes in the checkbox control whether the adjustable participates 105 * in synchronized adjustment</li> 106 * <li>state changes in this {@link AdjustmentSynchronizer} are reflected in the 107 * {@link JCheckBox}</li> 108 * </ol> 109 109 * 110 110 * @param view the checkbox to control whether an adjustable participates in synchronized adjustment -
trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
r6666 r6830 39 39 */ 40 40 public final class GuiHelper { 41 41 42 42 private GuiHelper() { 43 43 // Hide default constructor for utils classes 44 44 } 45 45 46 46 /** 47 47 * disable / enable a component and all its child components … … 180 180 /** 181 181 * Return s new BasicStroke object with given thickness and style 182 * @param code = 3.5 - > thickness=3.5px; 3.5 10 5 ->thickness=3.5px, dashed: 10px filled + 5px empty182 * @param code = 3.5 -> thickness=3.5px; 3.5 10 5 -> thickness=3.5px, dashed: 10px filled + 5px empty 183 183 * @return stroke for drawing 184 184 */ -
trunk/src/org/openstreetmap/josm/gui/util/HighlightHelper.java
r6473 r6830 71 71 /** 72 72 * Highlight and remember given primitive 73 * @param p rims - primitivesto highlight/unhighlight73 * @param p - primitive to highlight/unhighlight 74 74 * @param flag - true to highlight 75 75 */ -
trunk/src/org/openstreetmap/josm/gui/widgets/DisableShortcutsOnFocusGainedTextField.java
r5927 r6830 56 56 * <code>null</code>. 57 57 * 58 * @param columns the number of columns to use to calculate 58 * @param columns the number of columns to use to calculate 59 59 * the preferred width; if columns is set to zero, the 60 60 * preferred width will be whatever naturally results from 61 61 * the component implementation 62 */ 62 */ 63 63 public DisableShortcutsOnFocusGainedTextField(int columns) { 64 64 super(columns); … … 71 71 * 72 72 * @param text the text to be displayed, or <code>null</code> 73 * @param columns the number of columns to use to calculate 73 * @param columns the number of columns to use to calculate 74 74 * the preferred width; if columns is set to zero, the 75 75 * preferred width will be whatever naturally results from … … 91 91 * <code>createDefaultModel</code> method 92 92 * @param text the initial string to display, or <code>null</code> 93 * @param columns the number of columns to use to calculate 94 * the preferred width >= 0; if <code>columns</code>93 * @param columns the number of columns to use to calculate 94 * the preferred width >= 0; if <code>columns</code> 95 95 * is set to zero, the preferred width will be whatever 96 96 * naturally results from the component implementation 97 * @exception IllegalArgumentException if <code>columns</code> <097 * @exception IllegalArgumentException if <code>columns</code> < 0 98 98 */ 99 99 public DisableShortcutsOnFocusGainedTextField(Document doc, String text, int columns) { … … 108 108 addFocusListener(this); 109 109 } 110 110 111 111 @Override 112 112 public void focusGained(FocusEvent e) { … … 120 120 restoreMenuActions(); 121 121 } 122 122 123 123 /** 124 124 * Disables all relevant menu actions. … … 149 149 } 150 150 } 151 151 152 152 /** 153 153 * Unregisters all relevant action shortcuts. … … 156 156 protected void unregisterActionShortcuts() { 157 157 unregisteredActionShortcuts.clear(); 158 // Unregister all actions without modifiers to avoid them to be triggered by typing in this text field 158 // Unregister all actions without modifiers to avoid them to be triggered by typing in this text field 159 159 for (Shortcut shortcut : Shortcut.listAll()) { 160 160 KeyStroke ks = shortcut.getKeyStroke(); … … 168 168 } 169 169 } 170 170 171 171 /** 172 172 * Returns true if the given shortcut has no modifier and is not an actions key. -
trunk/src/org/openstreetmap/josm/gui/widgets/JFileChooserManager.java
r5927 r6830 16 16 17 17 /** 18 * A chained utility class used to create and open {@link JFileChooser} dialogs.<br />19 * Use only this class if you need to control specifically your JFileChooser dialog.<br />18 * A chained utility class used to create and open {@link JFileChooser} dialogs.<br> 19 * Use only this class if you need to control specifically your JFileChooser dialog.<br> 20 20 * <p> 21 21 * A simpler usage is to call the {@link DiskAccessAction#createAndOpenFileChooser} methods. 22 * 22 * 23 23 * @since 5438 24 24 */ … … 27 27 private final String lastDirProperty; 28 28 private final String curDir; 29 29 30 30 private JFileChooser fc; 31 31 … … 38 38 this(open, null); 39 39 } 40 40 41 41 /** 42 42 * Creates a new {@code JFileChooserManager}. 43 43 * @param open If true, "Open File" dialogs will be created. If false, "Save File" dialogs will be created. 44 * @param lastDirProperty The name of the property used to get the last directory. This directory is used to initialize the JFileChooser. 44 * @param lastDirProperty The name of the property used to get the last directory. This directory is used to initialize the JFileChooser. 45 45 * Then, if the user effectively chooses a file or a directory, this property will be updated to the directory path. 46 46 * @see #createFileChooser … … 53 53 * Creates a new {@code JFileChooserManager}. 54 54 * @param open If true, "Open File" dialogs will be created. If false, "Save File" dialogs will be created. 55 * @param lastDirProperty The name of the property used to get the last directory. This directory is used to initialize the JFileChooser. 55 * @param lastDirProperty The name of the property used to get the last directory. This directory is used to initialize the JFileChooser. 56 56 * Then, if the user effectively chooses a file or a directory, this property will be updated to the directory path. 57 * @param defaultDir The default directory used to initialize the JFileChooser if the {@code lastDirProperty} property value is missing. 57 * @param defaultDir The default directory used to initialize the JFileChooser if the {@code lastDirProperty} property value is missing. 58 58 * @see #createFileChooser 59 59 */ … … 61 61 this.open = open; 62 62 this.lastDirProperty = lastDirProperty == null || lastDirProperty.isEmpty() ? "lastDirectory" : lastDirProperty; 63 this.curDir = Main.pref.get(this.lastDirProperty).isEmpty() ? 64 (defaultDir == null || defaultDir.isEmpty() ? "." : defaultDir) 63 this.curDir = Main.pref.get(this.lastDirProperty).isEmpty() ? 64 (defaultDir == null || defaultDir.isEmpty() ? "." : defaultDir) 65 65 : Main.pref.get(this.lastDirProperty); 66 66 } … … 68 68 /** 69 69 * Replies the {@code JFileChooser} that has been previously created. 70 * @return The {@code JFileChooser} that has been previously created, or {@code null} if it has not been created yet. 70 * @return The {@code JFileChooser} that has been previously created, or {@code null} if it has not been created yet. 71 71 * @see #createFileChooser 72 72 */ … … 90 90 return doCreateFileChooser(false, null, null, null, null, JFileChooser.FILES_ONLY, false); 91 91 } 92 92 93 93 /** 94 94 * Creates a new {@link JFileChooser} with given settings for a single {@code FileFilter}. 95 * 95 * 96 96 * @param multiple If true, makes the dialog allow multiple file selections 97 97 * @param title The string that goes in the dialog window's title bar 98 98 * @param filter The only file filter that will be proposed by the dialog 99 * @param selectionMode The selection mode that allows the user to:<br />100 * <li>just select files ({@code JFileChooser.FILES_ONLY})</li> 101 * <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li> 102 * <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li> 99 * @param selectionMode The selection mode that allows the user to:<br><ul> 100 * <li>just select files ({@code JFileChooser.FILES_ONLY})</li> 101 * <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li> 102 * <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul> 103 103 * @return this 104 104 * @see DiskAccessAction#createAndOpenFileChooser(boolean, boolean, String, FileFilter, int, String) … … 109 109 return this; 110 110 } 111 111 112 112 /** 113 113 * Creates a new {@link JFileChooser} with given settings for a collection of {@code FileFilter}s. 114 * 114 * 115 115 * @param multiple If true, makes the dialog allow multiple file selections 116 116 * @param title The string that goes in the dialog window's title bar 117 117 * @param filters The file filters that will be proposed by the dialog 118 118 * @param defaultFilter The file filter that will be selected by default 119 * @param selectionMode The selection mode that allows the user to:<br />120 * <li>just select files ({@code JFileChooser.FILES_ONLY})</li> 121 * <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li> 122 * <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li> 119 * @param selectionMode The selection mode that allows the user to:<br><ul> 120 * <li>just select files ({@code JFileChooser.FILES_ONLY})</li> 121 * <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li> 122 * <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul> 123 123 * @return this 124 124 * @see DiskAccessAction#createAndOpenFileChooser(boolean, boolean, String, Collection, FileFilter, int, String) … … 130 130 /** 131 131 * Creates a new {@link JFileChooser} with given settings for a file extension. 132 * 132 * 133 133 * @param multiple If true, makes the dialog allow multiple file selections 134 134 * @param title The string that goes in the dialog window's title bar 135 135 * @param extension The file extension that will be selected as the default file filter 136 * @param allTypes If true, all the files types known by JOSM will be proposed in the "file type" combobox. 136 * @param allTypes If true, all the files types known by JOSM will be proposed in the "file type" combobox. 137 137 * If false, only the file filters that include {@code extension} will be proposed 138 * @param selectionMode The selection mode that allows the user to:<br />139 * <li>just select files ({@code JFileChooser.FILES_ONLY})</li> 140 * <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li> 141 * <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li> 138 * @param selectionMode The selection mode that allows the user to:<br><ul> 139 * <li>just select files ({@code JFileChooser.FILES_ONLY})</li> 140 * <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li> 141 * <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul> 142 142 * @return this 143 143 * @see DiskAccessAction#createAndOpenFileChooser(boolean, boolean, String, FileFilter, int, String) … … 156 156 fc.setMultiSelectionEnabled(multiple); 157 157 fc.setAcceptAllFileFilterUsed(false); 158 158 159 159 if (filters != null) { 160 160 for (FileFilter filter : filters) { … … 174 174 /** 175 175 * Opens the {@code JFileChooser} that has been created. Nothing happens if it has not been created yet. 176 * @return the {@code JFileChooser} if the user effectively choses a file or directory. {@code null} if the user cancelled the dialog. 176 * @return the {@code JFileChooser} if the user effectively choses a file or directory. {@code null} if the user cancelled the dialog. 177 177 */ 178 178 public final JFileChooser openFileChooser() { … … 181 181 182 182 /** 183 * Opens the {@code JFileChooser} that has been created and waits for the user to choose a file/directory, or cancel the dialog.<br />184 * Nothing happens if the dialog has not been created yet.<br />183 * Opens the {@code JFileChooser} that has been created and waits for the user to choose a file/directory, or cancel the dialog.<br> 184 * Nothing happens if the dialog has not been created yet.<br> 185 185 * When the user choses a file or directory, the {@code lastDirProperty} is updated to the chosen directory path. 186 * 186 * 187 187 * @param parent The Component used as the parent of the JFileChooser. If null, uses {@code Main.parent}. 188 * @return the {@code JFileChooser} if the user effectively choses a file or directory. {@code null} if the user cancelled the dialog. 188 * @return the {@code JFileChooser} if the user effectively choses a file or directory. {@code null} if the user cancelled the dialog. 189 189 */ 190 190 public JFileChooser openFileChooser(Component parent) { … … 193 193 parent = Main.parent; 194 194 } 195 195 196 196 int answer = open ? fc.showOpenDialog(parent) : fc.showSaveDialog(parent); 197 197 if (answer != JFileChooser.APPROVE_OPTION) { -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java
r6316 r6830 24 24 25 25 /** 26 * Class overriding each {@link JComboBox} in JOSM to control consistently the number of displayed items at once.<br />26 * Class overriding each {@link JComboBox} in JOSM to control consistently the number of displayed items at once.<br> 27 27 * This is needed because of the default Java behaviour that may display the top-down list off the screen (see #7917). 28 * 28 * 29 29 * @since 5429 30 30 */ … … 32 32 33 33 /** 34 * The default prototype value used to compute the maximum number of elements to be displayed at once before 34 * The default prototype value used to compute the maximum number of elements to be displayed at once before 35 35 * displaying a scroll bar 36 36 */ 37 37 public static final String DEFAULT_PROTOTYPE_DISPLAY_VALUE = "Prototype display value"; 38 38 39 39 /** 40 40 * Creates a <code>JosmComboBox</code> with a default data model. … … 55 55 * Use <code>addItem</code> to add items. By default the first item 56 56 * in the data model becomes selected. 57 * 58 * @param prototypeDisplayValue the <code>Object</code> used to compute 59 * the maximum number of elements to be displayed at once before 57 * 58 * @param prototypeDisplayValue the <code>Object</code> used to compute 59 * the maximum number of elements to be displayed at once before 60 60 * displaying a scroll bar 61 61 * … … 75 75 * may impact how the insert, remove and add methods behave. 76 76 * 77 * @param aModel the <code>ComboBoxModel</code> that provides the 77 * @param aModel the <code>ComboBoxModel</code> that provides the 78 78 * displayed list of items 79 79 * @see DefaultComboBoxModel … … 88 88 } 89 89 90 /** 90 /** 91 91 * Creates a <code>JosmComboBox</code> that contains the elements 92 92 * in the specified array. By default the first item in the array … … 100 100 init(findPrototypeDisplayValue(Arrays.asList(items))); 101 101 } 102 102 103 103 /** 104 104 * Finds the prototype display value to use among the given possible candidates. … … 113 113 // Remind old prototype to restore it later 114 114 Object oldPrototype = getPrototypeDisplayValue(); 115 // Get internal JList to directly call the renderer 115 // Get internal JList to directly call the renderer 116 116 JList list = getList(); 117 117 try { … … 120 120 for (Object value : possibleValues) { 121 121 if (value != null) { 122 // With a "classic" renderer, we could call setPrototypeDisplayValue(value) + getPreferredSize() 122 // With a "classic" renderer, we could call setPrototypeDisplayValue(value) + getPreferredSize() 123 123 // but not with TaggingPreset custom renderer that return a dummy height if index is equal to -1 124 124 // So we explicitely call the renderer by simulating a correct index for the current value … … 143 143 return result; 144 144 } 145 145 146 146 protected final JList getList() { 147 147 for (int i = 0; i < getUI().getAccessibleChildrenCount(this); i++) { … … 153 153 return null; 154 154 } 155 155 156 156 protected void init(Object prototype) { 157 157 if (prototype != null) { 158 158 setPrototypeDisplayValue(prototype); 159 159 int screenHeight = Toolkit.getDefaultToolkit().getScreenSize().height; 160 // Compute maximum number of visible items based on the preferred size of the combo box. 160 // Compute maximum number of visible items based on the preferred size of the combo box. 161 161 // This assumes that items have the same height as the combo box, which is not granted by the look and feel 162 162 int maxsize = (screenHeight/getPreferredSize().height) / 2; … … 180 180 addPropertyChangeListener("editor", handler); 181 181 } 182 182 183 183 protected class ContextMenuHandler extends MouseAdapter implements PropertyChangeListener { 184 184 185 185 private JTextComponent component; 186 186 private PopupMenuLauncher launcher; 187 187 188 188 @Override public void propertyChange(PropertyChangeEvent evt) { 189 189 if (evt.getPropertyName().equals("editable")) { … … 200 200 } 201 201 } 202 202 203 203 private void enableMenu() { 204 204 if (launcher == null) { … … 223 223 } 224 224 } 225 225 226 226 @Override public void mousePressed(MouseEvent e) { processEvent(e); } 227 227 @Override public void mouseClicked(MouseEvent e) { processEvent(e); } 228 228 @Override public void mouseReleased(MouseEvent e) { processEvent(e); } 229 229 230 230 private void processEvent(MouseEvent e) { 231 231 if (launcher != null && !e.isPopupTrigger()) { … … 236 236 } 237 237 } 238 238 239 239 /** 240 240 * Reinitializes this {@link JosmComboBox} to the specified values. This may needed if a custom renderer is used. -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmPasswordField.java
r6617 r6830 14 14 15 15 /** 16 * A subclass of {@link JPasswordField} to implement a workaround to 16 * A subclass of {@link JPasswordField} to implement a workaround to 17 17 * <a href="https://bugs.openjdk.java.net/browse/JDK-6322854">JDK bug 6322854</a>. 18 18 * This class can be deleted after Oracle decides to fix this bug... 19 * 19 * 20 20 * @since 5752 21 21 * @see <a href="http://josm.openstreetmap.de/ticket/8404">http://josm.openstreetmap.de/ticket/8404</a> … … 35 35 /** 36 36 * Constructs a new <code>JosmPasswordField</code> that uses the 37 * given text storage model and the given number of columns. 37 * given text storage model and the given number of columns. 38 38 * This is the constructor through which the other constructors feed. 39 39 * The echo character is set to '*', but may be changed by the current … … 43 43 * @param doc the text storage to use 44 44 * @param txt the text to be displayed, <code>null</code> if none 45 * @param columns the number of columns to use to calculate 46 * the preferred width >= 0; if columns is set to zero, the45 * @param columns the number of columns to use to calculate 46 * the preferred width >= 0; if columns is set to zero, the 47 47 * preferred width will be whatever naturally results from 48 48 * the component implementation … … 58 58 * is set to <code>null</code>. 59 59 * 60 * @param columns the number of columns >= 061 */ 60 * @param columns the number of columns >= 0 61 */ 62 62 public JosmPasswordField(int columns) { 63 63 super(columns); … … 71 71 * 72 72 * @param text the text to be displayed, <code>null</code> if none 73 * @param columns the number of columns >= 073 * @param columns the number of columns >= 0 74 74 */ 75 75 public JosmPasswordField(String text, int columns) { … … 89 89 workaroundJdkBug6322854(this); 90 90 } 91 91 92 92 /** 93 93 * Implements a workaround to <a href="https://bugs.openjdk.java.net/browse/JDK-6322854">JDK bug 6322854</a>. … … 97 97 if (text != null) { 98 98 text.getActionMap().put("paste", new Action() { 99 99 100 100 private final Action pasteAction = TransferHandler.getPasteAction(); 101 101 102 102 @Override 103 103 public void actionPerformed(ActionEvent e) { … … 110 110 } 111 111 } 112 112 113 113 @Override 114 114 public void setEnabled(boolean b) { 115 115 pasteAction.setEnabled(b); 116 116 } 117 117 118 118 @Override 119 119 public void removePropertyChangeListener(PropertyChangeListener listener) { 120 120 pasteAction.removePropertyChangeListener(listener); 121 121 } 122 122 123 123 @Override 124 124 public void putValue(String key, Object value) { 125 125 pasteAction.putValue(key, value); 126 126 } 127 127 128 128 @Override 129 129 public boolean isEnabled() { 130 130 return pasteAction.isEnabled(); 131 131 } 132 132 133 133 @Override 134 134 public Object getValue(String key) { 135 135 return pasteAction.getValue(key); 136 136 } 137 137 138 138 @Override 139 139 public void addPropertyChangeListener(PropertyChangeListener listener) { -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextArea.java
r5887 r6830 44 44 * string is null. 45 45 * 46 * @param rows the number of rows >= 047 * @param columns the number of columns >= 046 * @param rows the number of rows >= 0 47 * @param columns the number of columns >= 0 48 48 * @exception IllegalArgumentException if the rows or columns 49 49 * arguments are negative. … … 58 58 * 59 59 * @param text the text to be displayed, or null 60 * @param rows the number of rows >= 061 * @param columns the number of columns >= 060 * @param rows the number of rows >= 0 61 * @param columns the number of columns >= 0 62 62 * @exception IllegalArgumentException if the rows or columns 63 63 * arguments are negative. … … 74 74 * @param doc the model to use, or create a default one if null 75 75 * @param text the text to be displayed, null if none 76 * @param rows the number of rows >= 077 * @param columns the number of columns >= 076 * @param rows the number of rows >= 0 77 * @param columns the number of columns >= 0 78 78 * @exception IllegalArgumentException if the rows or columns 79 79 * arguments are negative. -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java
r6070 r6830 22 22 * @param text the initial string to display, or <code>null</code> 23 23 * @param columns the number of columns to use to calculate 24 * the preferred width >= 0; if <code>columns</code>24 * the preferred width >= 0; if <code>columns</code> 25 25 * is set to zero, the preferred width will be whatever 26 26 * naturally results from the component implementation 27 * @exception IllegalArgumentException if <code>columns</code> <027 * @exception IllegalArgumentException if <code>columns</code> < 0 28 28 */ 29 29 public JosmTextField(Document doc, String text, int columns) { -
trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
r6783 r6830 163 163 * 164 164 * @param dividerSize the size of dividers (pixels) 165 * @throws IllegalArgumentException if dividerSize <0165 * @throws IllegalArgumentException if dividerSize < 0 166 166 * @see #getDividerSize 167 167 */ … … 1029 1029 /** 1030 1030 * Convenience method that returns the last child whose weight 1031 * is >0.0.1032 * 1033 * @return the last child whose weight is >0.0.1031 * is > 0.0. 1032 * 1033 * @return the last child whose weight is > 0.0. 1034 1034 * @see #getChildren 1035 1035 * @see Node#getWeight -
trunk/src/org/openstreetmap/josm/io/Capabilities.java
r6317 r6830 16 16 * 17 17 * Example capabilites document: 18 * 19 * <osm version="0.6" generator="OpenStreetMap server">20 * <api>21 * <version minimum="0.6" maximum="0.6"/>22 * <area maximum="0.25"/>23 * <tracepoints per_page="5000"/>24 * <waynodes maximum="2000"/>25 * <changesets maximum_elements="50000"/>26 * <timeout seconds="300"/>27 * </api>28 * <policy>29 * <imagery>30 * <blacklist regex=".*\.google\.com/.*"/>31 * <blacklist regex=".*209\.85\.2\d\d.*"/>32 * <blacklist regex=".*209\.85\.1[3-9]\d.*"/>33 * <blacklist regex=".*209\.85\.12[89].*"/>34 * </imagery>35 * </policy>36 * </osm>37 * 18 * <pre> 19 * <osm version="0.6" generator="OpenStreetMap server"> 20 * <api> 21 * <version minimum="0.6" maximum="0.6"/> 22 * <area maximum="0.25"/> 23 * <tracepoints per_page="5000"/> 24 * <waynodes maximum="2000"/> 25 * <changesets maximum_elements="50000"/> 26 * <timeout seconds="300"/> 27 * </api> 28 * <policy> 29 * <imagery> 30 * <blacklist regex=".*\.google\.com/.*"/> 31 * <blacklist regex=".*209\.85\.2\d\d.*"/> 32 * <blacklist regex=".*209\.85\.1[3-9]\d.*"/> 33 * <blacklist regex=".*209\.85\.12[89].*"/> 34 * </imagery> 35 * </policy> 36 * </osm> 37 * </pre> 38 38 * This class is used in conjunction with a very primitive parser 39 39 * and simply stuffs the each tag and its attributes into a hash -
trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
r6822 r6830 56 56 private Collection<Long> changesetIds = null; 57 57 58 public ChangesetQuery() {} 58 /** 59 * Constructs a new {@code ChangesetQuery}. 60 */ 61 public ChangesetQuery() { 62 63 } 59 64 60 65 /** 61 66 * Restricts the query to changesets owned by the user with id <code>uid</code>. 62 67 * 63 * @param uid the uid of the user. >0 expected.68 * @param uid the uid of the user. > 0 expected. 64 69 * @return the query object with the applied restriction 65 * @throws IllegalArgumentException thrown if uid <= 070 * @throws IllegalArgumentException thrown if uid <= 0 66 71 * @see #forUser(String) 67 72 */ … … 462 467 463 468 /** 464 * Parses the changeset query given as URL query parameters and replies a 465 * {@link ChangesetQuery} 469 * Parses the changeset query given as URL query parameters and replies a {@link ChangesetQuery}. 466 470 * 467 471 * <code>query</code> is the query part of a API url for querying changesets, … … 470 474 * Example for an query string:<br> 471 475 * <pre> 472 * uid=1234& open=true476 * uid=1234&open=true 473 477 * </pre> 474 478 * -
trunk/src/org/openstreetmap/josm/io/FileExporter.java
r6815 r6830 36 36 37 37 /** 38 * Returns the enabled state of this {@code FileExporter}. When enabled, it is listed and usable in "File- >Save" dialogs.38 * Returns the enabled state of this {@code FileExporter}. When enabled, it is listed and usable in "File->Save" dialogs. 39 39 * @return true if this {@code FileExporter} is enabled 40 40 * @since 5459 … … 45 45 46 46 /** 47 * Sets the enabled state of the {@code FileExporter}. When enabled, it is listed and usable in "File- >Save" dialogs.47 * Sets the enabled state of the {@code FileExporter}. When enabled, it is listed and usable in "File->Save" dialogs. 48 48 * @param enabled true to enable this {@code FileExporter}, false to disable it 49 49 * @since 5459 -
trunk/src/org/openstreetmap/josm/io/FileImporter.java
r6643 r6830 81 81 } 82 82 } 83 83 84 84 private static void displayError(File f, Exception e) { 85 85 Main.error(e); … … 91 91 ); 92 92 } 93 93 94 94 private static void displayCancel(final Throwable t) { 95 95 GuiHelper.runInEDTAndWait(new Runnable() { … … 103 103 }); 104 104 } 105 105 106 106 public boolean importDataHandleExceptions(List<File> files, ProgressMonitor progressMonitor) { 107 107 try { … … 157 157 158 158 /** 159 * Returns the enabled state of this {@code FileImporter}. When enabled, it is listed and usable in "File- >Open" dialog.159 * Returns the enabled state of this {@code FileImporter}. When enabled, it is listed and usable in "File->Open" dialog. 160 160 * @return true if this {@code FileImporter} is enabled 161 161 * @since 5459 … … 166 166 167 167 /** 168 * Sets the enabled state of the {@code FileImporter}. When enabled, it is listed and usable in "File- >Open" dialog.168 * Sets the enabled state of the {@code FileImporter}. When enabled, it is listed and usable in "File->Open" dialog. 169 169 * @param enabled true to enable this {@code FileImporter}, false to disable it 170 170 * @since 5459 -
trunk/src/org/openstreetmap/josm/io/GpxReader.java
r6650 r6830 397 397 398 398 /** 399 * convert url/urlname to link element (GPX 1.0 - >GPX 1.1).399 * convert url/urlname to link element (GPX 1.0 -> GPX 1.1). 400 400 */ 401 401 private void convertUrlToLink(Map<String, Object> attr) { -
trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
r6792 r6830 104 104 * later we fetched as part of a Multi Get request. 105 105 * 106 * Ignore the id if it id <= 0.106 * Ignore the id if it id <= 0. 107 107 * 108 108 * @param ds the dataset (must not be null) -
trunk/src/org/openstreetmap/josm/io/OsmApi.java
r6822 r6830 46 46 47 47 /** 48 * Class that encapsulates the communications with the <a href="http://wiki.openstreetmap.org/wiki/API_v0.6">OSM API</a>.<br /><br/>48 * Class that encapsulates the communications with the <a href="http://wiki.openstreetmap.org/wiki/API_v0.6">OSM API</a>.<br><br> 49 49 * 50 * All interaction with the server-side OSM API should go through this class.<br /><br/>50 * All interaction with the server-side OSM API should go through this class.<br><br> 51 51 * 52 52 * It is conceivable to extract this into an interface later and create various … … 426 426 /** 427 427 * Updates a changeset with the keys in <code>changesetUpdate</code>. The changeset must not 428 * be null and id >0 must be true.428 * be null and id > 0 must be true. 429 429 * 430 430 * @param changeset the changeset to update. Must not be null. … … 433 433 * @throws OsmTransferException if something goes wrong. 434 434 * @throws IllegalArgumentException if changeset is null 435 * @throws IllegalArgumentException if changeset.getId() <= 0435 * @throws IllegalArgumentException if changeset.getId() <= 0 436 436 * 437 437 */ … … 466 466 467 467 /** 468 * Closes a changeset on the server. Sets changeset.setOpen(false) if this operation 469 * succeeds. 470 * 471 * @param changeset the changeset to be closed. Must not be null. changeset.getId() > 0 required. 468 * Closes a changeset on the server. Sets changeset.setOpen(false) if this operation succeeds. 469 * 470 * @param changeset the changeset to be closed. Must not be null. changeset.getId() > 0 required. 472 471 * @param monitor the progress monitor. If null, uses {@link NullProgressMonitor#INSTANCE} 473 472 * 474 473 * @throws OsmTransferException if something goes wrong. 475 474 * @throws IllegalArgumentException thrown if changeset is null 476 * @throws IllegalArgumentException thrown if changeset.getId() <= 0475 * @throws IllegalArgumentException thrown if changeset.getId() <= 0 477 476 */ 478 477 public void closeChangeset(Changeset changeset, ProgressMonitor monitor) throws OsmTransferException { … … 767 766 /** 768 767 * Sets the changesets to which further data uploads are directed. The changeset 769 * can be null. If it isn't null it must have been created, i.e. id >0 is required. Furthermore,768 * can be null. If it isn't null it must have been created, i.e. id > 0 is required. Furthermore, 770 769 * it must be open. 771 770 * 772 771 * @param changeset the changeset 773 * @throws IllegalArgumentException thrown if changeset.getId() <= 0772 * @throws IllegalArgumentException thrown if changeset.getId() <= 0 774 773 * @throws IllegalArgumentException thrown if !changeset.isOpen() 775 774 */ -
trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java
r6822 r6830 47 47 * constructor 48 48 * 49 * @param primitive the primitive to be read. Must not be null. primitive.id >0 expected49 * @param primitive the primitive to be read. Must not be null. primitive.id > 0 expected 50 50 * 51 51 * @exception IllegalArgumentException thrown if primitive is null 52 * @exception IllegalArgumentException thrown if primitive.id <= 052 * @exception IllegalArgumentException thrown if primitive.id <= 0 53 53 */ 54 54 public OsmServerBackreferenceReader(OsmPrimitive primitive) throws IllegalArgumentException { … … 62 62 * constructor 63 63 * 64 * @param id the id of the primitive. >0 expected64 * @param id the id of the primitive. > 0 expected 65 65 * @param type the type of the primitive. Must not be null. 66 66 * 67 * @exception IllegalArgumentException thrown if id <= 067 * @exception IllegalArgumentException thrown if id <= 0 68 68 * @exception IllegalArgumentException thrown if type is null 69 69 * … … 97 97 * @param readFull true, if referers should be read fully (i.e. including their immediate children) 98 98 * 99 * @exception IllegalArgumentException thrown if id <= 099 * @exception IllegalArgumentException thrown if id <= 0 100 100 * @exception IllegalArgumentException thrown if type is null 101 101 * -
trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java
r6822 r6830 76 76 * Reads the changeset with id <code>id</code> from the server 77 77 * 78 * @param id the changeset id. id >0 required.78 * @param id the changeset id. id > 0 required. 79 79 * @param monitor the progress monitor. Set to {@link NullProgressMonitor#INSTANCE} if null 80 80 * @return the changeset read 81 81 * @throws OsmTransferException thrown if something goes wrong 82 * @throws IllegalArgumentException if id <= 082 * @throws IllegalArgumentException if id <= 0 83 83 */ 84 84 public Changeset readChangeset(long id, ProgressMonitor monitor) throws OsmTransferException { … … 112 112 * Reads the changeset with id <code>id</code> from the server 113 113 * 114 * @param ids the list of ids. Ignored if null. Only load changesets for ids >0.114 * @param ids the list of ids. Ignored if null. Only load changesets for ids > 0. 115 115 * @param monitor the progress monitor. Set to {@link NullProgressMonitor#INSTANCE} if null 116 116 * @return the changeset read 117 117 * @throws OsmTransferException thrown if something goes wrong 118 * @throws IllegalArgumentException if id <= 0118 * @throws IllegalArgumentException if id <= 0 119 119 */ 120 120 public List<Changeset> readChangesets(Collection<Integer> ids, ProgressMonitor monitor) throws OsmTransferException { … … 160 160 * Downloads the content of a changeset 161 161 * 162 * @param id the changeset id. >0 required.162 * @param id the changeset id. > 0 required. 163 163 * @param monitor the progress monitor. {@link NullProgressMonitor#INSTANCE} assumed if null. 164 164 * @return the changeset content 165 * @throws IllegalArgumentException thrown if id <= 0165 * @throws IllegalArgumentException thrown if id <= 0 166 166 * @throws OsmTransferException thrown if something went wrong 167 167 */ -
trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java
r6822 r6830 37 37 * Creates a new server object reader for a given id and a primitive type. 38 38 * 39 * @param id the object id. >0 required.39 * @param id the object id. > 0 required. 40 40 * @param type the type. Must not be null. 41 41 * @param full true, if a full download is requested (i.e. a download including 42 42 * immediate children); false, otherwise 43 * @throws IllegalArgumentException thrown if id <= 043 * @throws IllegalArgumentException thrown if id <= 0 44 44 * @throws IllegalArgumentException thrown if type is null 45 45 */ … … 51 51 * Creates a new server object reader for a given id and a primitive type. 52 52 * 53 * @param id the object id. >0 required.53 * @param id the object id. > 0 required. 54 54 * @param type the type. Must not be null. 55 55 * @param version the specific version number, if required; -1, otherwise 56 * @throws IllegalArgumentException thrown if id <= 056 * @throws IllegalArgumentException thrown if id <= 0 57 57 * @throws IllegalArgumentException thrown if type is null 58 58 */ … … 73 73 * Creates a new server object reader for an object with the given <code>id</code> 74 74 * 75 * @param id the object id. Must not be null. Unique id >0 required.75 * @param id the object id. Must not be null. Unique id > 0 required. 76 76 * @param full true, if a full download is requested (i.e. a download including 77 77 * immediate children); false, otherwise 78 78 * @throws IllegalArgumentException thrown if id is null 79 * @throws IllegalArgumentException thrown if id.getUniqueId() <= 079 * @throws IllegalArgumentException thrown if id.getUniqueId() <= 0 80 80 */ 81 81 public OsmServerObjectReader(PrimitiveId id, boolean full) { … … 86 86 * Creates a new server object reader for an object with the given <code>id</code> 87 87 * 88 * @param id the object id. Must not be null. Unique id >0 required.88 * @param id the object id. Must not be null. Unique id > 0 required. 89 89 * @param version the specific version number, if required; -1, otherwise 90 90 * @throws IllegalArgumentException thrown if id is null 91 * @throws IllegalArgumentException thrown if id.getUniqueId() <= 091 * @throws IllegalArgumentException thrown if id.getUniqueId() <= 0 92 92 */ 93 93 public OsmServerObjectReader(PrimitiveId id, int version) { -
trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
r6380 r6830 143 143 * @param primitives the collection of primitives to upload 144 144 * @param progressMonitor the progress monitor 145 * @param chunkSize the size of the individual upload chunks. >0 required.146 * @throws IllegalArgumentException thrown if chunkSize <= 0145 * @param chunkSize the size of the individual upload chunks. > 0 required. 146 * @throws IllegalArgumentException thrown if chunkSize <= 0 147 147 * @throws OsmTransferException thrown if an exception occurs 148 148 */ -
trunk/src/org/openstreetmap/josm/io/XmlWriter.java
r6380 r6830 41 41 * @param keepApos true if apostrophe sign should stay as it is (in order to work around 42 42 * a Java bug that renders 43 * new JLabel(" <html>'</html>")43 * new JLabel("<html>&apos;</html>") 44 44 * literally as 6 character string, see #7558) 45 45 */ -
trunk/src/org/openstreetmap/josm/io/auth/CredentialsAgent.java
r5836 r6830 3 3 4 4 import java.awt.Component; 5 import java.net.Authenticator.RequestorType; 5 6 import java.net.PasswordAuthentication; 6 import java.net.Authenticator.RequestorType;7 7 8 8 import org.openstreetmap.josm.data.oauth.OAuthToken; … … 39 39 * @param host the hostname for these credentials 40 40 * @param credentials the credentials 41 * @throws Credentials ManagerException thrown if a problem occurs in a implementation of this interface41 * @throws CredentialsAgentException thrown if a problem occurs in a implementation of this interface 42 42 */ 43 43 void store(RequestorType requestorType, String host, PasswordAuthentication credentials) throws CredentialsAgentException; -
trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
r6792 r6830 331 331 } 332 332 333 334 335 333 /** 336 334 * Try to find a plugin after some criterias. Extract the plugin-information 337 335 * from the plugin and return it. The plugin is searched in the following way: 338 * 339 *<li>first look after an MANIFEST.MF in the package org.openstreetmap.josm.plugins. <plugin name>336 *<ol> 337 *<li>first look after an MANIFEST.MF in the package org.openstreetmap.josm.plugins.<plugin name> 340 338 * (After removing all fancy characters from the plugin name). 341 * If found, the plugin is loaded using the bootstrap classloader. 339 * If found, the plugin is loaded using the bootstrap classloader.</li> 342 340 *<li>If not found, look for a jar file in the user specific plugin directory 343 * (~/.josm/plugins/ <plugin name>.jar)344 *<li>If not found and the environment variable JOSM_RESOURCES + "/plugins/" exist, look there. 345 *<li>Try for the java property josm.resources + "/plugins/" (set via java -Djosm.plugins.path=...) 341 * (~/.josm/plugins/<plugin name>.jar)</li> 342 *<li>If not found and the environment variable JOSM_RESOURCES + "/plugins/" exist, look there.</li> 343 *<li>Try for the java property josm.resources + "/plugins/" (set via java -Djosm.plugins.path=...)</li> 346 344 *<li>If the environment variable ALLUSERSPROFILE and APPDATA exist, look in 347 * ALLUSERSPROFILE/ <the last stuff from APPDATA>/JOSM/plugins.345 * ALLUSERSPROFILE/<the last stuff from APPDATA>/JOSM/plugins. 348 346 * (*sic* There is no easy way under Windows to get the All User's application 349 * directory) 347 * directory)</li> 350 348 *<li>Finally, look in some typical unix paths:<ul> 351 * <li>/usr/local/share/josm/plugins/ 352 * <li>/usr/local/lib/josm/plugins/ 353 * <li>/usr/share/josm/plugins/ 354 * <li>/usr/lib/josm/plugins/ 355 * 349 * <li>/usr/local/share/josm/plugins/</li> 350 * <li>/usr/local/lib/josm/plugins/</li> 351 * <li>/usr/share/josm/plugins/</li> 352 * <li>/usr/lib/josm/plugins/</li></ul></li> 353 *</ol> 356 354 * If a plugin class or jar file is found earlier in the list but seem not to 357 355 * be working, an PluginException is thrown rather than continuing the search. -
trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
r6380 r6830 19 19 * Creates and controls a separate audio player thread. 20 20 * 21 * @author David Earl <david@frankieandshadow.com>21 * @author David Earl <david@frankieandshadow.com> 22 22 * @since 547 23 23 */ … … 124 124 * @param url The resource to play, which must be a WAV file or stream 125 125 * @param seconds The number of seconds into the audio to start playing 126 * @param speed Rate at which audio playes (1.0 = real time, >1 is faster)126 * @param speed Rate at which audio playes (1.0 = real time, > 1 is faster) 127 127 * @throws Exception audio fault exception, e.g. can't open stream, unhandleable audio format 128 128 */ -
trunk/src/org/openstreetmap/josm/tools/AudioUtil.java
r6380 r6830 14 14 * Utils functions for audio. 15 15 * 16 * @author David Earl <david@frankieandshadow.com>16 * @author David Earl <david@frankieandshadow.com> 17 17 * @since 1462 18 18 */ … … 22 22 // Hide default constructor for utils classes 23 23 } 24 24 25 25 /** 26 26 * Returns calibrated length of recording in seconds. -
trunk/src/org/openstreetmap/josm/tools/ColorHelper.java
r6740 r6830 5 5 6 6 /** 7 * Helper to convert from color to html string and back7 * Helper to convert from color to HTML string and back. 8 8 */ 9 9 public final class ColorHelper { … … 12 12 // Hide default constructor for utils classes 13 13 } 14 14 15 15 /** 16 16 * Returns the {@code Color} for the given HTML code. … … 55 55 * Returns the HTML color code (6 or 8 digit). 56 56 * @param col The color to convert 57 * @param withAlpha if {@code true} and alpha value <255, return 8-digit color code, else always 6-digit57 * @param withAlpha if {@code true} and alpha value < 255, return 8-digit color code, else always 6-digit 58 58 * @return the HTML color code (6 or 8 digit) 59 59 * @since 6655 -
trunk/src/org/openstreetmap/josm/tools/Diff.java
r6296 r6830 57 57 and <code>hashcode</code> methods for the objects compared. 58 58 <p> 59 The basic algorithm is described in: < /br>59 The basic algorithm is described in: <br> 60 60 "An O(ND) Difference Algorithm and its Variations", Eugene Myers, 61 61 Algorithmica Vol. 1 No. 2, 1986, p 251. … … 589 589 } 590 590 591 @Override 591 592 public String toString() { 592 593 String s = String.format("%d -%d +%d %d",line0,deleted,inserted,line1); … … 830 831 realindexes = new int[buffered_lines]; 831 832 } 832 833 833 834 FileData(Object[] data, Map<Object,Integer> h) { 834 835 this(data.length); -
trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
r6643 r6830 38 38 @SuppressWarnings("CallToThreadDumpStack") 39 39 public final class ExceptionUtil { 40 40 41 41 private ExceptionUtil() { 42 42 // Hide default constructor for utils classes … … 697 697 698 698 /** 699 * Replaces some HTML reserved characters ( <, > and &) by their equivalent entity (<, > and &);699 * Replaces some HTML reserved characters (<, > and &) by their equivalent entity (&lt;, &gt; and &amp;); 700 700 * @param s The unescaped string 701 701 * @return The escaped string -
trunk/src/org/openstreetmap/josm/tools/ExifReader.java
r6643 r6830 31 31 // Hide default constructor for utils classes 32 32 } 33 33 34 34 /** 35 35 * Returns the date/time from the given JPEG file. … … 70 70 * Returns the image orientation of the given JPEG file. 71 71 * @param filename The JPEG file to read 72 * @return The image orientation as an {@code int}. Default value is 1. Possible values are listed in EXIF spec as follows:<br> 73 * < ul>1. The 0th row is at the visual top of the image, and the 0th column is the visual left-hand side.</ul>74 * < ul>2. The 0th row is at the visual top of the image, and the 0th column is the visual right-hand side.</ul>75 * < ul>3. The 0th row is at the visual bottom of the image, and the 0th column is the visual right-hand side.</ul>76 * < ul>4. The 0th row is at the visual bottom of the image, and the 0th column is the visual left-hand side.</ul>77 * < ul>5. The 0th row is the visual left-hand side of the image, and the 0th column is the visual top.</ul>78 * < ul>6. The 0th row is the visual right-hand side of the image, and the 0th column is the visual top.</ul>79 * < ul>7. The 0th row is the visual right-hand side of the image, and the 0th column is the visual bottom.</ul>80 * < ul>8. The 0th row is the visual left-hand side of the image, and the 0th column is the visual bottom.</ul>72 * @return The image orientation as an {@code int}. Default value is 1. Possible values are listed in EXIF spec as follows:<br><ol> 73 * <li>The 0th row is at the visual top of the image, and the 0th column is the visual left-hand side.</li> 74 * <li>The 0th row is at the visual top of the image, and the 0th column is the visual right-hand side.</li> 75 * <li>The 0th row is at the visual bottom of the image, and the 0th column is the visual right-hand side.</li> 76 * <li>The 0th row is at the visual bottom of the image, and the 0th column is the visual left-hand side.</li> 77 * <li>The 0th row is the visual left-hand side of the image, and the 0th column is the visual top.</li> 78 * <li>The 0th row is the visual right-hand side of the image, and the 0th column is the visual top.</li> 79 * <li>The 0th row is the visual right-hand side of the image, and the 0th column is the visual bottom.</li> 80 * <li>The 0th row is the visual left-hand side of the image, and the 0th column is the visual bottom.</li></ol> 81 81 * @see <a href="http://www.impulseadventure.com/photo/exif-orientation.html">http://www.impulseadventure.com/photo/exif-orientation.html</a> 82 82 * @see <a href="http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto">http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto</a> … … 133 133 return null; 134 134 } 135 135 136 136 /** 137 137 * Returns the direction of the given JPEG file. … … 152 152 return null; 153 153 } 154 154 155 155 /** 156 156 * Returns the direction of the given EXIF GPS directory. … … 176 176 double min = components[1].doubleValue(); 177 177 double sec = components[2].doubleValue(); 178 178 179 179 if (Double.isNaN(deg) && Double.isNaN(min) && Double.isNaN(sec)) 180 180 throw new IllegalArgumentException(); 181 181 182 182 value = (Double.isNaN(deg) ? 0 : deg + (Double.isNaN(min) ? 0 : (min / 60)) + (Double.isNaN(sec) ? 0 : (sec / 3600))); 183 183 184 184 if (dirGps.getString(gpsTagRef).charAt(0) == cRef) { 185 185 value = -value; -
trunk/src/org/openstreetmap/josm/tools/Geometry.java
r6607 r6830 37 37 */ 38 38 public final class Geometry { 39 39 40 40 private Geometry() { 41 41 // Hide default constructor for utils classes 42 42 } 43 43 44 44 public enum PolygonIntersection {FIRST_INSIDE_SECOND, SECOND_INSIDE_FIRST, OUTSIDE, CROSSING} 45 45 … … 771 771 * Tests if the polygon formed by {@code nodes} is inside the multipolygon {@code multiPolygon}. The nullable argument 772 772 * {@code isOuterWayAMatch} allows to decide if the immediate {@code outer} way of the multipolygon is a match. 773 * <p />773 * <p> 774 774 * If {@code nodes} contains exactly one element, then it is checked whether that one node is inside the multipolygon. 775 775 */ -
trunk/src/org/openstreetmap/josm/tools/I18n.java
r6796 r6830 32 32 */ 33 33 public final class I18n { 34 34 35 35 private I18n() { 36 36 // Hide default constructor for utils classes 37 37 } 38 38 39 39 private enum PluralMode { MODE_NOTONE, MODE_NONE, MODE_GREATERONE, 40 40 MODE_CS/*, MODE_AR*/, MODE_PL/*, MODE_RO*/, MODE_RU, MODE_SK/*, MODE_SL*/} … … 135 135 * These strings are collected by a script that runs on the source code files. 136 136 * After translation, the localizations are distributed with the main program. 137 * <br />137 * <br> 138 138 * For example, {@code tr("JOSM''s default value is ''{0}''.", val)}. 139 * <br />139 * <br> 140 140 * Use {@link #trn} for distinguishing singular from plural text, i.e., 141 141 * do not use {@code tr(size == 1 ? "singular" : "plural")} nor … … 207 207 * Translates some text for the current locale and distinguishes between 208 208 * {@code singularText} and {@code pluralText} depending on {@code n}. 209 * <br />209 * <br> 210 210 * For instance, {@code trn("There was an error!", "There were errors!", i)} or 211 211 * {@code trn("Found {0} error in {1}!", "Found {0} errors in {1}!", i, Integer.toString(i), url)}. -
trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java
r6643 r6830 85 85 * Openstreetmap.org changed it's URL scheme in August 2013, which breaks the URL parsing. 86 86 * The following function, called by the old parse function if necessary, provides parsing new URLs 87 * the new URLs follow the scheme http://www.openstreetmap.org/#map=18/51.71873/8.76164& layers=CN87 * the new URLs follow the scheme http://www.openstreetmap.org/#map=18/51.71873/8.76164&layers=CN 88 88 * @param url string for parsing 89 89 * @return Bounds if hashurl, {@code null} otherwise … … 294 294 * @param zoom zoom depth of display 295 295 * @return link to display that area in OSM map 296 * 296 * 297 297 * @since 6453 298 298 */ -
trunk/src/org/openstreetmap/josm/tools/PlatformHook.java
r6443 r6830 11 11 */ 12 12 public interface PlatformHook { 13 13 14 14 /** 15 15 * The preStartupHook will be called extremly early. It is … … 47 47 * shortuts from this hook, but only "systemCuts"! 48 48 * 49 * BTW: SystemCuts should be named "system: <whatever>",49 * BTW: SystemCuts should be named "system:<whatever>", 50 50 * and it'd be best if sou'd recycle the names already used 51 51 * by the Windows and OSX hooks. Especially the later has … … 69 69 * Another reason not to use the implementation in the *nix 70 70 * hook are LAFs that don't understand HTML, such as the OSX LAFs. 71 * 72 * @param name Tooltip text to display 71 * 72 * @param name Tooltip text to display 73 73 * @param sc Shortcut associated (to display accelerator between parenthesis) 74 74 * @return Full tooltip text (name + accelerator) -
trunk/src/org/openstreetmap/josm/tools/TextTagParser.java
r6362 r6830 28 28 */ 29 29 public final class TextTagParser { 30 30 31 31 // properties need JOSM restart to apply, modified rarely enough 32 32 protected static final int MAX_KEY_LENGTH = Main.pref.getInteger("tags.paste.max-key-length", 50); … … 34 34 protected static final String KEY_PATTERN = Main.pref.get("tags.paste.tag-pattern", "[0-9a-zA-Z:_]*"); 35 35 protected static final int MAX_VALUE_LENGTH = 255; 36 36 37 37 private TextTagParser() { 38 38 // Hide default constructor for utils classes 39 39 } 40 40 41 41 public static class TextAnalyzer { 42 42 boolean quotesStarted = false; … … 52 52 n = data.length(); 53 53 } 54 54 55 55 /** 56 56 * Read tags from "Free format" … … 72 72 return tags; 73 73 } 74 74 75 75 private String parseString(String stopChars) { 76 76 char[] stop = stopChars.toCharArray(); … … 95 95 pos++; 96 96 break; 97 } else if (!quotesStarted && (Arrays.binarySearch(stop, c)>=0)) { 97 } else if (!quotesStarted && (Arrays.binarySearch(stop, c)>=0)) { 98 98 // stop-symbol found 99 99 pos++; … … 110 110 return res.trim(); 111 111 } 112 112 113 113 private void skipSign() { 114 114 char c; … … 155 155 156 156 /** 157 * Try to find tag-value pairs in given text 157 * Try to find tag-value pairs in given text 158 158 * @param text - text in which tags are looked for 159 159 * @param splitRegex - text is splitted into parts with this delimiter … … 175 175 v = unescape(v); 176 176 if (k==null || v==null) return null; 177 } 177 } 178 178 tags.put(k,v); 179 179 } else { … … 185 185 } else { 186 186 return null; 187 } 188 } 189 187 } 188 } 189 190 190 public static Map<String,String> getValidatedTagsFromText(String buf) { 191 191 Map<String,String> tags = readTagsFromText(buf); 192 192 return validateTags(tags) ? tags : null; 193 193 } 194 194 195 195 /** 196 196 * Apply different methods to extract tag-value pairs from arbitrary text … … 198 198 * @return null if no format is suitable 199 199 */ 200 200 201 201 public static Map<String,String> readTagsFromText(String buf) { 202 202 Map<String,String> tags; 203 203 204 204 // Format 205 205 // tag1\tval1\ntag2\tval2\n … … 209 209 210 210 // Format 211 // a=b \n c=d \n "a b"=hello 211 // a=b \n c=d \n "a b"=hello 212 212 // SORRY: "a=b" = c is not supported fror now, only first = will be considered 213 213 // a = "b=c" is OK … … 216 216 // try format t1=v1\n t2=v2\n ... 217 217 if (tags!=null) return tags; 218 218 219 219 // JSON-format 220 220 String bufJson = buf.trim(); 221 221 // trim { }, if there are any 222 222 if (bufJson.startsWith("{") && bufJson.endsWith("}") ) bufJson = bufJson.substring(1,bufJson.length()-1); 223 tags = readTagsByRegexp(bufJson, "[\\s]*,[\\s]*", 223 tags = readTagsByRegexp(bufJson, "[\\s]*,[\\s]*", 224 224 "[\\s]*(\\\".*?[^\\\\]\\\")"+"[\\s]*:[\\s]*"+"(\\\".*?[^\\\\]\\\")[\\s]*", true); 225 225 if (tags!=null) return tags; 226 226 227 // Free format 227 // Free format 228 228 // a 1 "b" 2 c=3 d 4 e "5" 229 229 TextAnalyzer parser = new TextAnalyzer(buf); … … 234 234 /** 235 235 * Check tags for correctness and display warnings if needed 236 * @param tags - map key- >value to check236 * @param tags - map key->value to check 237 237 * @return true if the tags should be pasted 238 238 */ … … 265 265 return true; 266 266 } 267 267 268 268 private static int warning(String text, String data, String code) { 269 269 ExtendedDialog ed = new ExtendedDialog( … … 304 304 tr("Warning"), 305 305 new String[]{tr("Ok"), tr("Clear buffer")}); 306 306 307 307 ed.setButtonIcons(new String[]{"ok.png", "dialogs/delete.png"}); 308 308 309 309 ed.setContent(p); 310 310 ed.setDefaultButton(1); -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r6823 r6830 261 261 262 262 /** 263 * convert float range 0 <= x <= 1 to integer range 0..255263 * convert float range 0 <= x <= 1 to integer range 0..255 264 264 * when dealing with colors and color alpha value 265 265 * @return null if val is null, the corresponding int if val is in the … … 275 275 276 276 /** 277 * convert integer range 0..255 to float range 0 <= x <= 1277 * convert integer range 0..255 to float range 0 <= x <= 1 278 278 * when dealing with colors and color alpha value 279 279 */ … … 317 317 318 318 /** 319 * Simple file copy function that will overwrite the target file.<br />319 * Simple file copy function that will overwrite the target file.<br> 320 320 * Taken from <a href="http://www.rgagnon.com/javadetails/java-0064.html">this article</a> (CC-NC-BY-SA) 321 321 * @param in The source file … … 526 526 * Topological sort. 527 527 * 528 * @param dependencies contains mappings (key - >value). In the final list of sorted objects, the key will come528 * @param dependencies contains mappings (key -> value). In the final list of sorted objects, the key will come 529 529 * after the value. (In other words, the key depends on the value(s).) 530 530 * There must not be cyclic dependencies. … … 836 836 * @param elapsedTime The duration in milliseconds 837 837 * @return A human readable string for the given duration 838 * @throws IllegalArgumentException if elapsedTime is <0838 * @throws IllegalArgumentException if elapsedTime is < 0 839 839 * @since 6354 840 840 */ … … 867 867 /** 868 868 * Returns a human readable representation of a list of positions. 869 * <p />869 * <p> 870 870 * For instance, {@code [1,5,2,6,7} yields "1-2,5-7 871 871 * @param positionList a list of positions
Note:
See TracChangeset
for help on using the changeset viewer.