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

Kevin Rushforth kcr at openjdk.java.net
Thu Sep 16 21:18:47 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

> > ```
> > public static Border stroke(Paint stroke, double width) {
> > ```
> >   ...
> > But I really want to hear other opinions. This can also be a follow up. :)
> I don't mind adding this variant, but it needs consensus.

I agree that it needs consensus, so the question is how many apps would use it from code (as opposed to CSS), and be satisfied with the other defaults. I don't object to adding a 2nd variant that takes a stroke width as long as we stop there. I don't want variants that take style, or corner radii, or insets, etc. (at that point, just use the existing API).


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

More information about the openjfx-dev mailing list