[API Review] RT-26140: Node Orientation - API issue: Should effective orientation be a property?

Richard Bair richard.bair at oracle.com
Tue Jan 22 11:15:07 PST 2013


+1

On Jan 22, 2013, at 5:19 AM, Lubomir Nerad <lubomir.nerad at oracle.com> wrote:

> Hi All,
> 
> Node and Scene have property called nodeOrientation which can be set to LEFT_TO_RIGHT, RIGHT_TO_LEFT or INHERIT. These values are specified by the NodeOrientation enum. Currently both these classes allow to get another property called effectiveNodeOrientation which is derived from nodeOrientation and has the same value as nodeOrientation except for the case when the nodeOrientation is set to INHERIT. Then the effectiveNodeOrientation contains the final inherited (from parent hierarchy) value which is either LEFT_TO_RIGHT or RIGHT_TO_LEFT. Currently the effectiveNodeOrientation is not a full JavaFX property (there is only getter for it) and so it is not observable.
> 
> Because this property might be useful for creating custom nodes/controls or other user code which needs to react to node orientation changes, it seems beneficial to convert it into ReadOnlyObjectProperty.
> 
> So the proposed methods to add are:
> 
> Scene:
> final ReadOnlyObjectProperty<NodeOrientation> effectiveNodeOrientationProperty();
> 
> Node:
> final ReadOnlyObjectProperty<NodeOrientation> effectiveNodeOrientationProperty();
> 
> Further discussion can be found on http://javafx-jira.kenai.com/browse/RT-26140.
> 
> Thanks,
> Lubo



More information about the openjfx-dev mailing list