| Revision 5170,
995 bytes
checked in by Don-vip, 7 weeks ago
(diff) |
|
cleanup svn:mime-type properties preventing Java sources from being viewed as such on Trac
|
-
Property svn:eol-style set to
native
|
| 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.DIRECT), false); |
|---|
| 18 | putValue("toolbar", "presets/search"); |
|---|
| 19 | Main.toolbar.register(this); |
|---|
| 20 | } |
|---|
| 21 | |
|---|
| 22 | @Override |
|---|
| 23 | public void actionPerformed(ActionEvent e) { |
|---|
| 24 | |
|---|
| 25 | if (!Main.main.hasEditLayer()) |
|---|
| 26 | return; |
|---|
| 27 | |
|---|
| 28 | TaggingPresetSearchDialog dialog = TaggingPresetSearchDialog.getInstance(); |
|---|
| 29 | dialog.showDialog(); |
|---|
| 30 | } |
|---|
| 31 | |
|---|
| 32 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.