Changeset 550 for trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/gui/InteractionEventList.java
- Timestamp:
- 08/16/12 15:16:22 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/gui/InteractionEventList.java
r544 r550 21 21 @SuppressWarnings("serial") 22 22 public class InteractionEventList extends ArrayList<Event> implements List<Event> { 23 23 24 /** stores the events to be handled later in the order, they should be processed */ 24 private List<KeyEventPair> mEventPairs = new ArrayList<KeyEventPair>();25 private List<KeyEventPair> eventPairs = new ArrayList<KeyEventPair>(); 25 26 26 27 /** … … 35 36 public boolean add(Event event) { 36 37 if (event.getType() instanceof KeyInteraction) { 37 for (int i = 0; i < mEventPairs.size(); i++) {38 KeyEventPair eventPair = mEventPairs.get(i);38 for (int i = 0; i < eventPairs.size(); i++) { 39 KeyEventPair eventPair = eventPairs.get(i); 39 40 40 41 if (eventPair.process(event)) { 41 42 // handle all leading and completed event pairs, if any 42 while (( mEventPairs.size() > 0) && (mEventPairs.get(0).isComplete())) {43 addEventPair( mEventPairs.get(0));44 mEventPairs.remove(0);43 while ((eventPairs.size() > 0) && (eventPairs.get(0).isComplete())) { 44 addEventPair(eventPairs.get(0)); 45 eventPairs.remove(0); 45 46 } 46 47 return true; … … 48 49 } 49 50 50 mEventPairs.add(new KeyEventPair(event));51 eventPairs.add(new KeyEventPair(event)); 51 52 return true; 52 53 }
Note: See TracChangeset
for help on using the changeset viewer.