<Swing Dev> [14] RFR 8225505: ctrl-F1 does not show the tooltip of a menu item (JMenuItems)
Dmitry Markov
dmitry.markov at oracle.com
Thu Aug 1 13:26:12 UTC 2019
Hi Sergey,
Thank you for your feedback. Please find my answer inline.
Thanks,
Dmitry
> On 1 Aug 2019, at 05:20, Sergey Bylokhov <sergey.bylokhov at oracle.com> wrote:
>
> Hi, Dmitry.
>
> On 27.06.2019 02:59, Dmitry Markov wrote:
>> BasicPopupMenuUI.MenuKeyboardHelper should detect tool tip key sequence and forward it to currently highlighted(selected) for further processing.
>
> But in the current proposal currently selected menuItem
> will get a "new" mouse keyPressed event without keyReleased
> event, right? Note that this new events will contradicts the
> spec of MenuSelectionManager.processKeyEvent() which states
> that the menuElements should not process the keyEvents itself.
I agree it is not a good practice to use keyPressed event without corresponding keyReleased. So I added its generation. Please find new version here: http://cr.openjdk.java.net/~dmarkov/8225505/webrev.01/
>
> It is also possible to set the accelerator for the menuitem to
> "F1+CTRL" and I think it should have more priority than the tooltip key.
That’s right. I have changed the order. Now we process tooltip keys right after MenuSelectionManager.processKeyEvent() call, (i.e. an accelerator if it is set takes precedence over tooltip key).
>
> BTW I assume that "ESCAPE" shortcut to hide the tooltip was
> not implemented intentionally.
You are right. It is unnecessary to implement “ESCAPE” shortcut support because ESC key removes all popup menu elements from the screen. If some menu element has visible tooltip it will be hidden automatically due to focus lost event.
>
> --
> Best regards, Sergey.
More information about the swing-dev
mailing list