Pivot properties [was: Enhancements for JavaFX 18]

Kevin Rushforth kevin.rushforth at oracle.com
Thu Aug 19 20:35:46 UTC 2021


The idea of adding explicit pivot properties was met with general 
agreement as long as we preserve compatibility (meaning that an 
auto-computed pivot at the center of the bounds must remain the default).

The questions are around what form the API should take. They basically 
boil down to:

1. How do we indicate whether the pivot is computed vs explicitly specified?
2. Should the pivot position be 3 doubles or a Point3D
3. Do we need a separate pivot for rotation vs scaling

My quick thoughts (although I might be able to be persuaded otherwise) are:

1) a boolean property
2) 3 separate doubles
3) no

Michael's proposal of a couple months ago [1] would match those answers, 
and is an interesting approach that I hadn't considered before. The 
question then is whether want the additional flexibility that it 
provides and whether it is worth the additional implementation, 
documentation, and testing that would be needed. It can be a discussion 
point. I'd like to know what Nir thinks of that idea.

I think we can discuss the details of the API in the PR, although while 
it is Draft, many people will miss the discussion (since it doesn't get 
sent to the mailing list), so it might be better to at get high-level 
agreement on the answers to the outstanding API questions on this list?

-- Kevin

[1] https://github.com/openjdk/jfx/pull/53#issuecomment-822667918


On 8/19/2021 12:03 PM, Nir Lisker wrote:
>
>     I'd like to see pivot properties move forward.
>     The PR seems to be a bit stale, as it has been sitting around for
>     almost two years.
>
>
> Me too, but there was no decision as to the implementation type. We 
> can continue the discussion on the PR at this point I think.
>
> On Fri, Aug 13, 2021 at 2:32 AM Michael Strauß 
> <michaelstrau2 at gmail.com <mailto:michaelstrau2 at gmail.com>> wrote:
>
>     I'd like to see pivot properties move forward.
>     The PR seems to be a bit stale, as it has been sitting around for
>     almost two years.
>
>     PR: https://github.com/openjdk/jfx/pull/53
>     <https://urldefense.com/v3/__https://github.com/openjdk/jfx/pull/53__;!!ACWV5N9M2RV99hQ!dpO9UK8458NQKXiiWkGAxJV2D2wUpaj0Lj6CGeQEei1FoV7bgKcV_3q4Szn7X8UYHGUa$>
>
>     Am Fr., 30. Juli 2021 um 14:57 Uhr schrieb Kevin Rushforth
>     <kevin.rushforth at oracle.com <mailto:kevin.rushforth at oracle.com>>:
>     >
>     > Now that JavaFX 17 is in RDP2, we can turn more attention to bug
>     fixes
>     > and enhancement requests for JavaFX 18. It's the summer, so
>     there may be
>     > delays as some people are out at various times (including me), but I
>     > would like to get some of the outstanding enhancement requests
>     moving
>     > over the next few weeks.
>     >
>     > Specifically, I'd like to see the following proceed:
>     >
>     > * Transparent backgrounds in WebView
>     > JBS: https://bugs.openjdk.java.net/browse/JDK-8090547
>     <https://bugs.openjdk.java.net/browse/JDK-8090547>
>     > PR: https://github.com/openjdk/jfx/pull/563
>     <https://urldefense.com/v3/__https://github.com/openjdk/jfx/pull/563__;!!ACWV5N9M2RV99hQ!dpO9UK8458NQKXiiWkGAxJV2D2wUpaj0Lj6CGeQEei1FoV7bgKcV_3q4Szn7XyMUPibt$>
>     >
>     > * Add DirectionalLight
>     > JBS: https://bugs.openjdk.java.net/browse/JDK-8234921
>     <https://bugs.openjdk.java.net/browse/JDK-8234921>
>     > PR: https://github.com/openjdk/jfx/pull/548
>     <https://urldefense.com/v3/__https://github.com/openjdk/jfx/pull/548__;!!ACWV5N9M2RV99hQ!dpO9UK8458NQKXiiWkGAxJV2D2wUpaj0Lj6CGeQEei1FoV7bgKcV_3q4Szn7X4KG3EaB$>
>     >
>     > * CSS pseudoclasses :focus-visible and :focus-within
>     > https://bugs.openjdk.java.net/browse/JDK-8268225
>     <https://bugs.openjdk.java.net/browse/JDK-8268225>
>     > PR: https://github.com/openjdk/jfx/pull/475
>     <https://urldefense.com/v3/__https://github.com/openjdk/jfx/pull/475__;!!ACWV5N9M2RV99hQ!dpO9UK8458NQKXiiWkGAxJV2D2wUpaj0Lj6CGeQEei1FoV7bgKcV_3q4Szn7XwfLuVHR$>
>     >
>     > * Improve property system to facilitate correct usage (minus the
>     binary
>     > incompatible API change)
>     > JBS: https://bugs.openjdk.java.net/browse/JDK-8268642
>     <https://bugs.openjdk.java.net/browse/JDK-8268642>
>     > PR: https://github.com/openjdk/jfx/pull/590
>     <https://urldefense.com/v3/__https://github.com/openjdk/jfx/pull/590__;!!ACWV5N9M2RV99hQ!dpO9UK8458NQKXiiWkGAxJV2D2wUpaj0Lj6CGeQEei1FoV7bgKcV_3q4Szn7X_YUng6V$>
>     (Draft)
>     >
>     > And maybe the following:
>     >
>     > * Add CSS themes as a first-class concept (need a consensus on
>     how to
>     > proceed)
>     >
>     > * Undecorated interactive stage style (still in early
>     discussion, but
>     > the concept looks interesting and useful)
>     >
>     > There are probably others I'm forgetting.
>     >
>     > Each of the above should be discussed in their own thread on
>     openjfx-dev
>     > rather than a reply to this thread.
>     >
>     > -- Kevin
>     >
>     >
>



More information about the openjfx-dev mailing list