RFR: 8301121: RichTextArea Control (Incubator) [v7]
Kevin Rushforth
kcr at openjdk.org
Fri Sep 13 20:57:13 UTC 2024
On Mon, 9 Sep 2024 16:15:22 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
> > This method seems redundant: `fromInlineStyle(style)` and `fromStyles(style)` are equivalent. Do we need both?
>
> These are not the same.
>
> `fromInlineStyle(String)` accepts as single string containing fx-style CSS with one more more styles. Example: `"-fx-fill:red; -fx-font-size:200%;"`
>
> `fromStyles(String style, String ... names)` is more generic, allows for setting the inline style as well as CSS stylesheet names.
My point was that `fromStyles` with an empty list of names should do exactly the same thing as `fromInlineStyle`. Looking at the code that does appear to be the case (and if not, I would wonder _why_ not). So, do we really need `fromInlineStyle`?
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1524#issuecomment-2350153718
More information about the openjfx-dev
mailing list