Last change
on this file since 30 was 30, checked in by imi, 18 years ago |
- Removed edit layer, combine action, save gpx (integrated in normal save)
- Simplified and unified shortkeys
- many small code simplifications
- added undo
- broken checkin!
|
File size:
966 bytes
|
Line | |
---|
1 | package org.openstreetmap.josm.actions;
|
---|
2 |
|
---|
3 | import java.awt.AWTKeyStroke;
|
---|
4 |
|
---|
5 | import javax.swing.AbstractAction;
|
---|
6 |
|
---|
7 | import org.openstreetmap.josm.gui.ImageProvider;
|
---|
8 |
|
---|
9 | /**
|
---|
10 | * Base class helper for all Actions in JOSM. Just to make the life easier.
|
---|
11 | * @author imi
|
---|
12 | */
|
---|
13 | abstract public class JosmAction extends AbstractAction {
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * Construct the action.
|
---|
17 | *
|
---|
18 | * @param name Name of the action (entry name in menu)
|
---|
19 | * @param iconName Name of the icon (without extension)
|
---|
20 | * @param desc Short tooltip description
|
---|
21 | * @param mnemonic If non-<code>null</code>, the Mnemonic in menu
|
---|
22 | * @param shortCut If non-<code>null</code>, the shortcut keystroke
|
---|
23 | */
|
---|
24 | public JosmAction(String name, String iconName, String desc, Integer mnemonic, AWTKeyStroke shortCut) {
|
---|
25 | super(name, ImageProvider.get(iconName));
|
---|
26 | putValue(SHORT_DESCRIPTION, desc);
|
---|
27 | if (mnemonic != null)
|
---|
28 | putValue(MNEMONIC_KEY, mnemonic);
|
---|
29 | if (shortCut != null)
|
---|
30 | putValue(ACCELERATOR_KEY, shortCut);
|
---|
31 | }
|
---|
32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.