RFR: 8368478: RichTextArea: add IME support

Andy Goryachev angorya at openjdk.org
Wed Oct 29 17:50:59 UTC 2025


On Wed, 29 Oct 2025 12:45:13 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Adds Input Method Editor (IME) support to `RichTextArea`/`CodeArea`.
>> 
>> Tested on macOS and Windows 11 with Japanese and Chinese (pinyin) input methods.
>> Please test this on Linux, even though there is no platform-specific code in this PR (should work the same way it does in `TextArea`/`TextField`)
>> 
>> For testing, one can use the updated Monkey Tester
>> https://github.com/andy-goryachev-oracle/MonkeyTest
>> (optionally enable IME events in stdout with Logging -> IME Monitor)
>
> modules/jfx.incubator.richtext/src/main/java/com/sun/jfx/incubator/scene/control/richtext/TextCell.java line 264:
> 
>> 262:             dy = f.snappedTopInset();
>> 263: 
>> 264:             p = f.rangeShape(start, end); // TODO new api, no null
> 
> Is this "TODO" really related to IME? If not, I recommend removing it.

this code predates [JDK-8357594](https://bugs.openjdk.org/browse/JDK-8357594)
Additional geometry-based Text/TextFlow APIs.  I am planning to migrate to the new API in a follow-up.

Created https://bugs.openjdk.org/browse/JDK-8370902

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1938#discussion_r2474391416


More information about the openjfx-dev mailing list