Proposal: RichTextArea Control (Incubator)

Kevin Rushforth kevin.rushforth at oracle.com
Fri Mar 1 22:39:49 UTC 2024


All,

Thank you to everyone who has provided feedback on the RichText proposal 
so far. If I could characterize the response, there are some developers 
who want at least a basic rich text control available as part of the 
JavaFX core and other developers who don't think that such a control 
should be in the JavaFX core at all.

This doesn't really come as a surprise to me, since rich text is a 
complex feature, and we really don't have enough feedback to know how 
much of it -- if any -- belongs in the core of JavaFX, and if it does, 
what form the eventual API should take.

I happen to think there is value in providing at least a basic rich text 
control. One of the main reasons for proposing this as an incubating 
feature in a separate, incubator module, is that we don't know whether 
and how application developers will want to use this, and whether this 
proposal hits the sweet spot of a sufficiently full-featured control 
without being too complex, especially in terms of API surface which is 
something I am concerned about.

As an incubating feature, we have the ability to modify the API and 
implementation in incompatible ways in response to feedback, or to drop 
it from the core entirely, perhaps making it available some other way. 
Shipping this in an incubator module is a good way to get that feedback. 
That doesn't mean that it can go in before it is ready. Even as an 
incubator, this will require a fairly long review process; incubator 
modules are not a way to deliver features in early stages of development 
nor "experimental" features.

If this goes in as an incubating feature in some future release of 
JavaFX, subsequent releases will do one of three things: 1) evolve the 
API in response to feedback; 2) finalize the API; 3) drop the API. As an 
aside, I hope that the updated incubator JEP makes this a little more clear.

I'm sure Andy will welcome additional feedback, especially on the 
concepts and on the API. I haven't done a complete review of the API 
myself, and there are areas I am concerned about, but that's what the 
review process will discuss.

-- Kevin


On 2/21/2024 10:07 AM, Andy Goryachev wrote:
>
> Dear JavaFX developers:
>
> We would like to propose 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, 
> *javafx.incubator.richtext*.   This will allow us to evolve the API in 
> future releases without the strict compatibility constraints that 
> other JavaFX modules have.
>
> Please take a look at the proposal [0], a list of discussion points 
> [1], and the API Specification (javadoc) [2]. While the proposed API 
> is ready for review, it isn't complete nor set in stone. We are 
> looking for feedback, and will update the proposal based on the 
> suggestions we receive from the community.  We encourage you to 
> comment either in the mailing list, or by leaving comments inline in a 
> draft pull request [3].  For context, the links to the original RFE 
> [4] and a list of missing APIs related to rich text [5] are provided 
> below.
>
> Sincerely,
>
> Your friendly JavaFX development team.
>
> References
>
> [0] Proposal: 
> https://github.com/andy-goryachev-oracle/Test/blob/rich.jep.review/doc/RichTextArea/RichTextArea.md
>
> [1] Discussion points: 
> https://github.com/andy-goryachev-oracle/Test/blob/rich.jep.review/doc/RichTextArea/RichTextAreaDiscussion.md
>
> [2] API specification (javadoc): 
> https://cr.openjdk.org/~angorya/RichTextArea/javadoc
>
> [3] Draft Pull Request for API comments and feedback: 
> https://github.com/openjdk/jfx/pull/1374
>
> [4] RichTextArea RFE: https://bugs.openjdk.org/browse/JDK-8301121
>
> [5] Missing APIs related to rich text control: 
> https://bugs.openjdk.org/browse/JDK-8300569
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240301/8b7455fc/attachment.htm>


More information about the openjfx-dev mailing list