Last change
on this file since 12637 was 12637, checked in by Don-vip, 7 years ago |
see #15182 - deprecate Main.toolbar . Replacement: gui.MainApplication.getToolbar()
|
-
Property svn:eol-style
set to
native
|
File size:
1.1 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.tagging.presets;
|
---|
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.actions.JosmAction;
|
---|
10 | import org.openstreetmap.josm.gui.MainApplication;
|
---|
11 | import org.openstreetmap.josm.tools.Shortcut;
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * The tagging presets search action (F3).
|
---|
15 | * @since 3388
|
---|
16 | */
|
---|
17 | public class TaggingPresetSearchAction extends JosmAction {
|
---|
18 |
|
---|
19 | /**
|
---|
20 | * Constructs a new {@code TaggingPresetSearchAction}.
|
---|
21 | */
|
---|
22 | public TaggingPresetSearchAction() {
|
---|
23 | super(tr("Search preset"), "dialogs/search", tr("Show preset search dialog"),
|
---|
24 | Shortcut.registerShortcut("preset:search", tr("Search presets"), KeyEvent.VK_F3, Shortcut.DIRECT), false);
|
---|
25 | putValue("toolbar", "presets/search");
|
---|
26 | MainApplication.getToolbar().register(this);
|
---|
27 | }
|
---|
28 |
|
---|
29 | @Override
|
---|
30 | public void actionPerformed(ActionEvent e) {
|
---|
31 |
|
---|
32 | if (MainApplication.getLayerManager().getEditLayer() == null)
|
---|
33 | return;
|
---|
34 |
|
---|
35 | TaggingPresetSearchDialog.getInstance().showDialog();
|
---|
36 | }
|
---|
37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.