Changeset 1040 for trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filter/EventTypeFilter.java
- Timestamp:
- 01/16/13 17:51:51 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filter/EventTypeFilter.java
r1030 r1040 1 // Copyright 2012 Georg-August-Universität Göttingen, Germany 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 1 15 package de.ugoe.cs.autoquest.usability.tasktree.filter; 2 16 … … 6 20 7 21 import de.ugoe.cs.autoquest.eventcore.IEventType; 22 import de.ugoe.cs.autoquest.eventcore.gui.IInteraction; 8 23 import de.ugoe.cs.autoquest.eventcore.gui.MouseButtonInteraction; 9 24 import de.ugoe.cs.autoquest.eventcore.gui.MouseInteraction; … … 12 27 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 13 28 29 /** 30 * <p> 31 * TODO comment 32 * </p> 33 * 34 * @author Alexander Deicke 35 */ 14 36 public enum EventTypeFilter implements TaskTreeNodeFilter<IEventType> { 37 38 MOUSE_BUTTON_INTERACTION(MouseButtonInteraction.class), 39 40 MOUSE_INTERACTION(MouseInteraction.class), 15 41 16 42 TEXT_INPUT(TextInput.class), 17 43 18 MOUSE_INTERACTION(MouseInteraction.class), 19 20 MOUSE_BUTTON_INTERACTION(MouseButtonInteraction.class); 21 44 USER_INTERACTION(IInteraction.class); 45 22 46 private Class<? extends IEventType> eventTypeClazz; 23 47 24 48 private EventTypeFilter(Class<? extends IEventType> eventTypeClazz) { 25 49 this.eventTypeClazz = eventTypeClazz; … … 31 55 return (Class<IEventType>) eventTypeClazz; 32 56 } 33 57 34 58 @SuppressWarnings("rawtypes") 35 59 @Override … … 40 64 return Predicates.and(instanceOfIEventTaskPredicate, nodeHoldsInstanceOfFilterArgument); 41 65 } 42 66 43 67 private Function<ITaskTreeNode, IEventType> nodeExtractionFunction() { 44 68 return new Function<ITaskTreeNode, IEventType>() { 45 69 46 70 @Override 47 71 public IEventType apply(ITaskTreeNode treeNode) { … … 50 74 }; 51 75 } 52 76 }
Note: See TracChangeset
for help on using the changeset viewer.