| Summary: | Provide convenience method for disregarding event processing when a more specific target part can be found. | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Matthias Wienand <matthias.wienand> |
| Component: | GEF MVC | Assignee: | gef-inbox <gef-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 0.2.0 | ||
| Target Milestone: | 4.0.0 / 3.11.0 (Neon) M5 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Matthias Wienand
As the filter mechanism is JavaFX-specific, I created an AbstractFXInteractionPolicy that provides two convenience methods #isRegistered(EventTarget) and #isRegisteredForHost(EventTarget). These convenience methods are now used within the interaction policies that need filtering. For example, the FXHoverOnHoverPolicy is guarded as follows:
public void hover(MouseEvent e) {
// do nothing in case there is an explicit event target
if (isRegistered(e.getTarget()) && !isRegisteredForHost(e.getTarget())) {
return;
}
// ...
}
The code is published on the master branch, therefore, I resolve this ticket as fixed for 3.11.0M5.
|