JEP 253 webrev ready for review
jonathan.giles at oracle.com
Fri Sep 4 05:25:12 UTC 2015
For what it's worth, I think enabling this is a really good idea. The starting point is StyleConverter.java - it currently just hard codes all available converters. Making that pluggable won't be too difficult. If you (or anyone else) is interested in looking into this, we can discuss further.
Sent from a touch device. Please excuse my brevity.
On 4 September 2015 17:17:14 GMT+12:00, Michael Ennen <mike.ennen at gmail.com> wrote:
>I am trying to mentally digest the CSS API, but I am having trouble
>answering the question of whether or not the following scenario is now
>possible (using only public APIs). Imagine one wanted to create a new
>that was analogous to DeriveColorConverter.java, and that it worked
>the way down" in terms of being parsed from CSS into a
>StyleableProperty<Color>. For concreteness, say one wanted to implement
>fadein( <color> , <number>% )
>The fadein function takes a color and computes a more opaque version of
>The second parameter is the opacity, ranging from 0% to 100%. Has no
>fully opaque colors.
>Does the API allow for a way to hook this new function up into the CSS
>parser? If one implemented FadeInColorConverter extends
>StyleConverter<ParsedValue, Color> that worked according to the above
>specs, how would one hook this fadein function into the parser, so that
>can write CSS such as:
>my-awesome-color: fadein(my-semi-transparent-color, 30%);
>and have a StyleableObjectProperty<Color> come out the other side?
>If this is possible using the new APIs, then this makes those APIs very
>powerful in terms of the possibilities of extending the built-in CSS
>capabilities in very powerful and interesting ways. If it is not
>would it be feasible to make it so in the scope of this JEP?
>Thanks very much,
More information about the openjfx-dev