Changeset 838 for trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/VirtualKeySynonyms.java
- Timestamp:
- 09/20/12 14:13:07 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/VirtualKeySynonyms.java
r725 r838 1 1 2 package de.ugoe.cs.tasktree.keyboardmaps; 2 3 … … 10 11 11 12 /** 12 * TODO comment 13 * <p> 14 * Helper class to handle synonymous {@link VirtualKey}s. 15 * </p> 13 16 * 14 * @version $Revision: $ $Date: 12.07.2012$15 * @author 2012, last modified by $Author: pharms$17 * @version 1.0 18 * @author Patrick Harms 16 19 */ 17 20 class VirtualKeySynonyms { 18 19 /** */ 21 22 /** 23 * <p> 24 * Map of synonymous keys. 25 * </p> 26 */ 20 27 private Map<Integer, List<VirtualKey>> synonyms = new HashMap<Integer, List<VirtualKey>>(); 21 28 22 /** */ 29 /** 30 * <p> 31 * Mapping of {@link VirtualKey}s to integer Ids. 32 * </p> 33 */ 23 34 private Map<VirtualKey, Integer> keyIds = new HashMap<VirtualKey, Integer>(); 24 35 25 36 /** 26 * TODO: comment 37 * <p> 38 * Adds a new synonymous key. 39 * </p> 27 40 * 28 41 * @param keyId 42 * id of the synonym 29 43 * @param virtualKey 44 * the synonym 30 45 */ 31 46 public void add(int keyId, VirtualKey virtualKey) { … … 46 61 if ((existingKeyId != null) && (existingKeyId != keyId)) { 47 62 Console.traceln(Level.FINEST, "virtual key " + virtualKey + " is mapped to more " + 48 49 63 "than one key id (current is " + existingKeyId + ", new is " + keyId + 64 "). New key id will be used (" + keyId + ")."); 50 65 } 51 66 … … 54 69 55 70 /** 56 * 57 */ 71 * <p> 72 * Returns whether a key is contained in the set of synonyms. 73 * </p> 74 * 75 * @param keyId 76 * id of the key 77 * @return true, if the key is contained; false otherwise 78 */ 58 79 public boolean containsKey(int keyId) { 59 80 return synonyms.containsKey(keyId); … … 61 82 62 83 /** 63 * TODO: comment 84 * <p> 85 * Returns all synonyms known for a given key. 86 * </p> 64 87 * 65 88 * @param keyId 66 * @return 89 * the id of the key 90 * @return the synonyms 67 91 */ 68 92 public VirtualKey[] getVirtualKeySynonyms(int keyId) {
Note: See TracChangeset
for help on using the changeset viewer.