RFR: 8332895: Support interpolation for backgrounds and borders [v22]
Michael Strauß
mstrauss at openjdk.org
Fri Aug 9 02:25:39 UTC 2024
On Thu, 8 Aug 2024 15:41:54 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
>>
>> only call get() when necessary
>
> modules/javafx.graphics/src/main/java/javafx/css/StyleConverter.java line 113:
>
>> 111: * @return a {@code Map} of the constituent values
>> 112: */
>> 113: Map<CssMetaData<? extends Styleable, ?>, Object> convertBack(T value);
>
> perhaps `convertToMap` might be better? or something along the lines of `toInstance`/`toMap` ? `decompose` / `reconstruct` ? (though decompose might evoke wrong associations)
`reconstruct` is a misnomer, as reconstruction is a two-step operation (`convertBack` followed by `convert`). To be fair, I don't like any of these better than `convertBack`, mostly because I want to stress that those two operations are closely related, and none of the alternatives evoke that sentiment. That being said, this is a minor API and I don't really mind either way, but absent a compelling reason, I'd prefer to stick to `convertBack`.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1522#discussion_r1710584650
More information about the openjfx-dev
mailing list