source: josm/trunk/src/org/openstreetmap/josm/actions/InfoWebAction.java@ 4851

Last change on this file since 4851 was 4700, checked in by stoecker, 12 years ago

adapt some more help links

File size: 1.2 KB
Line 
1//License: GPL. Copyright 2007 by Immanuel Scholz and others
2package org.openstreetmap.josm.actions;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
6
7import java.awt.event.KeyEvent;
8
9import org.openstreetmap.josm.Main;
10import org.openstreetmap.josm.data.osm.OsmPrimitive;
11import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
12import org.openstreetmap.josm.tools.Shortcut;
13
14public class InfoWebAction extends AbstractInfoAction {
15
16 public InfoWebAction() {
17 super(tr("Advanced info (web)"), "about",
18 tr("Display object information about OSM nodes, ways, or relations in web browser."),
19 Shortcut.registerShortcut("core:infoweb",
20 tr("Advanced info (web)"), KeyEvent.VK_I, Shortcut.GROUP_HOTKEY, Shortcut.SHIFT_DEFAULT), false);
21 putValue("help", ht("/Action/InfoAboutElementsWeb"));
22 putValue("toolbar", "action/infoweb");
23 Main.toolbar.register(this);
24 }
25
26 @Override
27 protected String createInfoUrl(Object infoObject) {
28 OsmPrimitive primitive = (OsmPrimitive)infoObject;
29 return getBaseBrowseUrl() + "/" + OsmPrimitiveType.from(primitive).getAPIName() + "/" + primitive.getId();
30 }
31}
Note: See TracBrowser for help on using the repository browser.