RFR: 8216507: StyleablePropertyFactory: example in class javadoc does not compile [v2]
Andy Goryachev
angorya at openjdk.org
Fri Dec 23 17:05:37 UTC 2022
On Fri, 23 Dec 2022 17:01:14 GMT, Karthik P K <kpk at openjdk.org> wrote:
>> In the javadoc example of `StyleablePropertyFactory` class, wrong parameter was used while initializing `StyleableProperty`.
>>
>> Assigned the `CssMetadData` object to `SELECTED` variable returned by `createBooleanCssMetaData` method called in anonymous inner-class class, which is then used while initializing `StyleableProperty`.
>>
>> Added missing semicolon in the same example.
>
> Karthik P K has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix build error
Changes requested by angorya (Committer).
modules/javafx.graphics/src/main/java/javafx/css/StyleablePropertyFactory.java line 124:
> 122: public final class MyButton extends Button {
> 123:
> 124: private static CssMetaData<JavadocFixStylableProperty, Boolean> SELECTED;
should it be
private static CssMetaData<MyButton, Boolean> SELECTED;
in order to compile?
modules/javafx.graphics/src/main/java/javafx/css/StyleablePropertyFactory.java line 146:
> 144: // StyleableProperty implementation reduced to one line
> 145: private final {@literal StyleableProperty<Boolean>} selected =
> 146: new SimpleStyleableBooleanProperty(SELECTED, "selected", "my-selected");
as an exercise, could you actually put MyButton into a scene graph and style it with CSS?
-------------
PR: https://git.openjdk.org/jfx/pull/983
More information about the openjfx-dev
mailing list