Convenience factories for Border and Background
Robert Lichtenberger
r.lichtenberger at gmail.com
Thu Apr 22 14:32:48 UTC 2021
I would like this, I am not a big fan of CSS everywhere and this would make
small examples easier to read/write.
Am Do., 22. Apr. 2021 um 15:47 Uhr schrieb Nir Lisker <nlisker at gmail.com>:
> Hi,
>
> Many times when I want to create a simple solid Background or Border, it is
> quite a hassle because of the configurability these classes have:
>
> new Border(new BorderStroke(Color. BLACK, BorderStrokeStyle.SOLID, null,
> null));
> new Background(new BackgroundFill(Color.BLACK, null, null));
>
> I was thinking of adding convenience factory methods
>
> Border.of(Paint stroke), or Border.stroke(Paint stroke)
> Background.of((Paint fill), or Background.fill(Paint fill)
>
> I was wondering if others would like this, or is everyone using CSS anyway?
>
> - Nir
>
More information about the openjfx-dev
mailing list