modules/graphics/src/main/java/javafx/scene/Node.java

Print this page

        

*** 1849,1861 **** private void doCSSLayoutSyncForSnapshot() { doCSSPass(); doLayoutPass(); updateBounds(); ! Scene.impl_setAllowPGAccess(true); syncAll(this); ! Scene.impl_setAllowPGAccess(false); } private WritableImage doSnapshot(SnapshotParameters params, WritableImage img) { if (getScene() != null) { getScene().doCSSLayoutSyncForSnapshot(this); --- 1849,1861 ---- private void doCSSLayoutSyncForSnapshot() { doCSSPass(); doLayoutPass(); updateBounds(); ! SceneHelper.setAllowPGAccess(true); syncAll(this); ! SceneHelper.setAllowPGAccess(false); } private WritableImage doSnapshot(SnapshotParameters params, WritableImage img) { if (getScene() != null) { getScene().doCSSLayoutSyncForSnapshot(this);
*** 9761,9772 **** Scene scene = getScene(); if (scene == null) { /* This can happen during the release process of an accessible object. */ throw new RuntimeException("Accessbility requested for node not on a scene"); } ! if (scene.impl_getPeer() != null) { ! return scene.impl_getPeer().getAccessControlContext(); } else { /* In some rare cases the accessible for a Node is needed * before its scene is made visible. For example, the screen reader * might ask a Menu for its ContextMenu before the ContextMenu * is made visible. That is a problem because the Window for the --- 9761,9772 ---- Scene scene = getScene(); if (scene == null) { /* This can happen during the release process of an accessible object. */ throw new RuntimeException("Accessbility requested for node not on a scene"); } ! if (scene.getPeer() != null) { ! return scene.getPeer().getAccessControlContext(); } else { /* In some rare cases the accessible for a Node is needed * before its scene is made visible. For example, the screen reader * might ask a Menu for its ContextMenu before the ContextMenu * is made visible. That is a problem because the Window for the