Changeset 4282 in josm for trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/WebMarker.java
- Timestamp:
- 2011-08-07T09:08:29+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/WebMarker.java
r2017 r4282 21 21 public class WebMarker extends ButtonMarker { 22 22 23 public URL webUrl;23 public final URL webUrl; 24 24 25 public static WebMarker create (LatLon ll, String url, MarkerLayer parentLayer, double time, double offset) { 26 try { 27 return new WebMarker(ll, new URL(url), parentLayer, time, offset); 28 } catch (Exception ex) { 29 return null; 30 } 31 } 32 33 private WebMarker(LatLon ll, URL webUrl, MarkerLayer parentLayer, double time, double offset) { 25 public WebMarker(LatLon ll, URL webUrl, MarkerLayer parentLayer, double time, double offset) { 34 26 super(ll, "web.png", parentLayer, time, offset); 35 27 this.webUrl = webUrl; … … 41 33 JOptionPane.showMessageDialog(Main.parent, 42 34 "<html><b>" + 43 tr("There was an error while trying to display the URL for this marker") +44 "</b><br>" + tr("(URL was: ") + webUrl.toString() + ")" + "<br>" + error,45 tr("Error displaying URL"), JOptionPane.ERROR_MESSAGE);35 tr("There was an error while trying to display the URL for this marker") + 36 "</b><br>" + tr("(URL was: ") + webUrl.toString() + ")" + "<br>" + error, 37 tr("Error displaying URL"), JOptionPane.ERROR_MESSAGE); 46 38 } 47 39 }
Note:
See TracChangeset
for help on using the changeset viewer.