RFR: 8371070: RichParagraph enhancements [v8]
Andy Goryachev
angorya at openjdk.org
Mon Dec 22 22:08:16 UTC 2025
On Mon, 22 Dec 2025 21:48:28 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> Andy Goryachev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits:
>>
>> - javadoc
>> - cleanup
>> - Merge branch 'master' into 8366198.rbuilder
>> - rich paragraph builder api
>> - Merge branch 'master' into 8371070.enhance
>> - npe
>> - merge
>> - Merge branch 'master' into 8371070.enhance
>> - Merge branch 'master' into 8371070.enhance
>> - Merge branch 'master' into 8371070.enhance
>> - ... and 2 more: https://git.openjdk.org/jfx/compare/03612e1b...05136fe1
>
> modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/model/RichTextModel.java line 94:
>
>> 92: * @since 26
>> 93: */
>> 94: protected RichParagraph.Builder buildParagraph(int index) {
>
> The name `buildParagraph` implies that this method build something, but it actually returns a builder. Perhaps `paragraphBuilder` would be a better method name?
This method indeed builds the paragraph, but instead of returning the paragraph itself, it returns the builder with the data - so a custom model can override it to apply post-processing, since the RichParagraph itself is immutable.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1966#discussion_r2641376551
More information about the openjfx-dev
mailing list