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

Marius Hanl mhanl at openjdk.java.net
Thu Sep 16 08:39:55 UTC 2021


On Thu, 9 Sep 2021 23:43:29 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 two additional commits since the last revision:
> 
>  - Removed whitespaces
>  - Added tests and doc updates

One comment from my side: I would find it quite useful if we have another border factory method with a double as the second parameter which let us specify the border width. So e.g.


public static Border stroke(Paint stroke, double width) {
    return new Border(new BorderStroke(stroke, BorderStrokeStyle.SOLID, null, new BorderWidths(width)));
}


But I really want to hear other opinions. This can also be a follow up. :)

-------------

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


More information about the openjfx-dev mailing list