Re: RichTextArea: RichTextArea doesn't have a setText method, but CodeArea does

2025-05-01 Thread Andy Goryachev
x-dev@openjdk.org Subject: Re: RichTextArea: RichTextArea doesn't have a setText method, but CodeArea does To be honest, I think this will create problems when working with the RichTextArea API. Why? Because every developer will intuitively look for setText. For example, TextArea —https://

Re: RichTextArea: RichTextArea doesn't have a setText method, but CodeArea does

2025-05-01 Thread Kevin Rushforth
It would be easy enough to add one as a convenience method, if it was deemed useful enough. Andy can comment further. -- Kevin On 5/1/2025 10:41 AM, PavelTurk wrote: To be honest, I think this will create problems when working with the RichTextArea API. Why? Because every developer will intu

Re: RichTextArea: RichTextArea doesn't have a setText method, but CodeArea does

2025-05-01 Thread PavelTurk
To be honest, I think this will create problems when working with the RichTextArea API. Why? Because every developer will intuitively look for setText. For example, TextArea —https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/TextArea.html — has setText. CodeArea has setText. But

Re: RichTextArea: RichTextArea doesn't have a setText method, but CodeArea does

2025-05-01 Thread Kevin Rushforth
Note that there is an easy way to set plain text if you are using a writable model: rta.clear(); rta.appendText(String text); -- Kevin On 5/1/2025 7:55 AM, Andy Goryachev wrote: Intentionally: the CodeArea model contains plain text, while in the RichTextArea the content depends on the mode

Re: RichTextArea: RichTextArea doesn't have a setText method, but CodeArea does

2025-05-01 Thread Andy Goryachev
Intentionally: the CodeArea model contains plain text, while in the RichTextArea the content depends on the model. It may not contain anything and be generated on the fly. -andy From: openjfx-dev on behalf of PavelTurk Date: Thursday, May 1, 2025 at 05:40 To: openjfx-dev@openjdk.org Sub