RFR: 8370140: RichTextArea: line endings [v6]
Kevin Rushforth
kcr at openjdk.org
Wed Nov 5 21:51:17 UTC 2025
On Wed, 5 Nov 2025 20:20:27 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> Actually, I thought of a bigger concern. Having a writable attribute in both the control and the model is not going to give coherent results in the case where you have more than one view on the same model. So you might need to rethink the idea of having a writable property on the view (the control) while also having state (via a writable attribute) on the model.
>
> Good point!
> What do you think we should do then?
>
> I should probably move the setter and getter to the RichTextArea class then, and remove the property altogether.
>
> Any custom UI can always create its own property for line ending and deal with the model directly.
Making the property in the model be the primary and having the RTA setter/getter forward to the model makes it a lot like setUndoRedoEnable, which seems like a good choice. The state is only in one place (the model) with convenience methods in the control.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1944#discussion_r2496294565
More information about the openjfx-dev
mailing list