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

2023-10-31 Thread Kevin Rushforth
On Tue, 31 Oct 2023 16:36:06 GMT, Prasanta Sadhukhan 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

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

2023-10-31 Thread Andy Goryachev
On Tue, 31 Oct 2023 16:36:06 GMT, Prasanta Sadhukhan 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

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

2023-10-31 Thread Prasanta Sadhukhan
> 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

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

2023-10-31 Thread Prasanta Sadhukhan
On Tue, 31 Oct 2023 16:13:57 GMT, Prasanta Sadhukhan 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

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

2023-10-31 Thread Kevin Rushforth
On Tue, 31 Oct 2023 16:23:23 GMT, Andy Goryachev wrote: > Perhaps we can clean up the logic a bit, something like > > ``` > boolean rtl = ComponentOrientation.RIGHT_TO_LEFT.equals(cor); > stage.setNodeOrientation(rtl ? RTL : LTR) > ``` Yes, that's also what I trying to suggest in an earlier com

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

2023-10-31 Thread Kevin Rushforth
On Tue, 31 Oct 2023 16:19:24 GMT, Kevin Rushforth wrote: > We would need to check whether Scene's getEffectiveOrientation handles that > correctly. I checked. It doesn't. effectiveOrientation must be either RTL or LTR (which makes sense), so without additional adjustments to the fix, I think w

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

2023-10-31 Thread Andy Goryachev
On Tue, 31 Oct 2023 16:19:24 GMT, Kevin Rushforth wrote: > 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 https://github.com/openjdk/jfx/pull/1271/commits/3b7be5d9888a24a5d1db2a5abcad3c647533544f works as expe

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

2023-10-31 Thread Kevin Rushforth
On Tue, 31 Oct 2023 16:11:05 GMT, Andy Goryachev wrote: > The initial value for node orientation property is INHERIT For the Scene, yes, but we aren't talking about that. The EmbeddedWindow currently never has the value of INHERIT. It is either LTR (default) or RTL. Maybe it _should_ be set to

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

2023-10-31 Thread Andy Goryachev
On Tue, 31 Oct 2023 16:08:32 GMT, Kevin Rushforth wrote: > For the _effective_ NodeOrientation attribution in the embedded window, > there's no such thing as INHERIT. It's either LTR (default) or RTL. Correct. The initial value for node orientation property is INHERIT which generates effectiv

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

2023-10-31 Thread Prasanta Sadhukhan
On Tue, 31 Oct 2023 15:54:00 GMT, Andy Goryachev wrote: > What would the behavior of a JLabel in a JPanel be when the JFrame is set > back to UNKNOWN? It sets it back to LTR it is toggled from RIGHT_TO_LEFT to UNNOWN. So, I updated PR to set JFXPanel to LTR for UNKNOWN..If set to INHERIT, then

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

