Last change
on this file since 2252 was 2252, checked in by Gubaer, 16 years ago |
Refactored JOSM help system, slightly extended
Fixed problem with new internal representation of nodes as array (in Way)
|
File size:
718 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.help;
|
---|
3 |
|
---|
4 | import java.awt.event.KeyEvent;
|
---|
5 |
|
---|
6 | import javax.swing.JComponent;
|
---|
7 | import javax.swing.KeyStroke;
|
---|
8 |
|
---|
9 | import org.openstreetmap.josm.Main;
|
---|
10 |
|
---|
11 | public class HelpBuilder {
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * Makes a component aware of context sensitive help
|
---|
15 | *
|
---|
16 | * @param component the component
|
---|
17 | * @param topic the help topic
|
---|
18 | */
|
---|
19 | static public void setHelpContext(JComponent component, String topic) {
|
---|
20 | component.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_F1,0), "help");
|
---|
21 | component.getActionMap().put("help", Main.main.menu.help);
|
---|
22 | component.putClientProperty("help", topic);
|
---|
23 | }
|
---|
24 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.