Last change
on this file since 104 was 104, checked in by imi, 18 years ago |
- started i18n
- started "download incomplete ways" action
- added straight line selection mode
|
File size:
585 bytes
|
Line | |
---|
1 | package org.openstreetmap.josm.tools;
|
---|
2 |
|
---|
3 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
4 |
|
---|
5 | import java.awt.event.KeyEvent;
|
---|
6 |
|
---|
7 |
|
---|
8 | public class ShortCutLabel {
|
---|
9 | public static String name(int shortCut, int modifiers) {
|
---|
10 | String s = "";
|
---|
11 | if ((modifiers & KeyEvent.CTRL_MASK) != 0)
|
---|
12 | s += tr("Ctrl-");
|
---|
13 | if ((modifiers & KeyEvent.ALT_MASK) != 0)
|
---|
14 | s += tr("Alt-");
|
---|
15 | if ((modifiers & KeyEvent.ALT_GRAPH_MASK) != 0)
|
---|
16 | s += tr("AltGr-");
|
---|
17 | if ((modifiers & KeyEvent.SHIFT_MASK) != 0)
|
---|
18 | s += tr("Shift-");
|
---|
19 | s += Character.toUpperCase((char)shortCut);
|
---|
20 | return s;
|
---|
21 | }
|
---|
22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.