Changeset 11959 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2017-04-19T19:21:39+02:00 (8 years ago)
Author:
stoecker
Message:

add a link to the wiki in imagery preferences

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java

    r11810 r11959  
    3939import javax.swing.JToolBar;
    4040import javax.swing.UIManager;
     41import javax.swing.event.HyperlinkEvent.EventType;
    4142import javax.swing.event.ListSelectionEvent;
    4243import javax.swing.event.ListSelectionListener;
     
    6566import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
    6667import org.openstreetmap.josm.gui.util.GuiHelper;
     68import org.openstreetmap.josm.gui.widgets.HtmlPanel;
    6769import org.openstreetmap.josm.gui.widgets.JosmEditorPane;
    6870import org.openstreetmap.josm.tools.GBC;
    6971import org.openstreetmap.josm.tools.ImageProvider;
    7072import org.openstreetmap.josm.tools.LanguageInfo;
     73import org.openstreetmap.josm.tools.OpenBrowser;
    7174
    7275/**
     
    362365            defaultToolbar.add(new ReloadAction());
    363366            add(defaultToolbar, GBC.eol().anchor(GBC.SOUTH).insets(0, 0, 5, 0));
     367
     368            HtmlPanel help = new HtmlPanel(tr("New default entries can be added in the <a href=\"{0}\">Wiki</a>.", Main.getJOSMWebsite()+"/wiki/Maps"));
     369            help.getEditorPane().addHyperlinkListener(e -> {
     370                if (e.getEventType() == EventType.ACTIVATED) {
     371                    OpenBrowser.displayUrl(e.getURL().toString());
     372                }
     373            });
     374            add(help, GBC.eol().insets(10, 0, 0, 10).fill(GBC.HORIZONTAL));
    364375
    365376            ActivateAction activate = new ActivateAction();
Note: See TracChangeset for help on using the changeset viewer.