classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] FYI: SwingUtilities.processKeyBindings() implemented


From: Anthony Balkissoon
Subject: Re: [cp-patches] FYI: SwingUtilities.processKeyBindings() implemented
Date: Mon, 19 Dec 2005 11:25:05 -0500

On Sat, 2005-12-17 at 00:30 +0000, Roman Kennke wrote:
> Hi,
> 
> thanks to the work done by Anthony Balkissoon (KeyboardManager) I finally
> could make some sense out of the method
> SwingUtilities.processKeyBindings() which previously caused headaches to
> me :-)
> 
> What I think what this method actually should do (and this is how I
> implemented it) is, that it processes key bindings for a
> java.awt.Component (that is not derived from JComponent) that are in the
> WHEN_IN_FOCUSED_WINDOW scope. This is necessary because otherwise such
> events would get lost without notifying components with such bindings.
> However, I am not sure how this method should be triggered. From within
> Component.processKeyEvent() maybe, but calling into Swing code from AWT
> seems so ugly...

My interpretation was that it was up to the user to call this method if
they subclassed JComponent and didn't call super.processKeyEvent from
the subclass' processKeyEvent method.  Or, if they wrote Swing
Components that were not derived from JComponent .. I still thought it
was up to them to call it.  Things like JFrame, which aren't derived
from JComponent, shouldn't call this method internally.

Thanks for implementing this, I believe that was actually in my PR list.

--Tony





reply via email to

[Prev in Thread] Current Thread [Next in Thread]