Last change
on this file since 3518 was 3388, checked in by jttt, 14 years ago |
Add tagging preset search dialog
|
-
Property svn:mime-type
set to
text/plain
|
File size:
919 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.tagging;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import java.awt.event.ActionEvent;
|
---|
7 | import java.awt.event.KeyEvent;
|
---|
8 |
|
---|
9 | import org.openstreetmap.josm.Main;
|
---|
10 | import org.openstreetmap.josm.actions.JosmAction;
|
---|
11 | import org.openstreetmap.josm.tools.Shortcut;
|
---|
12 |
|
---|
13 | public class TaggingPresetSearchAction extends JosmAction {
|
---|
14 |
|
---|
15 | public TaggingPresetSearchAction() {
|
---|
16 | super(tr("Search preset"), "dialogs/search", tr("Show preset search dialog"),
|
---|
17 | Shortcut.registerShortcut("preset:search", tr("Search presets"), KeyEvent.VK_F3, Shortcut.GROUP_DIRECT), true);
|
---|
18 | }
|
---|
19 |
|
---|
20 | @Override
|
---|
21 | public void actionPerformed(ActionEvent e) {
|
---|
22 |
|
---|
23 | if (!Main.main.hasEditLayer())
|
---|
24 | return;
|
---|
25 |
|
---|
26 | TaggingPresetSearchDialog dialog = new TaggingPresetSearchDialog(Main.parent);
|
---|
27 | dialog.showDialog();
|
---|
28 | }
|
---|
29 |
|
---|
30 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.