Ignore:
Timestamp:
2011-08-07T09:08:29+02:00 (13 years ago)
Author:
jttt
Message:

Allow to specify custom pattern for marker text labels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/WebMarker.java

    r2017 r4282  
    2121public class WebMarker extends ButtonMarker {
    2222
    23     public URL webUrl;
     23    public final URL webUrl;
    2424
    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) {
    3426        super(ll, "web.png", parentLayer, time, offset);
    3527        this.webUrl = webUrl;
     
    4133            JOptionPane.showMessageDialog(Main.parent,
    4234                    "<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);
    4638        }
    4739    }
Note: See TracChangeset for help on using the changeset viewer.