Last change
on this file since 6084 was 6084, checked in by bastiK, 11 years ago |
see #8902 - add missing @Override annotations (patch by shinigami)
|
-
Property svn:eol-style
set to
native
|
File size:
1.2 KB
|
Rev | Line | |
---|
[298] | 1 | // License: GPL. Copyright 2007 by Immanuel Scholz and others
|
---|
[626] | 2 | package org.openstreetmap.josm.actions;
|
---|
| 3 |
|
---|
[2748] | 4 | import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
|
---|
[626] | 5 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
| 6 |
|
---|
| 7 | import java.awt.event.ActionEvent;
|
---|
| 8 | import java.awt.event.KeyEvent;
|
---|
| 9 |
|
---|
| 10 | import org.openstreetmap.josm.Main;
|
---|
| 11 | import org.openstreetmap.josm.gui.preferences.PreferenceDialog;
|
---|
[1084] | 12 | import org.openstreetmap.josm.tools.Shortcut;
|
---|
[626] | 13 |
|
---|
| 14 | /**
|
---|
| 15 | * Open the Preferences dialog.
|
---|
| 16 | *
|
---|
| 17 | * @author imi
|
---|
| 18 | */
|
---|
[1647] | 19 | public class PreferencesAction extends JosmAction implements Runnable {
|
---|
[626] | 20 |
|
---|
[1169] | 21 | /**
|
---|
| 22 | * Create the preference action with "&Preferences" as label.
|
---|
| 23 | */
|
---|
| 24 | public PreferencesAction() {
|
---|
[2748] | 25 | super(tr("Preferences..."), "preference", tr("Open a preferences dialog for global settings."),
|
---|
[4982] | 26 | Shortcut.registerShortcut("system:preferences", tr("Preferences"), KeyEvent.VK_F12, Shortcut.DIRECT), true);
|
---|
[2323] | 27 | putValue("help", ht("/Action/Preferences"));
|
---|
[1169] | 28 | }
|
---|
[626] | 29 |
|
---|
[1169] | 30 | /**
|
---|
| 31 | * Launch the preferences dialog.
|
---|
| 32 | */
|
---|
[6084] | 33 | @Override
|
---|
[1169] | 34 | public void actionPerformed(ActionEvent e) {
|
---|
[1733] | 35 | run();
|
---|
[1647] | 36 | }
|
---|
| 37 |
|
---|
[6084] | 38 | @Override
|
---|
[1647] | 39 | public void run() {
|
---|
[2748] | 40 | new PreferenceDialog(Main.parent).setVisible(true);
|
---|
[1169] | 41 | }
|
---|
[626] | 42 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.