Re: Understanding the new event model

David Crawshaw <[email protected]> Tue, 6 Jan 2004 11:41:59 +1000
Newsgroups gmane.comp.java.xwt.widgets
Message-ID <[email protected]>
On 06/01/2004, at 11:10 AM, Charles Goodwin wrote:
> "XWT figures out which child of the current box contains the mouse
> (taking into account that some boxes may cover up others) and writes 
> the
> key and value to that box."
>
> Why is this needed or useful for keyboard events?

Having Keyboard events filter down to a target is very useful. The 
problem is, the core doesn't have an initial target. Instead of some 
ugly hack where we 'tell' the core what the initial target is, it just 
makes it the same place as any other event.

xwt.theme.surface catches the Keyboard events the second they hit, and 
redirects them to the currently focused widget.

It works really well. You can consider it a default 'focus follows 
mouse' system.

d