RFR: 8301121: RichTextArea Control (Incubator) [v53]

Kevin Rushforth kcr at openjdk.org
Tue Dec 3 18:24:00 UTC 2024


On Tue, 3 Dec 2024 16:45:45 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Incubating a new feature - rich text control, **RichTextArea**, intended to bridge the functional gap with Swing and its StyledEditorKit/JEditorPane. The main design goal is to provide a control that is complete enough to be useful out-of-the box, as well as open to extension by the application developers.
>> 
>> This is a complex feature with a large API surface that would be nearly impossible to get right the first time, even after an extensive review. We are, therefore, introducing this in an incubating module, **jfx.incubator.richtext**. This will allow us to evolve the API in future releases without the strict compatibility constraints that other JavaFX modules have.
>> 
>> Please check out two manual test applications - one for RichTextArea (**RichTextAreaDemoApp**) and one for the CodeArea (**CodeAreaDemoApp**). Also, a small example provides a standalone rich text editor, see **RichEditorDemoApp**.
>> 
>> Because it's an incubating module, please focus on the public APIs rather than implementation.  There **will be** changes to the implementation once/if the module is promoted to the core by popular demand.  The goal of the incubator is to let the app developers try the new feature out. 
>> 
>> **References**
>> 
>> - Proposal: https://github.com/andy-goryachev-oracle/Test/blob/main/doc/RichTextArea/RichTextArea.md
>> - Discussion points: https://github.com/andy-goryachev-oracle/Test/blob/main/doc/RichTextArea/RichTextAreaDiscussion.md
>> - API specification (javadoc): https://cr.openjdk.org/~angorya/RichTextArea/javadoc
>> - RichTextArea RFE: https://bugs.openjdk.org/browse/JDK-8301121
>> - Behavior doc: https://github.com/andy-goryachev-oracle/jfx/blob/8301121.RichTextArea/doc-files/behavior/RichTextAreaBehavior.md
>> - CSS Reference: https://cr.openjdk.org/~angorya/RichTextArea/javadoc/javafx.graphics/javafx/scene/doc-files/cssref.html
>> - InputMap (v3): https://github.com/andy-goryachev-oracle/Test/blob/main/doc/InputMap/InputMapV3.md
>> - Previous Draft PR: https://github.com/openjdk/jfx/pull/1374
>
> Andy Goryachev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review comments

Here are a few comments on the merge of master to pick up the build changes for supporting incubator modules.

I'll get back to the API review next.

build.gradle line 2879:

> 2877: 
> 2878:     // FIXME: KCR
> 2879: //    processResources {

I recommend deleting this commented-out block unless you plan to deliver resources as part of the `jfx.incubator.input` module.

build.gradle line 2968:

> 2966: 
> 2967:     // FIXME: KCR
> 2968: //    processResources {

I recommend deleting this commented-out block unless you plan to deliver resources as part of the `jfx.incubator.richtext` module.

build.gradle line 4633:

> 4631:         project(":web")
> 4632:     ]
> 4633: 

Minor: this blank line looks like a leftover from the merge of master.

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

PR Review: https://git.openjdk.org/jfx/pull/1524#pullrequestreview-2466096692
PR Review Comment: https://git.openjdk.org/jfx/pull/1524#discussion_r1868180155
PR Review Comment: https://git.openjdk.org/jfx/pull/1524#discussion_r1868180564
PR Review Comment: https://git.openjdk.org/jfx/pull/1524#discussion_r1868182047


More information about the openjfx-dev mailing list