RFR: 8272870: Add convenience factory methods for border and background [v2]

Marius Hanl mhanl at openjdk.java.net
Fri Sep 3 13:26:34 UTC 2021

On Fri, 27 Aug 2021 17:40:48 GMT, Nir Lisker <nlisker at openjdk.org> wrote:

>> Added convenience factory factory methods for Background and Border.
> Nir Lisker has updated the pull request incrementally with one additional commit since the last revision:
>   Corrected comment tags

modules/javafx.graphics/src/main/java/javafx/scene/layout/Background.java line 366:

> 364:      */
> 365:     public static Background fill(Paint fill) {
> 366:         return new Background(new BackgroundFill(fill, null, null));

null **CornerRaddii** and null **Insets** will use **CornerRadii.EMPTY** and **Insets.EMPTY**. Maybe we should use those here instead so it's more clear for anyone having a look in the source code? I also always use those instead of null.
Same for **BorderStroke**


PR: https://git.openjdk.java.net/jfx/pull/610

More information about the openjfx-dev mailing list