JDK-8087529 : [MIRROR] setting orientation in scene does not propagate to trim
  • Type: Bug
  • Component: javafx
  • Sub-Component: scenegraph
  • Affected Version: 8
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2012-11-21
  • Updated: 2018-09-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Blocks :  
Blocks :  
Relates :  
Relates :  
Relates :  
Description
setting orientation in scene does not propagate

not sure if this is bug or not, but setting node orientation in scene does not change what is inside of it.

Basically:
scene.addEventFilter(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent> () {
    @Override public void handle(KeyEvent event) {
        if (event.getCode() == KeyCode.LEFT) {
            scene.setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
        }
        if (event.getCode() == KeyCode.RIGHT) {
            scene.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT);
        }
        System.err.println("orientation " + scene.getNodeOrientation());
    }
});

does not change the content of the scene

I have to do this

scene.addEventFilter(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent> () {
    @Override public void handle(KeyEvent event) {
        if (event.getCode() == KeyCode.LEFT) {
            scene.getRoot().setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
        }
        if (event.getCode() == KeyCode.RIGHT) {
            scene.getRoot().setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT);
        }
        System.err.println("orientation " + scene.getNodeOrientation());
    }
});




Comments
Ok, seems fine. I was under the impression that it did not work / had bugs in Windows after the HWND had been created but it seems to work fine. There are places in the code where mouse coordinates are calculated etc. when a stage is mirrored. From memory, they query the style bit but please check to make sure they do and that mouse coordinates work after the change.
11-12-2013

Well, the support is currently on Windows anyway and since Windows apps support this change online, we should too. It's a matter of one scene listener and one call to glass.
11-12-2013

Hmmm ��� perhaps just documenting that the trim will not change when a scene is visible is sufficient.
10-12-2013

I think that we should explicitly disallow changing the trim when a stage is visible. We should change the doc and make the operation not set the new value and not change the contents (when set on Scene only). Thoughts?
10-12-2013

A brief investigation about window decorations: Windows should support this by using SetWindowLongPtr to set WS_EX_LAYOUTRTL extension. On Linux, this seems to unsupported, it's probably system wide only. Both ICCCM and free desktop's wm extension don't have anything regarding RTL.
10-12-2013

I think there is still the issue of window decorations not reacting to Scene's orientation change. Will need to look into Glass to see whether it is a platform limitation or not. Will keep this open for now.
22-01-2013

Works for me.
22-01-2013

I think this was fixed with RT-26386. Please confirm.
21-01-2013

see RT-26386 for a testcase
21-11-2012