Changeset 1887 for trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRule.java
- Timestamp:
- 03/05/15 11:37:37 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRule.java
r1294 r1887 341 341 } 342 342 else { 343 // pressing a key on the same target, e.g. a text field, usually has the same 344 // semantics 343 345 return TaskEquality.SEMANTICALLY_EQUAL; 344 346 } … … 389 391 } 390 392 393 // performing drag and drops on the same target usually have the same semantic meaning, 394 // i.e., the same function is called 391 395 return TaskEquality.SEMANTICALLY_EQUAL; 392 396 } … … 459 463 } 460 464 else { 465 // in most situations, the coordinates are not of interest. But if they are, then 466 // the event can be at most semantically equal 461 467 return TaskEquality.SEMANTICALLY_EQUAL; 462 468 } … … 468 474 /** 469 475 * <p> 470 * compares two mouse button interactions such as clicks, mouse button down, or double clicks. 471 * If both interactions have the same coordinates, they are lexically equal. Otherwise, they 472 * are semantically equal. Mouse clicks for which the coordinates make no lexical difference 473 * (see {@link #clickCoordinatesMakeLexicalDifference(IEventTarget)}) are treated as 474 * lexically equal. 475 * </p> 476 * <p> 477 * The provided equality level can be used to restrict the quality check to the given level. 478 * This is done for optimization purposes. The returned equality level is as concrete as 479 * the provided one. It may be more concrete if there is no difference regarding the 480 * comparison on the levels. 481 * </p> 482 * 483 * @param interaction1 the first mouse button interaction to compare 484 * @param interaction2 the second mouse button interaction to compare 485 * @param eventTarget the event target on which the interactions happened (used within 486 * special comparisons like mouse clicks on buttons, where the coordinates 487 * can be ignored) 476 * compares two scrolls and considers them as lexically equal if they have the same coordinates. 477 * Otherwise, they are syntactically equal as the happen on the same target 478 * </p> 479 * 480 * @param interaction1 the first scroll interaction to compare 481 * @param interaction2 the second scroll interaction to compare 488 482 * @param equalityLevel the equality level to be checked for 489 483 * … … 494 488 TaskEquality equalityLevel) 495 489 { 496 if (equalityLevel.isAtLeast(TaskEquality. SYNTACTICALLY_EQUAL)) {490 if (equalityLevel.isAtLeast(TaskEquality.LEXICALLY_EQUAL)) { 497 491 int x1 = interaction1.getXPosition(); 498 492 int x2 = interaction2.getXPosition(); … … 505 499 } 506 500 507 return TaskEquality.S EMANTICALLY_EQUAL;501 return TaskEquality.SYNTACTICALLY_EQUAL; 508 502 } 509 503
Note: See TracChangeset
for help on using the changeset viewer.