[Top][All Lists]

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

[cp-patches] Patch: WHEN_IN_FOCUSED_WINDOW bindings implemented

From: Anthony Balkissoon
Subject: [cp-patches] Patch: WHEN_IN_FOCUSED_WINDOW bindings implemented
Date: Wed, 09 Nov 2005 18:20:48 -0500

Thanks to rabbit78 and fitzsim I figured out the problems discussed
earlier on the list.  This patch re-registers WHEN_IN_FOCUSED_WINDOW
bindings when a JComponent is added to a Container because its top level
container may have changed.  The testcase from my last email now works
even when the button is added to the frame after having it's bindings
registered, and the modified test case is attached to this email.

Note there is still some inefficiency that I can work on.  In both
places that we update (addNotify and updateComponentInputMap) right now
we just remove all bindings and then add them back (and in fact there
may be some strange cases where this is incorrect ... I will have to do
more in depth tests tomorrow), so there is work to be done here still.

2005-11-09  Anthony Balkissoon  <address@hidden>

        * javax/swing/
        (addNotify): Unregister all WHEN_IN_FOCUSED_WINDOW bindings for this 
        JComponent and then register them with its (potentially) new top level
        ancestor.  Removed unncessary code that copied regular (WHEN_FOCUSED)
        key bindings up the parent hierarchy.  


Attachment: WHEN_IN_FOCUSED_WINDOW3.diff
Description: Text Data

Description: Text Data

reply via email to

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