|
Last change
on this file since 24 was 24, checked in by imi, 20 years ago |
- added new osm export to file
- added key/value editing
|
|
File size:
977 bytes
|
| Line | |
|---|
| 1 | package org.openstreetmap.josm.actions;
|
|---|
| 2 |
|
|---|
| 3 | import java.awt.event.ActionEvent;
|
|---|
| 4 | import java.awt.event.InputEvent;
|
|---|
| 5 | import java.awt.event.KeyEvent;
|
|---|
| 6 |
|
|---|
| 7 | import javax.swing.AbstractAction;
|
|---|
| 8 | import javax.swing.KeyStroke;
|
|---|
| 9 |
|
|---|
| 10 | import org.openstreetmap.josm.gui.ImageProvider;
|
|---|
| 11 | import org.openstreetmap.josm.gui.PreferenceDialog;
|
|---|
| 12 |
|
|---|
| 13 | /**
|
|---|
| 14 | * Open the Preferences dialog.
|
|---|
| 15 | *
|
|---|
| 16 | * @author imi
|
|---|
| 17 | */
|
|---|
| 18 | public class PreferencesAction extends AbstractAction {
|
|---|
| 19 |
|
|---|
| 20 | /**
|
|---|
| 21 | * Create the preference action with "&Preferences" as label.
|
|---|
| 22 | */
|
|---|
| 23 | public PreferencesAction() {
|
|---|
| 24 | super("Preferences", ImageProvider.get("preference"));
|
|---|
| 25 | putValue(ACCELERATOR_KEY, KeyStroke.getAWTKeyStroke(KeyEvent.VK_P, InputEvent.CTRL_DOWN_MASK));
|
|---|
| 26 | putValue(MNEMONIC_KEY, KeyEvent.VK_P);
|
|---|
| 27 | putValue(SHORT_DESCRIPTION, "Open a preferences page for global settings.");
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
| 30 | /**
|
|---|
| 31 | * Launch the preferences dialog.
|
|---|
| 32 | */
|
|---|
| 33 | public void actionPerformed(ActionEvent e) {
|
|---|
| 34 | PreferenceDialog dlg = new PreferenceDialog();
|
|---|
| 35 | dlg.setVisible(true);
|
|---|
| 36 | }
|
|---|
| 37 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.