[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-swing-dev
Subject:    Re: <Swing Dev> [9] Review Request for 7172652: With JDK 1.7 text field does not obtain focus when u
From:       Alexander Scherbatiy <alexandr.scherbatiy () oracle ! com>
Date:       2015-04-28 13:31:10
Message-ID: 553F8B9E.1090904 () oracle ! com
[Download RAW message or body]


   Is it possible to make code shorter by adding methods like:
   putOnRelease(InputMap inputMap, int keyCode, int modifiers)
   removeOnRelease(InputMap inputMap, int keyCode, int modifiers)

   Thanks,
   Alexandr.

On 4/20/2015 5:53 PM, Semyon Sadetsky wrote:
> Hello,
>
> please review a fix for JDK9:
>
> webrev: http://cr.openjdk.java.net/~ssadetsky/7172652/webrev.00/
> bug: https://bugs.openjdk.java.net/browse/JDK-7172652
>
> ***ROOT CAUSE
> This is a bug in Label UI's key release event processing routine for 
> key mnemonics: only one release event is captured instead of two (Alt 
> release and the mnemonic key release). The Alt release event goes up 
> on hierarchy and is captured by the parent internal frame's menu bar 
> for which Alt key release means selection change event under the 
> Windows system LnF.
>
> ***SOLUTION
> Change key release event handling logic to capture events from both 
> Alt modifier and the key. The logic takes into account that when the 
> first release key event come it transfers focus back to the field so 
> the second key release event should be captured from any window 
> component.
>
> ***TESTING
> A simple scenario is written to exclusively cover the situation.
>
> --Semyon
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic