Ticket #2091: TagginPreset_UrlLabel.patch

File TagginPreset_UrlLabel.patch, 1.4 KB (added by Claudius, 17 years ago)

Patch for a clickable blue link

  • src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java

     
    4545import org.openstreetmap.josm.tools.GBC;
    4646import org.openstreetmap.josm.tools.ImageProvider;
    4747import org.openstreetmap.josm.tools.OpenBrowser;
     48import org.openstreetmap.josm.tools.UrlLabel;
    4849import org.openstreetmap.josm.tools.XmlObjectParser;
    4950import org.xml.sax.SAXException;
    5051
     
    374375
    375376        @Override public void addToPanel(JPanel p, Collection<OsmPrimitive> sel) {
    376377            if(locale_text == null)
    377                 locale_text = text == null ? tr("Open map features in browser") : tr(text);
     378                locale_text = text == null ? tr("More information about this features") : tr(text);
    378379            JButton b = new JButton(locale_text);
    379380            b.addActionListener(new ActionListener(){
    380381                public void actionPerformed(ActionEvent e) {
    381382                    OpenBrowser.displayUrl(locale_href != null ? locale_href : href);
    382383                }
    383384            });
    384             p.add(b, GBC.eol().anchor(GBC.EAST));
     385            p.add(new UrlLabel(locale_href, locale_text), GBC.eol().anchor(GBC.WEST));
    385386        }
    386387        @Override public void addCommands(Collection<OsmPrimitive> sel, List<Command> cmds) {}
    387388    }