<AWT Dev> delivery of mouse events

Oleg Sukhodolsky Oleg.Sukhodolsky at Sun.COM
Wed Jan 30 01:18:11 PST 2008


Hi Brent,

(sorry for the delay I had a "diving session" with another project)

Brent Baccala wrote:
> On Tue, 22 Jan 2008, Oleg Sukhodolsky wrote:
> 
>> So, if I've got the changes wright, you would like to have an option 
>> to disable coalescing of mouse events.  Am I right?
>> IMHO it is a good idea and I would be happy to have this feature in 
>> our code.
> 
> Yes, that's right.
> 
> I'm thinking about adding methods to Component, say
> enableMouseEventCoalescing() and disableMouseEventCoalescing().

it is interesting thing, but be aware that EventQueue performs some 
coalescing for PaitnEvents and for MouseEvents even if component doesn't 
coalesce them (see EventQueue.coalesceEvent()).
So, it will not be enough to add these methods to Componet.

> The default would be on, and it would then be up to the app to turn
> this off on specific Components.
> 
> Not sure about Component nesting - I guess the simplest thing would be
> to leave it up to the app to turn this off everywhere in a nested
> chain of Components, but maybe that should happen automatically.

I'd also leave this w/o changing, though someone may say that this is 
inconvenient for Swing (or other "strange" AWT-based libraries ;)

Regards, Oleg

> 
> I don't know enough about how Java passes events between Components to
> really say for sure.
> 
> 
> 
>                     -bwb
> 
>                     Brent Baccala
>                     cosine at freesoft.org



More information about the awt-dev mailing list