API REVIEW REQUEST: Public API for Node Orientation
Pavel Safrata
pavel.safrata at oracle.com
Fri Oct 26 06:16:03 PDT 2012
Hi Steve,
I have a few comments/questions.
I'm not sure about the inheritance ignoring reparenting. I think that if
an application will use orientation extensively it will reach a
hard-to-trace "mess state" where most of the nodes "inherit" but they
don't actually have the parent's value. Also it means that peforming
"orientate parent" - "insert it into scene" will result in a different
behavior than "insert" first and then "orientate", which seems
confusing. What if I create a new node and insert it into scene, will it
inherit form its new parent? In summary, I find this behavior hard to
track and I think that when the value is Inherit it should always match
the parent's orientation.
How will mirroring cooperate with transformations? For instance user can
obtain local-to-scene transformation and if the mirrorring is not
contained there, the computations with the transform (such as
transforming points) will be wrong. Maybe we could just introduce a
public Mirror (or rather Flip) transformation and use it publicly for
the mirrorring?
How will it behave in 3D? Mirror nodes along X axis regardless of their
z-direction volume?
Shouldn't effectiveNodeOrientation be a property? It seems it might make
sense to observe the value. Also our naming convention is that you
should not use getSomthing unless "something" is a property.
The same applies to isAutomaticallyMirrored. This method seems weird
anyway. When and how often is it called? Can a node change the value
dynamically? If yes, we should have a property, if not, we should make
sure it doesn't - let the node call some init method in the constructor
or something like that.
Could you please elaborate on "the application will need to configure
parameters that are appropriate for the effect in both orientations"?
How do I drop the shadow to the same direction for all nodes, specifically?
Thanks,
Pavel
On 23.10.2012 22:30, steve.x.northover at oracle.com wrote:
> Hi all,
>
> I have been looking into Node Orientation which is an API that
> controls the directionality of a Node. This is different from BIDI or
> the BIDI algorithm which governs the direction of text. Node
> orientation concerns the flow of visual data which is either
> left-to-right or right-to-left. The best example is a tree control.
> In tree control that is oriented right-to-left, the expansion arrows
> point to the right and the branches of the tree expand from the right
> to the left.
>
> https://wikis.oracle.com/display/OpenJDK/Node+Orientation+in+JavaFX
>
> Steve
More information about the openjfx-dev
mailing list