source: josm/trunk/src/org/openstreetmap/josm/gui/help/ContextSensitiveHelpAction.java@ 2308

Last change on this file since 2308 was 2308, checked in by Gubaer, 16 years ago

fixed #3762: Deleted relation still referenced when deleting former member
Clean up of Delete command. New: only one confirmation dialog for all parent relations of deleted objects, see help.
Improved infrastructure for context-sensitive help, improved internal help browser.

File size: 1015 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.help;
3
4import java.awt.event.ActionEvent;
5
6import javax.swing.AbstractAction;
7import static org.openstreetmap.josm.tools.I18n.tr;
8
9import org.openstreetmap.josm.tools.ImageProvider;
10
11/**
12 * This is the standard help action to be used with help buttons for
13 * context sensitive help
14 *
15 */
16public class ContextSensitiveHelpAction extends AbstractAction {
17
18 /** the help topic */
19 private String helpTopic;
20
21 /**
22 *
23 * @param helpTopic
24 */
25 public ContextSensitiveHelpAction(String helpTopic) {
26 putValue(SHORT_DESCRIPTION, tr("Show help information"));
27 putValue(NAME, tr("Help"));
28 putValue(SMALL_ICON, ImageProvider.get("help"));
29 this.helpTopic = helpTopic;
30 }
31
32 public void actionPerformed(ActionEvent e) {
33 if (helpTopic != null) {
34 HelpBrowserProxy.getInstance().setUrlForHelpTopic(helpTopic);
35 }
36 }
37}
Note: See TracBrowser for help on using the repository browser.