I'd like to implement some focusing features within a DrawPane.
In particular I'd like to elect a subset of its draw items as focusable and support traversing that set with usual focus control conventions (TAB for moving focus to next focusable elem, SHIFT+TAB for moving focus to previous one).
Actually I don't see any focus related method in DrawItem, while DrawPane provides the canFocus property and many other focus related methods considering the canvas as a single focusable widget, while in my case I want to propagate focus handling to draw items.
Is there any existing support for this kind of scenario?
If not I'd go for implementing from scratch some virtual focus features within the drawpane this way:
* add a field holding a reference to the focused item
* provide some visual representation (i.e. a dotted rectangle around the virtually focused elem)
* maintain some sort of structure that gives me the next/previous virtually focusable item references
* add a KeyPressHandler to intercept keyboard events and eventually dispatch them to the relevant virtually focused
* add a FocusChangedHandler to control the virtual focus activation
In particular I'd like to elect a subset of its draw items as focusable and support traversing that set with usual focus control conventions (TAB for moving focus to next focusable elem, SHIFT+TAB for moving focus to previous one).
Actually I don't see any focus related method in DrawItem, while DrawPane provides the canFocus property and many other focus related methods considering the canvas as a single focusable widget, while in my case I want to propagate focus handling to draw items.
Is there any existing support for this kind of scenario?
If not I'd go for implementing from scratch some virtual focus features within the drawpane this way:
* add a field holding a reference to the focused item
* provide some visual representation (i.e. a dotted rectangle around the virtually focused elem)
* maintain some sort of structure that gives me the next/previous virtually focusable item references
* add a KeyPressHandler to intercept keyboard events and eventually dispatch them to the relevant virtually focused
* add a FocusChangedHandler to control the virtual focus activation
Comment