Changeset 710 for trunk/quest-core-tasktrees/src/main/java/de
- Timestamp:
- 08/30/12 14:05:47 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees/manager/TaskTreeManager.java
r655 r710 4 4 5 5 import de.ugoe.cs.quest.eventcore.Event; 6 import de.ugoe.cs.quest.eventcore.IEventTarget;7 import de.ugoe.cs.quest.eventcore.gui.KeyInteraction;8 6 import de.ugoe.cs.quest.eventcore.gui.KeyboardFocusChange; 9 7 import de.ugoe.cs.quest.tasktrees.treeifc.IEventTask; … … 41 39 private ISequence rootSequence; 42 40 43 /** */44 private IEventTarget currentKeyboardFocusGUIElement;45 46 41 /** 47 42 * TODO: comment … … 56 51 */ 57 52 public void handleNewEvent(Event event) { 58 if (event.getType() instanceof KeyInteraction) { 59 if (currentKeyboardFocusGUIElement == null) { 60 currentKeyboardFocusGUIElement = event.getTarget(); 61 } 62 63 addEventTask 64 (taskTreeNodeFactory.createNewEventTask 65 (event.getType(), currentKeyboardFocusGUIElement)); 66 } 67 else { 68 addEventTask 69 (taskTreeNodeFactory.createNewEventTask(event.getType(), event.getTarget())); 70 } 53 addEventTask(taskTreeNodeFactory.createNewEventTask(event.getType(), event.getTarget())); 71 54 } 72 55 … … 98 81 */ 99 82 private void handleEventTask(IEventTask eventTask) { 100 if (eventTask.getEventType() instanceof KeyboardFocusChange) { 101 currentKeyboardFocusGUIElement = eventTask.getEventTarget(); 102 } 103 else { 104 LOG.info("handling event task \"" + eventTask + "\""); 105 addTaskToSequence(eventTask, currentKeyboardFocusGUIElement); 83 if (!(eventTask.getEventType() instanceof KeyboardFocusChange)) { 84 LOG.info("handling interaction event task \"" + eventTask + "\""); 85 addTaskToSequence(eventTask); 106 86 } 107 87 } … … 110 90 * 111 91 */ 112 private void addTaskToSequence(ITaskTreeNode task , IEventTarget currentKeyboardFocusGUIElement)92 private void addTaskToSequence(ITaskTreeNode task) 113 93 { 114 94 taskTreeBuilder.addChild(rootSequence, task);
Note: See TracChangeset
for help on using the changeset viewer.