Changeset 1056 for trunk/autoquest-core-tasktrees/src
- Timestamp:
- 02/01/13 12:08:09 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/nodeequality/GUIEventTaskComparisonRule.java
r1043 r1056 3 3 import de.ugoe.cs.autoquest.eventcore.gui.IInteraction; 4 4 import de.ugoe.cs.autoquest.eventcore.gui.MouseClick; 5 import de.ugoe.cs.autoquest.eventcore.gui.MouseDoubleClick; 5 6 import de.ugoe.cs.autoquest.eventcore.gui.MouseDragAndDrop; 6 7 import de.ugoe.cs.autoquest.eventcore.gui.TextInput; … … 91 92 return compareMouseClicks((MouseClick) interaction1, (MouseClick) interaction2); 92 93 } 94 else if ((interaction1 instanceof MouseDoubleClick) && 95 (interaction2 instanceof MouseDoubleClick)) 96 { 97 return compareMouseDoubleClicks 98 ((MouseDoubleClick) interaction1, (MouseDoubleClick) interaction2); 99 } 93 100 else if ((interaction1 instanceof MouseDragAndDrop) && 94 101 (interaction2 instanceof MouseDragAndDrop)) … … 187 194 /** 188 195 * <p> 196 * compares two mouse double clicks. If both double clicks have the same coordinates, they are 197 * lexically equal. Otherwise, they are semantically equal. 198 * </p> 199 * 200 * @param interaction1 the first mouse double click to compare 201 * @param interaction2 the second mouse double click to compare 202 * 203 * @return as described 204 */ 205 private NodeEquality compareMouseDoubleClicks(MouseDoubleClick interaction1, 206 MouseDoubleClick interaction2) 207 { 208 int x1 = interaction1.getX(); 209 int x2 = interaction2.getX(); 210 int y1 = interaction1.getY(); 211 int y2 = interaction2.getY(); 212 213 if ((x1 == x2) && (y1 == y2)) { 214 return NodeEquality.LEXICALLY_EQUAL; 215 } 216 else { 217 return NodeEquality.SEMANTICALLY_EQUAL; 218 } 219 } 220 221 /** 222 * <p> 189 223 * compares two mouse drag and drops. If both drag and drops have the same start and end 190 224 * coordinates, they are lexically equal. Otherwise, they are semantically equal.
Note: See TracChangeset
for help on using the changeset viewer.