Changeset 784 for trunk/quest-ui-core
- Timestamp:
- 09/06/12 13:39:27 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDdetectTextInputEvents.java
r766 r784 9 9 import de.ugoe.cs.quest.SequenceInstanceOf; 10 10 import de.ugoe.cs.quest.eventcore.Event; 11 import de.ugoe.cs.quest.eventcore.gui.KeyPressed; 12 import de.ugoe.cs.quest.eventcore.gui.KeyReleased; 13 import de.ugoe.cs.quest.eventcore.gui.KeyTyped; 14 import de.ugoe.cs.quest.eventcore.gui.TextInput; 11 15 import de.ugoe.cs.quest.eventcore.gui.TextInput.TextEquality; 12 16 import de.ugoe.cs.quest.eventcore.gui.TextInputDetector; … … 17 21 /** 18 22 * <p> 19 * TODO comment 23 * Command that converts {@link KeyPressed}, {@link KeyReleased}, and {@link KeyTyped} sequences 24 * into {@link TextInput} events if possible. 20 25 * </p> 21 26 * … … 54 59 newSequencesName = sequencesName; 55 60 } 56 if (parameters.size() > 2) {61 if (parameters.size() > 2) { 57 62 textEqualityTypeString = (String) parameters.get(2); 58 63 } … … 72 77 return; 73 78 } 74 79 75 80 TextEquality textEqualityType = null; 76 81 try { … … 78 83 } 79 84 catch (IllegalArgumentException e) { 80 Console.printerrln("Invalid mode. Only LEXICAL, SYNTACTICAL, and SEMANTICAL are allowed values!"); 85 Console 86 .printerrln("Invalid mode. Only LEXICAL, SYNTACTICAL, and SEMANTICAL are allowed values!"); 81 87 return; 82 88 } … … 85 91 86 92 Collection<List<Event>> newSequences = new LinkedList<List<Event>>(); 87 93 88 94 for (List<Event> sequence : sequences) { 89 95 newSequences.add(new TextInputDetector(textEqualityType).detectTextInputs(sequence)); … … 93 99 CommandHelpers.dataOverwritten(newSequencesName); 94 100 } 95 101 96 102 } 97 103
Note: See TracChangeset
for help on using the changeset viewer.