Changeset 9320 in josm for trunk/src/org/openstreetmap/josm/actions/HelpAction.java
- Timestamp:
- 2016-01-05T15:34:45+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/HelpAction.java
r8510 r9320 7 7 import java.awt.Point; 8 8 import java.awt.event.ActionEvent; 9 import java.awt.event.KeyEvent; 9 10 10 import javax.swing.AbstractAction;11 11 import javax.swing.SwingUtilities; 12 12 … … 15 15 import org.openstreetmap.josm.gui.help.HelpUtil; 16 16 import org.openstreetmap.josm.io.OnlineResource; 17 import org.openstreetmap.josm.tools. ImageProvider;17 import org.openstreetmap.josm.tools.Shortcut; 18 18 19 19 /** … … 21 21 * @since 155 22 22 */ 23 public class HelpAction extends AbstractAction {23 public class HelpAction extends JosmAction { 24 24 25 25 /** … … 27 27 */ 28 28 public HelpAction() { 29 super(tr("Help")); 30 new ImageProvider("help").getResource().getImageIcon(this); 31 putValue("toolbar", "help"); 29 this(true); 30 } 31 32 private HelpAction(boolean shortcut) { 33 super(tr("Help"), "help", null, 34 shortcut ? Shortcut.registerShortcut("system:help", tr("Help"), KeyEvent.VK_F1, Shortcut.DIRECT) : null, 35 true); 32 36 setEnabled(!Main.isOffline(OnlineResource.JOSM_WEBSITE)); 37 } 38 39 /** 40 * Constructs a new {@code HelpAction} without assigning a shortcut. 41 * @return a new {@code HelpAction} 42 */ 43 public static HelpAction createWithoutShortcut() { 44 return new HelpAction(false); 33 45 } 34 46
Note:
See TracChangeset
for help on using the changeset viewer.