source: osm/utils/josm/plugins/annotation-tester/src/annotationtester/AnnotationTesterAction.java@ 1882

Last change on this file since 1882 was 1882, checked in by imi, 18 years ago

updated to new JosmAction syntax

File size: 1.1 KB
Line 
1package annotationtester;
2
3import static org.openstreetmap.josm.tools.I18n.tr;
4
5import java.awt.event.ActionEvent;
6import java.awt.event.KeyEvent;
7
8import javax.swing.JOptionPane;
9
10import org.openstreetmap.josm.Main;
11import org.openstreetmap.josm.actions.JosmAction;
12
13/**
14 * Fires up the annotation tester
15 * @author Immanuel.Scholz
16 */
17public class AnnotationTesterAction extends JosmAction {
18
19 public AnnotationTesterAction() {
20 super(tr("Annotation Preset Tester"), "annotation-tester", tr("Open the annotation preset test tool for previewing annotation preset dialogs."), KeyEvent.VK_A, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK, true);
21 Main.main.menu.helpMenu.addSeparator();
22 Main.main.menu.helpMenu.add(this);
23 }
24
25 public void actionPerformed(ActionEvent e) {
26 String annotationSources = Main.pref.get("annotation.sources");
27 if (annotationSources.equals("")) {
28 JOptionPane.showMessageDialog(Main.parent, tr("You have to specify annotation sources in the preferences first."));
29 return;
30 }
31 String[] args = annotationSources.split(";");
32 new AnnotationTester(args);
33 }
34}
Note: See TracBrowser for help on using the repository browser.