RFR: 8371070: RichParagraph enhancements [v9]
Andy Goryachev
angorya at openjdk.org
Mon Dec 22 23:29:19 UTC 2025
> This PR addresses the user feedback:
>
> In RichParagraph you have a note to make getSegments() public. It would be helpful if it was.
>
>
> The problem being solved here is to allow the developers to easily add functionality to the existing `RichTextModel` (and its storage implementation) without creating a new model from scratch.
>
> This is done in two parts:
>
> 1. Allowing the custom model to alter the paragraph by giving access to its Builder via a new protected method
>
>
> protected RichParagraph.Builder buildParagraph(int index)
>
>
> 2. Adding two methods that give access to the segments in the `RichParagraph` and `RichParagraph.Builder` classes:
>
> - getSegmentCount()
> - getSegment(int index)
>
> NOTE: Even though returning an (immutable) List might be considered "more useful", doing so would necessitate creating a copy - something I do want to avoid.
Andy Goryachev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 14 commits:
- prepare paragraph
- Merge branch 'master' into 8371070.enhance
- 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
- ... and 4 more: https://git.openjdk.org/jfx/compare/b39e1faa...dd3ec196
-------------
Changes: https://git.openjdk.org/jfx/pull/1966/files
Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1966&range=08
Stats: 275 lines in 8 files changed: 198 ins; 43 del; 34 mod
Patch: https://git.openjdk.org/jfx/pull/1966.diff
Fetch: git fetch https://git.openjdk.org/jfx.git pull/1966/head:pull/1966
PR: https://git.openjdk.org/jfx/pull/1966
More information about the openjfx-dev
mailing list