RFR: 8301121: RichTextArea Control (Incubator) [v63]
Andy Goryachev
angorya at openjdk.org
Tue Dec 17 20:03:55 UTC 2024
On Tue, 17 Dec 2024 18:42:45 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> Andy Goryachev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> review comments
>
> modules/jfx.incubator.input/src/main/java/jfx/incubator/scene/control/input/InputMap.java line 292:
>
>> 290: */
>> 291: public void unregister(KeyBinding k) {
>> 292: map.put(k, NULL);
>
> Why does this add a `NULL` rather than remove the mapping? I'm trying to understand the difference between this method and `resetKeyBindings` (maybe this is related to my earlier question above?). One thing to consider is that allowing `NULL` values means that there is no way to tell the difference between a key with a `NULL` value and a key that isn't in the map without calling `map.contains`, which you don't expose.
see my previous comment for the use case.
this method disables the key binding, regardless of whether it's done programmatically by the application (as in constructor of the custom RTA), or the skin.
if we are talking about implementation, the NULL basically blocks subsequent lookup in the skin input map.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1524#discussion_r1889141226
More information about the openjfx-dev
mailing list