<Swing Dev> [14] RFR 8225505: ctrl-F1 does not show the tooltip of a menu item (JMenuItems)
Dmitry Markov
dmitry.markov at oracle.com
Wed Aug 7 08:20:59 UTC 2019
Hi Sergey,
I looked into your suggestion again and found that it is possible to use MenuKeyListener inside ToolTipManager without new event generation. So I updated the fix based on your recommendation. Please find the new version here: http://cr.openjdk.java.net/~dmarkov/8225505/webrev.02/ <http://cr.openjdk.java.net/~dmarkov/8225505/webrev.02/>
Thanks,
Dmitry
> On 2 Aug 2019, at 23:57, Sergey Bylokhov <sergey.bylokhov at oracle.com> wrote:
>
> Hi, Dmitry.
>
>> Yes, it is possible to get the same result using the approach you
>> mentioned. Unfortunately registration of MenuKeyListener inside
>> ToolTipManager is not enough. Also we need to generate new
>> MenuKeyEvent with proper source (component) to let the tooltip manager
>> know for which menu element tooltip text should be displayed/hidden
>> (similar thing I did in my proposal, see processToolTipKeyEvent()
>> method).
>> I am sorry but I do not think we have to implement such solution since
>> generation of new events is still necessary plus implementation of
>> MenuKeyListener is required.
>
> Are you sure that the new events a necessary? It will be be really good to implement the fix w/o such events. We cannot sent keyEvents since we never do it before, and it will be good not to sent new MenuKeyEvent. Are you sure that an existed MenuKeyEvent event does not have enough information?(It has the component, path and current MenuSelectionManager).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/swing-dev/attachments/20190807/406c2f45/attachment.html>
More information about the swing-dev
mailing list