RFR: 8274854: Mnemonics for menu containing numeric text not working [v2]

Ajit Ghaisas aghaisas at openjdk.java.net
Fri Oct 29 13:48:19 UTC 2021


On Fri, 29 Oct 2021 12:34:50 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

>> modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/behavior/TextBinding.java line 238:
>> 
>>> 236:         }
>>> 237: 
>>> 238:         return !isExtendedMnemonic(s, position);
>> 
>> I am not sure why do we need to check for isExtendedMnemonic() inside isSimpleMnemonic() implementation.
>> These two methods should be separate and it is up to the callers to check and take appropriate action.
>
> Done.

The corresponding comment for the method isSimpleMnemonic() also needs correction.
You can limit it to -

    /**
     * Determines whether the string contains a simple mnemonic at the specified position.
     * A simple mnemonic is any two-character string similar to "_x", where x is not an
     * underscore or a whitespace character.
     */

-------------

PR: https://git.openjdk.java.net/jfx/pull/647


More information about the openjfx-dev mailing list