Clover Coverage Report - FEST Swing 1.2
Coverage timestamp: Tue Jun 1 2010 15:19:25 PDT
../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
9   47   2   9
2   20   0.22   1
1     2  
1    
7.7% of code in this file is excluded from these metrics.
 
  KeyStrokeMappings       Line # 33 9 7.7% 2 1 91.7% 0.9166667
 
No Tests
 
1    /*
2    * Created on Mar 15, 2010
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5    * in compliance with the License. You may obtain a copy of the License at
6    *
7    * http://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software distributed under the License
10    * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11    * or implied. See the License for the specific language governing permissions and limitations under
12    * the License.
13    *
14    * Copyright @2010 the original author or authors.
15    */
16    package org.fest.swing.keystroke;
17   
18    import static java.awt.event.KeyEvent.*;
19    import static java.util.Collections.unmodifiableList;
20    import static org.fest.swing.keystroke.KeyStrokeMapping.mapping;
21    import static org.fest.swing.keystroke.KeyStrokeMappingProvider.NO_MASK;
22    import static org.fest.swing.util.Platform.isWindows;
23   
24    import java.util.*;
25   
26    /**
27    * Understands utility methods related to <code>{@link KeyStrokeMapping}</code>s.
28    *
29    * @author Alex Ruiz
30    *
31    * @since 1.2
32    */
 
33    final class KeyStrokeMappings {
34   
 
35  2710 toggle static Collection<KeyStrokeMapping> defaultMappings() {
36  2710 List<KeyStrokeMapping> mappings = new ArrayList<KeyStrokeMapping>();
37  2710 mappings.add(mapping('\b', VK_BACK_SPACE, NO_MASK));
38  2710 mappings.add(mapping('', VK_DELETE, NO_MASK));
39  2710 mappings.add(mapping('\n', VK_ENTER, NO_MASK));
40  2710 if (isWindows()) mappings.add(mapping('\r', VK_ENTER, NO_MASK));
41  2710 mappings.add(mapping('', VK_ESCAPE, NO_MASK));
42  2710 mappings.add(mapping('\t', VK_TAB, NO_MASK));
43  2710 return unmodifiableList(mappings);
44    }
45   
 
46    toggle private KeyStrokeMappings() {}
47    }