| Line | |
|---|
| 1 | package org.openstreetmap.josm.actions;
|
|---|
| 2 |
|
|---|
| 3 | import java.awt.event.ActionEvent;
|
|---|
| 4 | import java.awt.event.KeyEvent;
|
|---|
| 5 |
|
|---|
| 6 | import javax.swing.AbstractAction;
|
|---|
| 7 | import javax.swing.ImageIcon;
|
|---|
| 8 |
|
|---|
| 9 | import org.openstreetmap.josm.gui.PreferenceDialog;
|
|---|
| 10 |
|
|---|
| 11 | /**
|
|---|
| 12 | * Open the Preferences dialog.
|
|---|
| 13 | *
|
|---|
| 14 | * @author imi
|
|---|
| 15 | */
|
|---|
| 16 | public class PreferencesAction extends AbstractAction {
|
|---|
| 17 |
|
|---|
| 18 | /**
|
|---|
| 19 | * Create the preference action with "&Preferences" as label.
|
|---|
| 20 | */
|
|---|
| 21 | public PreferencesAction() {
|
|---|
| 22 | super("Preferences", new ImageIcon("images/preference.png"));
|
|---|
| 23 | putValue(MNEMONIC_KEY, KeyEvent.VK_P);
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| 26 | /**
|
|---|
| 27 | * Launch the preferences dialog.
|
|---|
| 28 | */
|
|---|
| 29 | public void actionPerformed(ActionEvent e) {
|
|---|
| 30 | PreferenceDialog dlg = new PreferenceDialog();
|
|---|
| 31 | dlg.setVisible(true);
|
|---|
| 32 | }
|
|---|
| 33 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.