Changeset 719 for trunk/quest-core-events
- Timestamp:
- 08/31/12 09:57:46 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/gui/KeyInteractionTargetCorrector.java
r708 r719 17 17 * to the GUI element having the current keyboard focus. The current keyboard focus is determined 18 18 * either by keyboard focus events or by using the target of the first key interaction in the 19 * provided sequence sequence.19 * provided sequence. Events changing the keyboard focus are discarded herewith. 20 20 * </p> 21 21 * … … 41 41 List<Event> resultingSequence = new LinkedList<Event>(); 42 42 IGUIElement currentKeyboardFocusGUIElement = null; 43 Event resultingEvent;44 43 45 44 for (Event event : sequence) { 46 resultingEvent = null;47 48 45 if (event.getTarget() instanceof IGUIElement) { 49 46 if (event.getType() instanceof KeyboardFocusChange) { 50 47 currentKeyboardFocusGUIElement = (IGUIElement) event.getTarget(); 48 event = null; 51 49 } 52 50 else if (event.getType() instanceof KeyInteraction) { … … 56 54 57 55 if (!currentKeyboardFocusGUIElement.equals(event.getTarget())) { 58 resultingEvent = new Event(event.getType(), currentKeyboardFocusGUIElement);56 event = new Event(event.getType(), currentKeyboardFocusGUIElement); 59 57 } 60 58 } 61 59 } 62 60 63 if (resultingEvent != null) { 64 resultingSequence.add(resultingEvent); 65 } 66 else { 61 if (event != null) { 67 62 resultingSequence.add(event); 68 63 }
Note: See TracChangeset
for help on using the changeset viewer.