RFR: 8272870: Add convenience factory methods for border and background
Kevin Rushforth
kcr at openjdk.java.net
Fri Aug 27 14:18:26 UTC 2021
On Tue, 24 Aug 2021 16:29:11 GMT, Nir Lisker <nlisker at openjdk.org> wrote:
> Added convenience factory factory methods for Background and Border.
The API looks good. I left a couple comments on the javadoc.
I presume you will add some unit tests?
modules/javafx.graphics/src/main/java/javafx/scene/layout/Background.java line 362:
> 360: * @implNote this call is equivalent to
> 361: * <p>
> 362: * {@code new Background(new BackgroundFill(fill, null, null));}
This should either be `@implSpec` or part of the API spec (no tag), since it's more than just a note. Also, the text should start with a capital letter, since the body of an `implSpec` section (along with `implNote` and `apiNote`) is one or more paragraphs. In this case a single paragraph might be better:
@implSpec
This call is equivalent to {@code new Background(new BackgroundFill(fill, null, null));}.
modules/javafx.graphics/src/main/java/javafx/scene/layout/Background.java line 364:
> 362: * {@code new Background(new BackgroundFill(fill, null, null));}
> 363: * @param fill the fill of the background
> 364: * @return a new background of the given fill
Need to add `@since 18`
modules/javafx.graphics/src/main/java/javafx/scene/layout/Border.java line 400:
> 398: * {@code new Border(new BorderStroke(stroke, BorderStrokeStyle.SOLID, null, null));}
> 399: * @param stroke the stroke of the border
> 400: * @return a new border of the given stroke
Same comments about the javadoc as above.
-------------
PR: https://git.openjdk.java.net/jfx/pull/610
More information about the openjfx-dev
mailing list