RFR: 8317836: FX nodes embedded in JFXPanel need to track component orientation [v9]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Tue Oct 31 16:36:07 UTC 2023
On Tue, 31 Oct 2023 16:13:57 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> FX Nodes embedded in a Swing JFXPanel does not track the component orientation and FX nodes remain unaffected when component orientation changes.
>> Fix made sure JavaFX scene embedded in a JFXPanel should inherit the value from the JFXPanel.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>
> Treat UNKNOWN as LTR
> > For the Scene, yes, but we aren't talking about that.
>
> I got confused by the variable name "stage". You are right!
>
> The last code [3b7be5d](https://github.com/openjdk/jfx/commit/3b7be5d9888a24a5d1db2a5abcad3c647533544f) works as expected.
>
> Perhaps we can clean up the logic a bit, something like
>
> ```
> boolean rtl = ComponentOrientation.RIGHT_TO_LEFT.equals(cor);
> stage.setNodeOrientation(rtl ? RTL : LTR)
> ```
Sure..done..
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1271#issuecomment-1787574852
More information about the openjfx-dev
mailing list