RFR: 8373936: RichEditorDemoApp enhancements [v4]

Lukasz Kostyra lkostyra at openjdk.org
Wed Jan 28 11:08:12 UTC 2026


On Wed, 21 Jan 2026 19:49:27 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> The goal of this work is to deliver a sufficiently complete implementation of an editor application based on the RichTextArea that users can adopt as is or use as, or use it as a foundation for a more complex editor.
>> 
>> Improvements include:
>> - syncing the toolbar with current character attributes
>> - improved toolbar behavior in regards to character attributes, utilizing the new 'insertStyles' property [JDK-8374035](https://bugs.openjdk.org/browse/JDK-8374035)
>> - paragraph format dialog, with the associated toolbar button and the main menu item
>> 
>> <img width="676" height="678" alt="Screenshot 2026-01-15 at 12 01 44" src="https://github.com/user-attachments/assets/9c96e4d2-21f3-43d2-b009-01d6887747f8" />
>> 
>> Test case related to [JDK-8374035](https://bugs.openjdk.org/browse/JDK-8374035):
>> - type something
>> - place cursor at the middle of the typed text and hit command-B or ctrl-B on Win/Linux
>> - notice how the formatting toolbar highlights [b] button indicating that the style for next character to be inserted has changed to bold
>> - type something and confirm that inserted text is bold
>> the new style is captured only in the toolbar UI, so clicking on some other part of the text reverts the bold button to the unselected state.
>
> Andy Goryachev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 37 commits:
> 
>  - Merge branch 'master' into 8373936.editor
>  - actions
>  - Merge branch 'master' into 8373936.editor
>  - Merge branch 'master' into 8373936.editor
>  - Merge branch 'master' into 8373936.editor
>  - whitespace
>  - whitespace
>  - Merge branch '8374035.insert.styles' into 8373936.editor
>  - 2026
>  - Merge branch 'master' into 8374035.insert.styles
>  - ... and 27 more: https://git.openjdk.org/jfx/compare/422d3a95...df6dbb17

Looks good, runs good as well! I left one very minor nitpicky comment.

apps/samples/RichTextAreaDemo/src/com/oracle/demo/richtext/editor/Actions.java line 493:

> 491:             return;
> 492:         } else if (start.equals(end)) {
> 493:             return;

Minor: could technically merge this if-else block into one


if (start == null || start.equals(end)) {
    return;
}

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

Marked as reviewed by lkostyra (Reviewer).

PR Review: https://git.openjdk.org/jfx/pull/2026#pullrequestreview-3715970049
PR Review Comment: https://git.openjdk.org/jfx/pull/2026#discussion_r2736020929


More information about the openjfx-dev mailing list