Last change
on this file since 10586 was 10378, checked in by Don-vip, 8 years ago |
Checkstyle 6.19: enable SingleSpaceSeparator and fix violations
|
-
Property svn:eol-style
set to
native
|
File size:
1.0 KB
|
Rev | Line | |
---|
[4595] | 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 |
|
---|
[8674] | 10 | class MultikeyInfo {
|
---|
[4595] | 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() {
|
---|
[4604] | 24 | if (index < 9)
|
---|
[8510] | 25 | return (char) ('1' + index);
|
---|
[4604] | 26 | else if (index == 9)
|
---|
| 27 | return '0';
|
---|
[4595] | 28 | else
|
---|
[10378] | 29 | return (char) ('A' + index - 10);
|
---|
[4595] | 30 | }
|
---|
| 31 |
|
---|
| 32 | public String getDescription() {
|
---|
| 33 | return description;
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
| 36 |
|
---|
[8512] | 37 | Shortcut getMultikeyShortcut();
|
---|
[4999] | 38 |
|
---|
[4604] | 39 | void executeMultikeyAction(int index, boolean repeatLastAction);
|
---|
[8510] | 40 |
|
---|
[4595] | 41 | List<MultikeyInfo> getMultikeyCombinations();
|
---|
[8510] | 42 |
|
---|
[4595] | 43 | MultikeyInfo getLastMultikeyAction();
|
---|
| 44 |
|
---|
| 45 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.