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

Marius Hanl mhanl at openjdk.java.net
Sun Sep 19 10:56:42 UTC 2021


On Thu, 16 Sep 2021 21:15:20 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

> > > ```
> > > 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).

I agree. For me this would be the last useful variant I often needed in daily programming. Everything else should use the normal constructor as it is there for very specialized background/border.

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

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


More information about the openjfx-dev mailing list