- Timestamp:
- 2014-03-21T17:31:18+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 44 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r6901 r6920 112 112 * @since 6897 (was public from 6143 to 6896) 113 113 */ 114 private static final String JOSM_WEBSITE = "http ://josm.openstreetmap.de";114 private static final String JOSM_WEBSITE = "https://josm.openstreetmap.de"; 115 115 116 116 /** … … 118 118 * @since 6897 (was public from 6453 to 6896) 119 119 */ 120 private static final String OSM_WEBSITE = "http ://www.openstreetmap.org";120 private static final String OSM_WEBSITE = "https://www.openstreetmap.org"; 121 121 122 122 /** … … 987 987 */ 988 988 private static DownloadParamType paramType(String s) { 989 if(s.startsWith("http:") ) return DownloadParamType.httpUrl;989 if(s.startsWith("http:") || s.startsWith("https:")) return DownloadParamType.httpUrl; 990 990 if(s.startsWith("file:")) return DownloadParamType.fileUrl; 991 991 String coorPattern = "\\s*[+-]?[0-9]+(\\.[0-9]+)?\\s*"; … … 1491 1491 */ 1492 1492 public static String getJOSMWebsite() { 1493 if (Main.pref != null)1493 if (Main.pref != null) 1494 1494 return Main.pref.get("josm.url", JOSM_WEBSITE); 1495 1495 return JOSM_WEBSITE; … … 1502 1502 */ 1503 1503 public static String getXMLBase() { 1504 // Always return HTTP (issues reported with HTTPS) 1504 1505 return "http://josm.openstreetmap.de"; 1505 1506 } … … 1511 1512 */ 1512 1513 public static String getOSMWebsite() { 1513 if (Main.pref != null)1514 if (Main.pref != null) 1514 1515 return Main.pref.get("osm.url", OSM_WEBSITE); 1515 1516 return OSM_WEBSITE; -
trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java
r6897 r6920 35 35 36 36 /** 37 * replies the base URL for browsing information about about a primitive37 * Replies the base URL for browsing information about about a primitive. 38 38 * 39 * @return the base URL, i.e. http ://api.openstreetmap.org/browse39 * @return the base URL, i.e. https://www.openstreetmap.org 40 40 */ 41 41 public static String getBaseBrowseUrl() { 42 42 String baseUrl = Main.pref.get("osm-server.url", OsmApi.DEFAULT_API_URL); 43 43 Pattern pattern = Pattern.compile("/api/?$"); 44 String ret = pattern.matcher(baseUrl).replaceAll("/browse");44 String ret = pattern.matcher(baseUrl).replaceAll(""); 45 45 if (ret.equals(baseUrl)) { 46 46 Main.warn(tr("Unexpected format of API base URL. Redirection to info or history page for OSM object will probably fail. API base URL is: ''{0}''",baseUrl)); 47 47 } 48 if (ret.startsWith("http://api.openstreetmap.org/")) { 49 ret = ret.substring("http://api.openstreetmap.org/".length()); 50 ret = Main.getOSMWebsite() + "/" + ret; 48 for (String prefix : new String[]{"http://api.openstreetmap.org/", "https://api.openstreetmap.org/"}) { 49 if (ret.startsWith(prefix)) { 50 ret = Main.getOSMWebsite() + "/" + ret.substring(prefix.length()); 51 break; 52 } 51 53 } 52 54 return ret; … … 54 56 55 57 /** 56 * replies the base URL for browsing information about a user58 * Replies the base URL for browsing information about a user. 57 59 * 58 * @return the base URL, i.e. http ://www.openstreetmap.org/user60 * @return the base URL, i.e. https://www.openstreetmap.org/user 59 61 */ 60 62 public static String getBaseUserUrl() { … … 65 67 Main.warn(tr("Unexpected format of API base URL. Redirection to user page for OSM user will probably fail. API base URL is: ''{0}''",baseUrl)); 66 68 } 67 if (ret.startsWith("http://api.openstreetmap.org/")) { 68 ret = ret.substring("http://api.openstreetmap.org/".length()); 69 ret = Main.getOSMWebsite() + "/" + ret; 69 for (String prefix : new String[]{"http://api.openstreetmap.org/", "https://api.openstreetmap.org/"}) { 70 if (ret.startsWith(prefix)) { 71 ret = Main.getOSMWebsite() + "/" + ret.substring(prefix.length()); 72 break; 73 } 70 74 } 71 75 return ret; -
trunk/src/org/openstreetmap/josm/actions/CopyAction.java
r6451 r6920 24 24 */ 25 25 public final class CopyAction extends JosmAction { 26 26 27 27 // regular expression that matches text clipboard contents after copying 28 28 public static final String CLIPBOARD_REGEXP = "((node|way|relation)\\s\\d+,)*(node|way|relation)\\s\\d+"; … … 36 36 Shortcut.registerShortcut("system:copy", tr("Edit: {0}", tr("Copy")), KeyEvent.VK_C, Shortcut.CTRL), true); 37 37 putValue("help", ht("/Action/Copy")); 38 // CUA shortcut for copy (http ://en.wikipedia.org/wiki/IBM_Common_User_Access#Description)38 // CUA shortcut for copy (https://en.wikipedia.org/wiki/IBM_Common_User_Access#Description) 39 39 Main.registerActionShortcut(this, 40 40 Shortcut.registerShortcut("system:copy:cua", tr("Edit: {0}", tr("Copy")), KeyEvent.VK_INSERT, Shortcut.CTRL)); -
trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
r6889 r6920 295 295 String line; 296 296 while ((line = reader.readLine()) != null) { 297 Matcher m = Pattern.compile(".*(http ://.*)").matcher(line);297 Matcher m = Pattern.compile(".*(https?://.*)").matcher(line); 298 298 if (m.matches()) { 299 299 String url = m.group(1); -
trunk/src/org/openstreetmap/josm/actions/PasteAction.java
r6451 r6920 43 43 Shortcut.registerShortcut("system:paste", tr("Edit: {0}", tr("Paste")), KeyEvent.VK_V, Shortcut.CTRL), true); 44 44 putValue("help", ht("/Action/Paste")); 45 // CUA shortcut for paste (http ://en.wikipedia.org/wiki/IBM_Common_User_Access#Description)45 // CUA shortcut for paste (https://en.wikipedia.org/wiki/IBM_Common_User_Access#Description) 46 46 Main.registerActionShortcut(this, 47 47 Shortcut.registerShortcut("system:paste:cua", tr("Edit: {0}", tr("Paste")), KeyEvent.VK_INSERT, Shortcut.SHIFT)); -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java
r6803 r6920 37 37 private DownloadTask downloadTask; 38 38 39 private static final String PATTERN_TRACE_ID = "http ://.*(osm|openstreetmap).org/trace/\\p{Digit}+/data";40 41 private static final String PATTERN_TRACKPOINTS_BBOX = "http ://.*/api/0.6/trackpoints\\?bbox=.*,.*,.*,.*";39 private static final String PATTERN_TRACE_ID = "https?://.*(osm|openstreetmap).org/trace/\\p{Digit}+/data"; 40 41 private static final String PATTERN_TRACKPOINTS_BBOX = "https?://.*/api/0.6/trackpoints\\?bbox=.*,.*,.*,.*"; 42 42 43 43 private static final String PATTERN_EXTERNAL_GPX_SCRIPT = "https?://.*exportgpx.*"; -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmChangeTask.java
r6248 r6920 44 44 @Override 45 45 public String[] getPatterns() { 46 return new String[]{"http ://.*/api/0.6/changeset/\\p{Digit}+/download", // OSM API 0.6 changesets46 return new String[]{"https?://.*/api/0.6/changeset/\\p{Digit}+/download", // OSM API 0.6 changesets 47 47 "https?://.*/.*\\.osc" // Remote .osc files 48 48 }; … … 53 53 return tr("Download OSM Change"); 54 54 } 55 55 56 56 /* (non-Javadoc) 57 57 * @see org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask#download(boolean, org.openstreetmap.josm.data.Bounds, org.openstreetmap.josm.gui.progress.ProgressMonitor) … … 125 125 } 126 126 } 127 127 128 128 /** 129 129 * Loads history and updates incomplete primitives. -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
r6830 r6920 37 37 public class DownloadOsmTask extends AbstractDownloadTask { 38 38 39 protected static final String PATTERN_OSM_API_URL = "http ://.*/api/0.6/(map|nodes?|ways?|relations?|\\*).*";39 protected static final String PATTERN_OSM_API_URL = "https?://.*/api/0.6/(map|nodes?|ways?|relations?|\\*).*"; 40 40 protected static final String PATTERN_OVERPASS_API_URL = "http://.*/interpreter\\?data=.*"; 41 41 protected static final String PATTERN_OVERPASS_API_XAPI_URL = "http://.*/xapi(\\?.*\\[@meta\\]|_meta\\?).*"; -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmUrlTask.java
r6244 r6920 2 2 package org.openstreetmap.josm.actions.downloadtasks; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 4 6 import java.util.concurrent.Future; 5 6 import static org.openstreetmap.josm.tools.I18n.tr;7 7 8 8 import org.openstreetmap.josm.gui.progress.ProgressMonitor; … … 19 19 return download(newLayer, OsmUrlToBounds.parse(url), null); 20 20 } 21 21 22 22 @Override 23 23 public String[] getPatterns() { 24 24 return new String[]{ 25 "http ://www\\.(osm|openstreetmap)\\.org/\\?lat=.*&lon=.*",26 "http ://www\\.(osm|openstreetmap)\\.org/#map=\\p{Digit}+/.*/.*"};25 "https?://www\\.(osm|openstreetmap)\\.org/\\?lat=.*&lon=.*", 26 "https?://www\\.(osm|openstreetmap)\\.org/#map=\\p{Digit}+/.*/.*"}; 27 27 } 28 28 -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r6889 r6920 306 306 307 307 // events for crossplatform key holding processing 308 // thanks to http://www.arco.in-berlin.de/keyevent.html309 308 private final Set<Integer> set = new TreeSet<Integer>(); 310 309 private KeyEvent releaseEvent; -
trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
r6906 r6920 284 284 285 285 /** 286 * Returns the heading, in radians, that you have to use to get from 287 * this lat/lon to another. 286 * Returns the heading, in radians, that you have to use to get from this lat/lon to another. 288 287 * 289 288 * (I don't know the original source of this formula, but see 290 * http://math.stackexchange.com/questions/720/how-to-calculate-a-heading-on-the-earths-surface289 * <a href="https://math.stackexchange.com/questions/720/how-to-calculate-a-heading-on-the-earths-surface">this question</a> 291 290 * for some hints how it is derived.) 292 291 * -
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r6886 r6920 801 801 if (result == null) { 802 802 Main.warn(tr("JOSM expected to find primitive [{0} {1}] in dataset but it is not there. Please report this " 803 + "at http://josm.openstreetmap.de/. This is not a critical error, it should be safe to continue in your work.",804 primitiveId.getType(), Long.toString(primitiveId.getUniqueId()) ));803 + "at {2}. This is not a critical error, it should be safe to continue in your work.", 804 primitiveId.getType(), Long.toString(primitiveId.getUniqueId()), Main.getJOSMWebsite())); 805 805 Main.error(new Exception()); 806 806 } -
trunk/src/org/openstreetmap/josm/data/osm/visitor/PrimitiveVisitor.java
r6069 r6920 7 7 8 8 /** 9 * OSM primitives interfaces visitor, following conventional <a href="http ://en.wikipedia.org/wiki/Visitor_pattern">visitor design pattern</a>.9 * OSM primitives interfaces visitor, following conventional <a href="https://en.wikipedia.org/wiki/Visitor_pattern">visitor design pattern</a>. 10 10 * @since 4100 11 11 */ -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java
r3857 r6920 2 2 package org.openstreetmap.josm.data.osm.visitor.paint; 3 3 4 import static java.awt.geom.Rectangle2D.OUT_BOTTOM; 4 5 import static java.awt.geom.Rectangle2D.OUT_LEFT; 5 6 import static java.awt.geom.Rectangle2D.OUT_RIGHT; 6 7 import static java.awt.geom.Rectangle2D.OUT_TOP; 7 import static java.awt.geom.Rectangle2D.OUT_BOTTOM; 8 8 9 import java.awt.Point; 9 10 import java.awt.Rectangle; … … 42 43 * @return end point of the clipped line 43 44 */ 44 public Point getP2() 45 { 45 public Point getP2() { 46 46 return p2; 47 47 } 48 48 49 49 /** 50 * see http://en.wikipedia.org/wiki/Cohen-Sutherland 50 * Cohen–Sutherland algorithm. 51 * See <a href="https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm">Wikipedia article</a> 51 52 * @return true, if line is visible in the given clip region 52 53 */ 53 private boolean cohenSutherland( long x1, long y1, long x2, long y2, long xmin, long ymin, long xmax, long ymax) 54 { 54 private boolean cohenSutherland( long x1, long y1, long x2, long y2, long xmin, long ymin, long xmax, long ymax) { 55 55 int outcode0, outcode1, outcodeOut; 56 56 boolean accept = false; -
trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java
r6830 r6920 1 1 /* 2 2 * Import from fr.geo.convert package, a geographic coordinates converter. 3 * (http ://www.i3s.unice.fr/~johan/gps/)3 * (https://www.i3s.unice.fr/~johan/gps/) 4 4 * License: GPL. For details, see LICENSE file. 5 5 * Copyright (C) 2002 Johan Montagnat (johan@creatis.insa-lyon.fr) -
trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java
r6135 r6920 21 21 22 22 /** 23 * Projection for the SwissGrid CH1903 / L03, see http://en.wikipedia.org/wiki/Swiss_coordinate_system.23 * Projection for the SwissGrid CH1903 / L03, see <a href="https://en.wikipedia.org/wiki/Swiss_coordinate_system">Wikipedia article</a>.<br> 24 24 * 25 * Calculations were originally based on simple formula from26 * http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.12749.DownloadFile.tmp/ch1903wgs84en.pdf25 * Calculations were originally based on <a href="http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.12749.DownloadFile.tmp/ch1903wgs84en.pdf"> 26 * simple formula</a>.<br> 27 27 * 28 * August 2010 update to this formula (rigorous formulas)29 * http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.97912.DownloadFile.tmp/swissprojectionen.pdf28 * August 2010 update to <a href="http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.97912.DownloadFile.tmp/swissprojectionen.pdf"> 29 * this formula (rigorous formulas)</a>. 30 30 */ 31 31 public class SwissObliqueMercator implements Proj { … … 109 109 return new double[] { phi, lambda }; 110 110 } 111 112 111 } -
trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java
r6104 r6920 7 7 * the License. You may obtain a copy of the License at 8 8 * 9 * http ://www.apache.org/licenses/LICENSE-2.09 * https://www.apache.org/licenses/LICENSE-2.0 10 10 * 11 11 * Unless required by applicable law or agreed to in writing, software … … 26 26 * Provides HTML and XML entity utilities. 27 27 * </p> 28 * @see <a href="http://hotwired.lycos.com/webmonkey/reference/special_characters/">ISO Entities</a>29 28 * @see <a href="http://www.w3.org/TR/REC-html32#latin1">HTML 3.2 Character Entities for ISO Latin-1</a> 30 29 * @see <a href="http://www.w3.org/TR/REC-html40/sgml/entities.html">HTML 4.0 Character entity references</a> -
trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
r6643 r6920 279 279 String msg; 280 280 String url = e.getAccessedUrl(); 281 Pattern p = Pattern.compile("http ://.*/api/0.6/(node|way|relation)/(\\d+)/(\\d+)");281 Pattern p = Pattern.compile("https?://.*/api/0.6/(node|way|relation)/(\\d+)/(\\d+)"); 282 282 283 283 // Special case for individual access to redacted versions -
trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
r6889 r6920 39 39 // Hide default constructor for utils classes 40 40 } 41 41 42 42 public static class ButtonSpec { 43 43 public final String text; … … 190 190 * 191 191 * <code>helpTopic</code> is the trailing part of a JOSM online help URL, i.e. the part after the leading 192 * <code>http ://josm.openstreetmap.de/wiki/Help</code>. It should start with a leading '/' and it192 * <code>https://josm.openstreetmap.de/wiki/Help</code>. It should start with a leading '/' and it 193 193 * may include an anchor after a '#'. 194 194 * -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r6866 r6920 143 143 /** 144 144 * JOSM command line options. 145 * @see <a href="http ://josm.openstreetmap.de/wiki/Help/CommandLineOptions">Help/CommandLineOptions</a>145 * @see <a href="https://josm.openstreetmap.de/wiki/Help/CommandLineOptions">Help/CommandLineOptions</a> 146 146 * @since 5279 147 147 */ … … 304 304 305 305 Thread.setDefaultUncaughtExceptionHandler(new BugReportExceptionHandler()); 306 // http ://stackoverflow.com/q/75218/2257172306 // https://stackoverflow.com/q/75218/2257172 307 307 // To be replaced with official API when switching to Java 7: https://bugs.openjdk.java.net/browse/JDK-4714232 308 308 Preferences.updateSystemProperty("sun.awt.exception.handler", BugReportExceptionHandler.class.getName()); -
trunk/src/org/openstreetmap/josm/gui/MenuScroller.java
r6296 r6920 1 1 /** 2 2 * MenuScroller.java 1.5.0 04/02/12 3 * License: use / modify without restrictions (see http ://tips4java.wordpress.com/about/)3 * License: use / modify without restrictions (see https://tips4java.wordpress.com/about/) 4 4 */ 5 5 package org.openstreetmap.josm.gui; … … 34 34 * at a time is 15, and the default scrolling interval is 125 milliseconds. 35 35 * <P> 36 * @author Darryl, http ://tips4java.wordpress.com/2009/02/01/menu-scroller/36 * @author Darryl, https://tips4java.wordpress.com/2009/02/01/menu-scroller/ 37 37 */ 38 38 public class MenuScroller { -
trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
r6426 r6920 627 627 StringBuilder text = new StringBuilder("<table cellpadding=3>"); 628 628 text.append(tableRow(tr("Title:"), s.getDisplayString())); 629 if (s.url.startsWith("http://") ) {629 if (s.url.startsWith("http://") || s.url.startsWith("https://")) { 630 630 text.append(tableRow(tr("URL:"), s.url)); 631 631 } else if (s.url.startsWith("resource://")) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java
r6897 r6920 66 66 67 67 protected JPanel buildHelpPanel() { 68 String apiUrl = OsmApi.getOsmApi().getBaseUrl(); 68 69 HtmlPanel pnl = new HtmlPanel(); 69 70 pnl.setText( … … 72 73 + "<p><strong>" + tr("Examples") + "</strong></p>" 73 74 + "<ul>" 74 + "<li><a href=\""+Main.getOSMWebsite()+"/ browse/changesets?open=true\">"+Main.getOSMWebsite()+"/browse/changesets?open=true</a></li>"75 + "<li><a href=\" http://api.openstreetmap.org/api/0.6/changesets?open=true\">http://api.openstreetmap.org/api/0.6/changesets?open=true</a></li>"75 + "<li><a href=\""+Main.getOSMWebsite()+"/history?open=true\">"+Main.getOSMWebsite()+"/history?open=true</a></li>" 76 + "<li><a href=\""+apiUrl+"/changesets?open=true\">"+apiUrl+"/changesets?open=true</a></li>" 76 77 + "</ul>" 77 78 + tr("Note that changeset queries are currently always submitted to ''{0}'', regardless of the " 78 + "host, port and path of the URL entered below.", OsmApi.getOsmApi().getBaseUrl())79 + "host, port and path of the URL entered below.", apiUrl) 79 80 + "</body></html>" 80 81 ); -
trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
r6890 r6920 71 71 private DownloadDialog parent; 72 72 private static final Server[] SERVERS = new Server[] { 73 new Server("Nominatim","http ://nominatim.openstreetmap.org/search?format=xml&q=",tr("Class Type"),tr("Bounds"))73 new Server("Nominatim","https://nominatim.openstreetmap.org/search?format=xml&q=",tr("Class Type"),tr("Bounds")) 74 74 }; 75 75 private final JosmComboBox server = new JosmComboBox(SERVERS); -
trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java
r6552 r6920 25 25 26 26 /** 27 * constructor27 * Constructs a new {@code HelpContentReader}. 28 28 * 29 * @param baseUrl the base url of the JOSM help wiki, i.e. http ://josm.openstreetmap.org29 * @param baseUrl the base url of the JOSM help wiki, i.e. https://josm.openstreetmap.org 30 30 */ 31 31 public HelpContentReader(String baseUrl) { -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEntry.java
r6830 r6920 143 143 144 144 public boolean isLocal() { 145 if (url.startsWith("http://") || url.startsWith(" resource://"))145 if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("resource://")) 146 146 return false; 147 147 return true; -
trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java
r6883 r6920 50 50 LanguageComboBoxModel model = new LanguageComboBoxModel(); 51 51 // Selecting the language BEFORE the JComboBox listens to model changes speed up initialization by ~35ms (see #7386) 52 // See http ://stackoverflow.com/questions/3194958/fast-replacement-for-jcombobox-basiccomboboxui52 // See https://stackoverflow.com/questions/3194958/fast-replacement-for-jcombobox-basiccomboboxui 53 53 model.selectLanguage(Main.pref.get("language")); 54 54 langCombo = new JosmComboBox(model); -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java
r6889 r6920 90 90 * 91 91 * See also USGS Bulletin 1532 92 * (http:// egsc.usgs.gov/isb/pubs/factsheets/fs08799.html)92 * (http://pubs.usgs.gov/bul/1532/report.pdf) 93 93 * initially EPSG used 3785 but that has been superseded by 3857, 94 * see http ://www.epsg-registry.org/94 * see https://www.epsg-registry.org/ 95 95 */ 96 96 mercator = registerProjectionChoice(tr("Mercator"), "core:mercator", 3857); … … 114 114 */ 115 115 registerProjectionChoice(tr("Belgian Lambert 1972"), "core:belgianLambert1972", 31370); // BE 116 116 117 /** 117 118 * Belgian Lambert 2008 projection. … … 125 126 126 127 /** 127 * SwissGrid CH1903 / L03, see http ://de.wikipedia.org/wiki/Swiss_Grid.128 * SwissGrid CH1903 / L03, see https://en.wikipedia.org/wiki/Swiss_coordinate_system. 128 129 * 129 130 * Actually, what we have here, is CH1903+ (EPSG:2056), but without … … 141 142 * 142 143 * Thanks to Johan Montagnat and its geoconv java converter application 143 * (http ://www.i3s.unice.fr/~johan/gps/ , published under GPL license)144 * (https://www.i3s.unice.fr/~johan/gps/ , published under GPL license) 144 145 * from which some code and constants have been reused here. 145 146 */ … … 152 153 * (RGF93 is the French geodetic system similar to WGS84 but not mathematically equal) 153 154 * 154 * Source: http:// professionnels.ign.fr/DISPLAY/000/526/700/5267002/transformation.pdf155 * Source: http://geodesie.ign.fr/contenu/fichiers/Changement_systeme_geodesique.pdf 155 156 * @author Pieren 156 157 */ 157 158 registerProjectionChoice(lambert = new LambertProjectionChoice()); // FR 159 158 160 /** 159 161 * Lambert 93 projection. 160 162 * 161 163 * As specified by the IGN in this document 162 * http:// professionnels.ign.fr/DISPLAY/000/526/702/5267026/NTG_87.pdf164 * http://geodesie.ign.fr/contenu/fichiers/documentation/rgf93/Lambert-93.pdf 163 165 * @author Don-vip 164 166 */ 165 167 registerProjectionChoice(tr("Lambert 93 (France)"), "core:lambert93", 2154); // FR 168 166 169 /** 167 170 * Lambert Conic Conform 9 Zones projection. 168 171 * 169 172 * As specified by the IGN in this document 170 * http:// professionnels.ign.fr/DISPLAY/000/526/700/5267002/transformation.pdf173 * http://geodesie.ign.fr/contenu/fichiers/documentation/rgf93/cc9zones.pdf 171 174 * @author Pieren 172 175 */ 173 registerProjectionChoice(lambert_cc9 = new LambertCC9ZonesProjectionChoice()); // FR 176 registerProjectionChoice(lambert_cc9 = new LambertCC9ZonesProjectionChoice()); // FR 177 174 178 /** 175 179 * French departements in the Caribbean Sea and Indian Ocean. … … 177 181 * Using the UTM transvers Mercator projection and specific geodesic settings. 178 182 */ 179 registerProjectionChoice(utm_france_dom = new UTMFranceDOMProjectionChoice()); 183 registerProjectionChoice(utm_france_dom = new UTMFranceDOMProjectionChoice()); // FR 180 184 181 185 /** -
trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java
r6643 r6920 29 29 * 30 30 * Note: it fetches a list of changesets instead of the much smaller capabilities because - strangely enough - 31 * an OSM server "http ://x.y.y/api/0.6" not only responds to "http://x.y.y/api/0.6/capabilities" but also32 * to "http ://x.y.y/api/0/capabilities" or "http://x.y.y/a/capabilities" with valid capabilities. If we get31 * an OSM server "https://x.y.y/api/0.6" not only responds to "https://x.y.y/api/0.6/capabilities" but also 32 * to "https://x.y.y/api/0/capabilities" or "https://x.y.y/a/capabilities" with valid capabilities. If we get 33 33 * valid capabilities with an URL we therefore can't be sure that the base URL is valid API URL. 34 34 * -
trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
r6830 r6920 235 235 List<String> fonts = Arrays.asList(GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames()); 236 236 // Helvetica is the preferred choice but is not available by default on Windows 237 // (http ://www.microsoft.com/typography/fonts/product.aspx?pid=161)237 // (https://www.microsoft.com/typography/fonts/product.aspx?pid=161) 238 238 if (fonts.contains("Helvetica")) { 239 239 return new Font("Helvetica", Font.BOLD, 20); -
trunk/src/org/openstreetmap/josm/gui/util/StayOpenCheckBoxMenuItem.java
r5094 r6920 14 14 * An extension of JCheckBoxMenuItem that doesn't close the menu when selected. 15 15 * 16 * @author Darryl http ://tips4java.wordpress.com/2010/09/12/keeping-menus-open/16 * @author Darryl https://tips4java.wordpress.com/2010/09/12/keeping-menus-open/ 17 17 */ 18 18 public class StayOpenCheckBoxMenuItem extends JCheckBoxMenuItem { -
trunk/src/org/openstreetmap/josm/gui/util/StayOpenMenuItem.java
r5094 r6920 13 13 * An extension of JMenuItem that doesn't close the menu when selected. 14 14 * 15 * @author Darryl http ://tips4java.wordpress.com/2010/09/12/keeping-menus-open/15 * @author Darryl https://tips4java.wordpress.com/2010/09/12/keeping-menus-open/ 16 16 */ 17 17 public class StayOpenMenuItem extends JMenuItem { -
trunk/src/org/openstreetmap/josm/gui/util/StayOpenRadioButtonMenuItem.java
r6361 r6920 13 13 * An extension of JRadioButtonMenuItem that doesn't close the menu when selected. 14 14 * 15 * @author Darryl http ://tips4java.wordpress.com/2010/09/12/keeping-menus-open/15 * @author Darryl https://tips4java.wordpress.com/2010/09/12/keeping-menus-open/ 16 16 */ 17 17 public class StayOpenRadioButtonMenuItem extends JRadioButtonMenuItem { -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmPasswordField.java
r6830 r6920 19 19 * 20 20 * @since 5752 21 * @see <a href="http ://josm.openstreetmap.de/ticket/8404">http://josm.openstreetmap.de/ticket/8404</a>22 * @see <a href="http ://hg.netbeans.org/main/rev/33cb2e81b640">http://hg.netbeans.org/main/rev/33cb2e81b640</a>21 * @see <a href="https://josm.openstreetmap.de/ticket/8404">https://josm.openstreetmap.de/ticket/8404</a> 22 * @see <a href="https://hg.netbeans.org/main/rev/33cb2e81b640">https://hg.netbeans.org/main/rev/33cb2e81b640</a> 23 23 */ 24 24 public class JosmPasswordField extends JPasswordField { -
trunk/src/org/openstreetmap/josm/io/GpxExporter.java
r6889 r6920 211 211 String sCopyright = (String) data.attr.get(META_COPYRIGHT_LICENSE); 212 212 if (sCopyright == null) { 213 sCopyright = Main.pref.get("lastCopyright", "http ://creativecommons.org/licenses/by-sa/2.5");213 sCopyright = Main.pref.get("lastCopyright", "https://creativecommons.org/licenses/by-sa/2.5"); 214 214 } 215 215 copyright.setText(sCopyright); … … 303 303 return; 304 304 final String[] urls = { 305 "http ://creativecommons.org/licenses/by-sa/2.5",305 "https://creativecommons.org/licenses/by-sa/2.5", 306 306 "http://opendatacommons.org/licenses/odbl/1.0", 307 307 "public domain", 308 "http ://www.gnu.org/copyleft/lesser.html",308 "https://www.gnu.org/copyleft/lesser.html", 309 309 "http://www.opensource.org/licenses/bsd-license.php"}; 310 310 String license = ""; -
trunk/src/org/openstreetmap/josm/io/OsmApi.java
r6906 r6920 74 74 * @since 5422 75 75 */ 76 public static final String DEFAULT_API_URL = "http ://api.openstreetmap.org/api";76 public static final String DEFAULT_API_URL = "https://api.openstreetmap.org/api"; 77 77 78 78 // The collection of instantiated OSM APIs -
trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java
r6643 r6920 110 110 // E.g. [1] lists lat as first coordinate axis and lot as second, so it is switched for EPSG:4326. 111 111 // For most other EPSG code there seems to be no difference. 112 // [1] http ://www.epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:crs:EPSG::4326&reportDetail=short&style=urn:uuid:report-style:default-with-code&style_name=OGP%20Default%20With%20Code&title=EPSG:4326112 // [1] https://www.epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:crs:EPSG::4326&reportDetail=short&style=urn:uuid:report-style:default-with-code&style_name=OGP%20Default%20With%20Code&title=EPSG:4326 113 113 boolean switchLatLon = false; 114 114 if (baseURL.toLowerCase().contains("crs=epsg:4326")) { -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java
r6902 r6920 35 35 return new String[]{"url"}; 36 36 } 37 37 38 38 @Override 39 39 public String[] getOptionalParams() { … … 112 112 this.args = args; 113 113 } 114 114 115 115 @Override 116 116 protected void validateRequest() throws RequestHandlerBadRequestException { … … 137 137 } 138 138 })); 139 return new String[] { "/imagery?title=osm&type=tms&url=http ://tile.openstreetmap.org/%7Bzoom%7D/%7Bx%7D/%7By%7D.png",139 return new String[] { "/imagery?title=osm&type=tms&url=https://a.tile.openstreetmap.org/%7Bzoom%7D/%7Bx%7D/%7By%7D.png", 140 140 "/imagery?title=landsat&type=wms&url=http://irs.gis-lab.info/?layers=landsat&SRS=%7Bproj%7D&WIDTH=%7Bwidth%7D&HEIGHT=%7Bheight%7D&BBOX=%7Bbbox%7D", 141 141 "/imagery?title=...&type={"+types+"}&url=....[&cookies=...][&min_zoom=...][&max_zoom=...]"}; -
trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java
r6643 r6920 18 18 * A parser for the plugin list provided by a JOSM Plugin Download Site. 19 19 * 20 * See <a href="http ://josm.openstreetmap.de/plugin">http://josm.openstreetmap.de/plugin</a>20 * See <a href="https://josm.openstreetmap.de/plugin">https://josm.openstreetmap.de/plugin</a> 21 21 * for a sample of the document. The format is a custom format, kind of mix of CSV and RFC822 style 22 22 * name/value-pairs. … … 49 49 * Parses a plugin information document and replies a list of plugin information objects. 50 50 * 51 * See <a href="http ://josm.openstreetmap.de/plugin">http://josm.openstreetmap.de/plugin</a>51 * See <a href="https://josm.openstreetmap.de/plugin">https://josm.openstreetmap.de/plugin</a> 52 52 * for a sample of the document. The format is a custom format, kind of mix of CSV and RFC822 style 53 53 * name/value-pairs. -
trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java
r6906 r6920 32 32 * <li>.jar.new files, assuming that these are downloaded but not yet installed plugins</li> 33 33 * <li>cached lists of available plugins, downloaded for instance from 34 * <a href="http ://josm.openstreetmap.de/plugins">http://josm.openstreetmap.de/plugins</a></li>34 * <a href="https://josm.openstreetmap.de/plugin">https://josm.openstreetmap.de/plugin</a></li> 35 35 * </ul> 36 36 * -
trunk/src/org/openstreetmap/josm/tools/Geometry.java
r6869 r6920 695 695 BigDecimal east = BigDecimal.ZERO; 696 696 697 // See http ://en.wikipedia.org/w/index.php?title=Centroid&oldid=294224857#Centroid_of_polygon for the equation used here697 // See https://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon for the equation used here 698 698 for (int i = 0; i < nodes.size(); i++) { 699 699 EastNorth n0 = nodes.get(i).getEastNorth(); -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r6889 r6920 417 417 ImageType type = name.toLowerCase().endsWith(".svg") ? ImageType.SVG : ImageType.OTHER; 418 418 419 if (name.startsWith("http://") ) {419 if (name.startsWith("http://") || name.startsWith("https://")) { 420 420 String url = name; 421 421 ImageResource ir = cache.get(url); -
trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java
r6897 r6920 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 https://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 -
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r6850 r6920 72 72 Shortcut.registerSystemShortcut("system:resetX", tr("reserved"), KeyEvent.VK_BACK_SPACE, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); 73 73 } 74 74 75 75 /** 76 76 * This should work for all platforms. Yeah, should. … … 122 122 } 123 123 } 124 124 125 125 /** 126 126 * Get the package name including detailed version. … … 137 137 } 138 138 } 139 139 140 140 /** 141 141 * Get the Java package name including detailed version. … … 166 166 return null; 167 167 } 168 168 169 169 /** 170 170 * Get the Web Start package name including detailed version. 171 171 * 172 * Debian and Ubuntu OpenJDK packages are shipped with icedtea-web package, 172 * Debian and Ubuntu OpenJDK packages are shipped with icedtea-web package, 173 173 * but its version does not match main java package version. 174 * 174 * 175 175 * Only Debian based distributions are covered at the moment. 176 176 * This can be extended to other distributions if needed. 177 * 177 * 178 178 * Simply return {@code null} if there's no separate package for Java WebStart. 179 179 * … … 323 323 } 324 324 } 325 325 326 326 protected void askUpdateJava(String version) { 327 327 try { … … 339 339 "<b>"+tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", "7")+"</b><br><br>"+ 340 340 tr("Would you like to update now ?")); 341 341 342 342 if (ed.showDialog().getValue() == 1) { 343 openUrl("http ://www.java.com/download");343 openUrl("https://www.java.com/download"); 344 344 } 345 345 }
Note:
See TracChangeset
for help on using the changeset viewer.