RFR: 8317836: FX nodes embedded in JFXPanel need to track component orientation [v8]

Prasanta Sadhukhan psadhukhan at openjdk.org
Tue Oct 31 03:12:41 UTC 2023


On Mon, 30 Oct 2023 14:00:56 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 two additional commits since the last revision:
> 
>  - jcheck
>  - Init orientation

> tested with the following scenario (using the updated monkey tester https://github.com/andy-goryachev-oracle/MonkeyTest ):
> 
>     1. Tools -> FX TextArea Embedded
> 
>     2. change JFrame.componentOrientation to RTL
> 
>     3. change JFrame.componentOrientation to INHERIT
> 
> 
> I would expect the TextArea to go to LTR but it stays in RTL.
> 
> ![Screenshot 2023-10-30 at 09 53 29](https://user-images.githubusercontent.com/107069028/279137094-3050f3c0-ac2e-45be-8eea-c817c119b2f3.png)

JFrame does not support "INHERIT" orientation as per spec https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/java/awt/ComponentOrientation.html#LEFT_TO_RIGHT
so it will effectively be ignored so I think it is expected to retain RTL in this case..

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1271#issuecomment-1786369117


More information about the openjfx-dev mailing list