Last change
on this file since 4595 was 4595, checked in by jttt, 12 years ago |
Multikey keyboard shorcuts - shorcuts like Ctrl+Alt+S,n will toggle n-th layer visibility, added shorcuts also for Jump to next/previous marker. Shorcuts for other actions can be easily added.
|
File size:
981 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.tools;
|
---|
3 |
|
---|
4 | import java.util.List;
|
---|
5 |
|
---|
6 | import javax.swing.Action;
|
---|
7 |
|
---|
8 | public interface MultikeyShortcutAction extends Action {
|
---|
9 |
|
---|
10 | public static class MultikeyInfo {
|
---|
11 | private final int index;
|
---|
12 | private final String description;
|
---|
13 |
|
---|
14 | public MultikeyInfo(int index, String description) {
|
---|
15 | this.index = index;
|
---|
16 | this.description = description;
|
---|
17 | }
|
---|
18 |
|
---|
19 | public int getIndex() {
|
---|
20 | return index;
|
---|
21 | }
|
---|
22 |
|
---|
23 | public char getShortcut() {
|
---|
24 | if (index < 10)
|
---|
25 | return (char)('0' + index);
|
---|
26 | else
|
---|
27 | return (char)('A' + index - 10);
|
---|
28 | }
|
---|
29 |
|
---|
30 | public String getDescription() {
|
---|
31 | return description;
|
---|
32 | }
|
---|
33 | }
|
---|
34 |
|
---|
35 | void executeMultikeyAction(int index);
|
---|
36 | void repeateLastMultikeyAction();
|
---|
37 | List<MultikeyInfo> getMultikeyCombinations();
|
---|
38 | MultikeyInfo getLastMultikeyAction();
|
---|
39 |
|
---|
40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.