| Summary: | Add support for handling keyboard focus | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Alexander Nyßen <nyssen> |
| Component: | GEF MVC | Assignee: | Matthias Wienand <matthias.wienand> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | matthias.wienand |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Alexander Nyßen
I added an FXFocusTool to keep track of the viewer focus and extended the FXSelectOnClickPolicy to also change the IFocusModel, i.e. keep track of the focused part (and thus renamed it to FXFocusAndSelectOnClickPolicy).
To synchronize the IFocusModel and the JavaFX "focusOwner" an FXFocusBehavior requests focus for its host visual ("focusOwner") when its host is focused (IFocusModel) and the FXClickDragTool consumes mouse press events to prevent default JavaFX event handlers from changing the "focusOwner".
The focus information is evaluated when generating selection feedback. Focus information is encoded in the feedback effect color. Selection information is encoded in the feedback stroke color:
selected (primary) and focused: black stroke, blue effect
selected (secondary) and focused: grey stroke, blue effect
selected (primary) and not focused: black stroke, grey effect
selected (secondary) and not focused: grey stroke, grey effect
The code is published on the master branch. Therefore, I am changing the status to RESOLVED, FIXED.
|