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

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

fixed #3719: Upload dialog still lists closed changesets after JOSM knows they've been closed
fixed #3668: Upload dialog: comment textbox buggy
Added context sensitive help to upload dialog
Improved error handling for errors due to closing already closed changesets

File size: 963 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 public ContextSensitiveHelpAction(String helpTopic) {
22 putValue(SHORT_DESCRIPTION, tr("Show help information"));
23 putValue(NAME, tr("Help"));
24 putValue(SMALL_ICON, ImageProvider.get("help"));
25 this.helpTopic = helpTopic;
26 }
27
28 public void actionPerformed(ActionEvent e) {
29 if (helpTopic != null) {
30 HelpBrowserProxy.getInstance().setUrlForHelpTopic(helpTopic);
31 }
32 }
33}
Note: See TracBrowser for help on using the repository browser.