2023-10-31 Thread Kevin Rushforth
On Tue, 31 Oct 2023 15:55:39 GMT, Andy Goryachev wrote: > > if (!cor.equals(ComponentOrientation.UNKNOWN)) { > > boolean rtl = cor.equals(ComponentOrientation.RIGHT_TO_LEFT); > > stage.setNodeOrientation(rtl ? NodeOrientation.RIGHT_TO_LEFT : > > NodeOrientation.LEFT_TO_RIGH**T); } else { > > sta

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

2023-10-31 Thread Prasanta Sadhukhan
> 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

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

2023-10-31 Thread Andy Goryachev
On Tue, 31 Oct 2023 15:54:40 GMT, Kevin Rushforth wrote: > if (!cor.equals(ComponentOrientation.UNKNOWN)) { > boolean rtl = cor.equals(ComponentOrientation.RIGHT_TO_LEFT); > stage.setNodeOrientation(rtl ? NodeOrientation.RIGHT_TO_LEFT : > NodeOrientation.LEFT_TO_RIGH**T); } else { > stage.setNod

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

2023-10-31 Thread Andy Goryachev
On Tue, 31 Oct 2023 15:47:37 GMT, Kevin Rushforth wrote: > What would the behavior of a JLabel in a JPanel be when the JFrame is set > back to UNKNOWN? I would expect a Scene in a JFXPanel to work the same way. exactly my point! the orientation of JComboBoxes in the toolbar in the monkey test

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

2023-10-31 Thread Kevin Rushforth
On Tue, 31 Oct 2023 15:42:50 GMT, Prasanta Sadhukhan wrote: > I can add in JFXPanel.java > ``` > if (!cor.equals(ComponentOrientation.UNKNOWN)) { > boolean rtl = cor.equals(ComponentOrientation.RIGHT_TO_LEFT); > stage.setNodeOrientation(rtl ? NodeOrientation.RIGHT_TO_LEFT : > NodeOrientation.LEF

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

2023-10-31 Thread Kevin Rushforth
On Mon, 30 Oct 2023 14:00:56 GMT, Prasanta Sadhukhan 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

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

2023-10-31 Thread Andy Goryachev
On Tue, 31 Oct 2023 15:37:45 GMT, Prasanta Sadhukhan wrote: > Tha tis grey area which is not mentioned in the spec so I think retaining > existing is the appropriate according to me.. We may need others to weigh in. My understanding, UNKNOWN works exactly as INHERIT, behaving as LTR if nothi

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

2023-10-31 Thread Prasanta Sadhukhan
On Mon, 30 Oct 2023 14:00:56 GMT, Prasanta Sadhukhan 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

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

2023-10-31 Thread Prasanta Sadhukhan
On Tue, 31 Oct 2023 15:36:20 GMT, Andy Goryachev wrote: > > I expect RTL because INHERIT is unsupported so it will retain the existing > > orientation, > > Why existing and not the initial? Tha tis grey area which is not mentioned in the spec so I think retaining existing is the appropriate a

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

2023-10-31 Thread Andy Goryachev
On Tue, 31 Oct 2023 15:34:14 GMT, Prasanta Sadhukhan wrote: > I expect RTL because INHERIT is unsupported so it will retain the existing > orientation, Why existing and not the initial? - PR Comment: https://git.openjdk.org/jfx/pull/1271#issuecomment-1787469258

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

2023-10-31 Thread Prasanta Sadhukhan
On Tue, 31 Oct 2023 15:07:32 GMT, Andy Goryachev wrote: > > I think it is expected to retain RTL in this case.. > > Ok, INHERIT is not supported, but why do you expect RTL? Shouldn't it go back > to UNKNOWN and therefore LTR? > > ``` > public static final > [ComponentOrientation](https://docs

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

2023-10-31 Thread Andy Goryachev
On Tue, 31 Oct 2023 03:10:08 GMT, Prasanta Sadhukhan wrote: > I think it is expected to retain RTL in this case.. Ok, INHERIT is not supported, but why do you expect RTL? Shouldn't it go back to UNKNOWN and therefore LTR? public static final [ComponentOrientation](https://docs.oracle.com/e

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

2023-10-30 Thread Prasanta Sadhukhan
On Mon, 30 Oct 2023 15:23:45 GMT, Kevin Rushforth wrote: >> Yes, initialization helped..Updated the PR... >> Also, speaking of regression test, I need some time to create one.. Will it >> be ok to push the fix if found to be ok and I work on the test >> simultaneously as a separate JBS test iss

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

2023-10-30 Thread Prasanta Sadhukhan
On Mon, 30 Oct 2023 14:00:56 GMT, Prasanta Sadhukhan 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

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

2023-10-30 Thread Andy Goryachev
On Mon, 30 Oct 2023 14:00:56 GMT, Prasanta Sadhukhan 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

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

2023-10-30 Thread Kevin Rushforth
On Mon, 30 Oct 2023 13:54:30 GMT, Prasanta Sadhukhan wrote: >> This might be due to the initialization problem I pointed out or it might be >> for some other reason. Can you make the suggested change and then re-test? > > Yes, initialization helped..Updated the PR... > Also, speaking of regress

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

2023-10-30 Thread Prasanta Sadhukhan
On Mon, 30 Oct 2023 12:53:07 GMT, Kevin Rushforth wrote: >> I have made the suggested changes and updated the PR. >> But it seems the orientation of the text in the test attached in JBS is at >> the middle initially (and not at LTR or RTL) and it only begins to track the >> orientation after 1

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

2023-10-30 Thread Prasanta Sadhukhan
> 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

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

2023-10-30 Thread Kevin Rushforth
On Mon, 30 Oct 2023 07:19:54 GMT, Prasanta Sadhukhan wrote: >> Yes, you are right that JFXPanel needs to call into the stage and not the >> other way around. The general approach now looks correct, however, you'll >> need to add the orientation attribute on the JavaFX Window >> (`EmbeddedWind

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

2023-10-30 Thread Kevin Rushforth
On Mon, 30 Oct 2023 07:11:54 GMT, Prasanta Sadhukhan 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

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

2023-10-30 Thread Prasanta Sadhukhan
On Sat, 28 Oct 2023 18:25:53 GMT, Kevin Rushforth wrote: >> I have tried to put in place what you suggested. Can you please take a look >> at the PR and see if it's in the right direction and suggest further. >> I have few doubts >> >> - It seems JFXPanel call EmbeddedStage interface methods an

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

2023-10-30 Thread Prasanta Sadhukhan
> 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

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

2023-10-28 Thread Kevin Rushforth
On Sat, 28 Oct 2023 18:21:52 GMT, Kevin Rushforth wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> jcheck > > modules/javafx.graphics/src/main/java/javafx/scene/Scene.java line 6352: > >> 6350:

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

2023-10-28 Thread Kevin Rushforth
On Sat, 28 Oct 2023 07:15:12 GMT, Prasanta Sadhukhan wrote: >> modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java line 822: >> >>> 820: scene.setNodeOrientation(rtl ? >>> 821: >>> NodeOrientation.RIGHT_TO_LEFT :

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

2023-10-28 Thread Kevin Rushforth
On Sat, 28 Oct 2023 07:22:02 GMT, Prasanta Sadhukhan 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

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

2023-10-28 Thread Prasanta Sadhukhan
> 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

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

2023-10-28 Thread Prasanta Sadhukhan
On Fri, 27 Oct 2023 16:55:30 GMT, Kevin Rushforth wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Code optimize > > modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java line 822: > >> 820:

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

2023-10-28 Thread Prasanta Sadhukhan
> 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

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

2023-10-27 Thread Kevin Rushforth
On Fri, 27 Oct 2023 03:19:05 GMT, Prasanta Sadhukhan 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

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

2023-10-26 Thread Prasanta Sadhukhan
On Thu, 26 Oct 2023 18:16:26 GMT, Andy Goryachev wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Optimization > > modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java line 817: > >> 815:

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

2023-10-26 Thread Prasanta Sadhukhan
> 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

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

2023-10-26 Thread Prasanta Sadhukhan
> 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

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

2023-10-26 Thread Andy Goryachev
On Thu, 26 Oct 2023 16:27:03 GMT, Prasanta Sadhukhan 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

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

2023-10-26 Thread Andy Goryachev
On Thu, 26 Oct 2023 16:27:03 GMT, Prasanta Sadhukhan 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

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

2023-10-26 Thread Prasanta Sadhukhan
On Thu, 26 Oct 2023 15:31:02 GMT, Andy Goryachev wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Optimization > > modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java line 817: > >> 815:

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

2023-10-26 Thread Prasanta Sadhukhan
> 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

Re: RFR: 8317836: FX nodes embedded in JFXPanel need to track component orientation

2023-10-26 Thread Andy Goryachev
On Thu, 26 Oct 2023 09:34:17 GMT, Prasanta Sadhukhan 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