Dear Andy, others,

Thank you for your feedback. Yes, having a one-line TextArea, mocking up a
TextField, that contains a longer text with some sub-strings being able to
style is enough for my use-case.

Anyhow, I agree with others that having the possibility to "style" parts of
other controls like Label, TextField, etc would be very astonishing. This
might introduce a lot of complexity, I guess.

Having said that, this would offer a unique selling point and go beyond
what other external libraries did. Anyhow, this would most probably
facilitate such work in the future.

Best,

-- Daniel


On Thu, Feb 22, 2024 at 5:29 PM Andy Goryachev <andy.goryac...@oracle.com>
wrote:

> Dear Daniel:
>
>
>
> Thank you for your kind words!
>
>
>
> Re: StyledTextArea/TextField.
>
>
>
> This is a very interesting question.  It is definitely out of scope right
> now, but we can certainly talk about it.
>
>
>
> One major difference between the new control and the regular
> TextField/TextArea is that we add a separate rich text model, while
> TextField/Area expose a String 'text' property.  We could think of using
> the same model, or constructing some kind of StyledDocument, but in any
> case it won't be a drop-in replacement for TextField/TextArea.
>
>
>
> The other aspect is the visuals.  Whereas a StyledTextArea might require
> the same kinds of surrounding toolbars and controls to function as a
> useable editor (font, style, color, etc.), how would a StyledTextField look?
>
>
>
> At the same time, it is possible to easily configure RichTextArea to look
> like a styled text area or one-line styled text field.  It is also possible
> that another use case exists which requires a dedicated control?
>
>
>
>
>
> Re: spell checker.
>
>
>
> Yes, there is a way to add a "squiggly line", see here:
>
>
> https://github.com/andy-goryachev-oracle/Test/blob/rich.jep.review/doc/RichTextArea/RichTextArea.md#creating-a-paragraph
>
>
>
> At this moment, this functionality is not a part of any standard model,
> but is certainly possible.
>
>
>
> It might be also possible to add a similar functionality to the regular
> TextField/TextArea using public APIs, simply by adding a "squiggly" line
> shape over the standard control.  Just a thought.
>
>
>
> What do you think?
>
>
>
> -andy
>
>
>
>
>
>
>
> *From: *Daniel Peintner <daniel.peint...@gmail.com>
> *Date: *Thursday, February 22, 2024 at 03:07
> *To: *Andy Goryachev <andy.goryac...@oracle.com>
> *Cc: *openjfx-dev@openjdk.org <openjfx-dev@openjdk.org>
> *Subject: *[External] : Re: Proposal: RichTextArea Control (Incubator)
>
> Hi Andy, others,
>
>
>
> I highly appreciate and welcome the effort of a built-in RichTextArea 👍.
>
>
>
> A question that popped up in my mind is whether this work might include
> work in the area of *rich* TextField also? Probably it is out of scope.
> Anyhow, JavaFX Textfields are used in even more areas in UI controls like
> in tables etc and having the possibility to style them would be similarly
> convincing.
>
>
>
> As you might know, some alternative *external* solutions like RichTextFX
> do provide next to StyleClassedTextArea also StyleClassedTextField.
>
>
>
> Anyway, thank you very very much for the continuous development.
>
>
>
> Sincerely,
>
>
>
> -- Daniel
>
>
>
> P.S: Maybe just one line about the use case I have in mind. We do offer
> (based on RichTextFX) the ability to do "spell checking" on text (like you
> know from all word processors). A red underline shows a possible mistake
> and a ContextMenu offers fixes. This red line is therefore needed for text
> in TextArea but also for text in TextField
>
>
>
>
>
> On Wed, Feb 21, 2024 at 7:07 PM Andy Goryachev <andy.goryac...@oracle.com>
> 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
> <https://urldefense.com/v3/__https:/github.com/andy-goryachev-oracle/Test/blob/rich.jep.review/doc/RichTextArea/RichTextArea.md__;!!ACWV5N9M2RV99hQ!IlQ3CEOYq-2crYaLlWlt1Ew42B_xiNLnZcLfQ3wun2P4L_fRBJamLh4bu85KnkYW5vrsEW9AOHTpAEdsMKsAlCdn-SoW9xQ$>
>
> [1] Discussion points:
> https://github.com/andy-goryachev-oracle/Test/blob/rich.jep.review/doc/RichTextArea/RichTextAreaDiscussion.md
> <https://urldefense.com/v3/__https:/github.com/andy-goryachev-oracle/Test/blob/rich.jep.review/doc/RichTextArea/RichTextAreaDiscussion.md__;!!ACWV5N9M2RV99hQ!IlQ3CEOYq-2crYaLlWlt1Ew42B_xiNLnZcLfQ3wun2P4L_fRBJamLh4bu85KnkYW5vrsEW9AOHTpAEdsMKsAlCdn8rIp1eU$>
>
> [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
> <https://urldefense.com/v3/__https:/github.com/openjdk/jfx/pull/1374__;!!ACWV5N9M2RV99hQ!IlQ3CEOYq-2crYaLlWlt1Ew42B_xiNLnZcLfQ3wun2P4L_fRBJamLh4bu85KnkYW5vrsEW9AOHTpAEdsMKsAlCdnd7ZTRlQ$>
>
> [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
>
>
>
>

Reply via email to