changeset 7388:97829a1239b6

RT-37751: [Accessibility API] remove getAccessible() and the Accessible
author Felipe Heidrich <felipe.heidrich@oracle.com>
date Mon, 30 Jun 2014 14:37:19 -0700
parents 030772161397
children 695cedc5afc1
files modules/graphics/src/main/java/com/sun/glass/ui/Accessible.java modules/graphics/src/main/java/com/sun/glass/ui/Application.java modules/graphics/src/main/java/com/sun/glass/ui/PlatformAccessible.java modules/graphics/src/main/java/com/sun/glass/ui/View.java modules/graphics/src/main/java/com/sun/glass/ui/mac/MacAccessible.java modules/graphics/src/main/java/com/sun/glass/ui/mac/MacApplication.java modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java modules/graphics/src/main/java/com/sun/glass/ui/win/WinApplication.java modules/graphics/src/main/java/com/sun/javafx/scene/NodeHelper.java modules/graphics/src/main/java/com/sun/javafx/scene/SceneHelper.java modules/graphics/src/main/java/com/sun/javafx/tk/TKSceneListener.java modules/graphics/src/main/java/com/sun/javafx/tk/quantum/GlassViewEventHandler.java modules/graphics/src/main/java/javafx/scene/Node.java modules/graphics/src/main/java/javafx/scene/Scene.java modules/graphics/src/main/java/javafx/scene/accessibility/Accessible.java
diffstat 15 files changed, 318 insertions(+), 398 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/Accessible.java	Mon Jun 30 14:37:19 2014 -0700
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.glass.ui;
+
+import static javafx.scene.accessibility.Attribute.PARENT;
+import static javafx.scene.accessibility.Attribute.ROLE;
+import com.sun.javafx.scene.NodeHelper;
+import com.sun.javafx.scene.SceneHelper;
+import javafx.scene.Node;
+import javafx.scene.Scene;
+import javafx.scene.accessibility.Action;
+import javafx.scene.accessibility.Attribute;
+import javafx.scene.accessibility.Role;
+
+public abstract class Accessible {
+
+    private EventHandler eventHandler;
+    private View view;
+
+    public static class EventHandler {
+
+        /**
+         * This method is called by the AT to request the value for the given attribute.
+         *
+         * @see Attribute
+         * @param attribute the requested attribute
+         * @param parameters optional list of parameters
+         * @return the value for the requested attribute
+         */
+        public Object getAttribute(Attribute attribute, Object... parameters) {
+            return null;
+        }
+
+        /**
+         * This method is called by the AT to indicate the accessible to execute
+         * the given action.
+         *
+         * @see Action
+         * @param action the action to execute
+         * @param parameters optional list of parameters
+         */
+        public void executeAction(Action action, Object... parameters) {
+        }
+    }
+
+    public EventHandler getEventHandler() {
+        return this.eventHandler;
+    }
+
+    public void setEventHandler(EventHandler eventHandler) {
+        this.eventHandler = eventHandler;
+    }
+
+    public void setView(View view) {
+        this.view = view;
+    }
+
+    public View getView() {
+        return view;
+    }
+
+    public void dispose() {
+        eventHandler = null;
+        view = null;
+    }
+
+    public boolean isDisposed() {
+        return eventHandler == null;
+    }
+
+    public String toString() {
+         return getClass().getSimpleName() + " (" + eventHandler + ")";
+    }
+
+    protected boolean isIgnored() {
+        Role role = (Role)getAttribute(ROLE);
+        if (role == null) return true;
+        return role == Role.NODE || role == Role.PARENT;
+    }
+
+    protected Accessible getAccessible(Scene scene) {
+        if (scene == null) return null;
+        return SceneHelper.getAccessible(scene);
+    }
+
+    protected Accessible getAccessible(Node node) {
+        if (node == null) return null;
+        return NodeHelper.getAccessible(node);
+    }
+
+    protected long getNativeAccessible(Node node) {
+        if (node == null) return 0L;
+        Accessible acc = getAccessible(node);
+        if (acc == null) return 0L;
+        return acc.getNativeAccessible();
+    }
+
+    protected Node getContainerNode(Node node, Role targetRole) {
+        while (node != null) {
+            Accessible acc = getAccessible(node);
+            Role role = (Role)acc.getAttribute(ROLE);
+            if (role == targetRole) return node;
+            node = (Node)acc.getAttribute(PARENT);
+        }
+        return null;
+    }
+
+    protected Node getContainerNode(Role targetRole) {
+        return getContainerNode((Node)getAttribute(PARENT), targetRole);
+    }
+
+    public Object getAttribute(Attribute attribute, Object... parameters) {
+        Object result = eventHandler.getAttribute(attribute, parameters);
+        if (result != null) {
+            Class<?> clazz = attribute.getReturnType();
+            if (clazz != null) {
+                try {
+                    clazz.cast(result);
+                } catch (Exception e) {
+                    String msg = "The expected return type for the " + attribute +
+                                 " attribute is " + clazz.getSimpleName() +
+                                 " but found " + result.getClass().getSimpleName();
+                    System.err.println(msg);
+                    return null; //Fail no exception
+                }
+            }
+        }
+        return result;
+    }
+
+    public void executeAction(Action action, Object... parameters) {
+        eventHandler.executeAction(action, parameters);
+    }
+
+    /**
+     * This method is called by Accessible to notify the AT that
+     * the value for the given attribute has changed.
+     *
+     * @see Attribute
+     * @param notification the attribute which value has changed
+     */
+    public abstract void sendNotification(Attribute notification);
+
+    protected abstract long getNativeAccessible(); 
+}
--- a/modules/graphics/src/main/java/com/sun/glass/ui/Application.java	Mon Jun 30 17:21:27 2014 +0200
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/Application.java	Mon Jun 30 14:37:19 2014 -0700
@@ -39,8 +39,6 @@
 import java.util.Map;
 import java.util.LinkedList;
 
-import javafx.scene.accessibility.Accessible;
-
 public abstract class Application {
 
     private final static String DEFAULT_NAME = "java";
@@ -660,7 +658,7 @@
         return new EventLoop();
     }
 
-    public PlatformAccessible createAccessible(Accessible accessible) { return null; }
+    public Accessible createAccessible() { return null; }
 
     protected abstract FileChooserResult staticCommonDialogs_showFileChooser(Window owner, String folder, String filename, String title, int type,
                                                      boolean multipleMode, ExtensionFilter[] extensionFilters, int defaultFilterIndex);
--- a/modules/graphics/src/main/java/com/sun/glass/ui/PlatformAccessible.java	Mon Jun 30 17:21:27 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.glass.ui;
-
-import static javafx.scene.accessibility.Attribute.PARENT;
-import static javafx.scene.accessibility.Attribute.ROLE;
-import javafx.scene.Node;
-import javafx.scene.accessibility.Accessible;
-import javafx.scene.accessibility.Action;
-import javafx.scene.accessibility.Attribute;
-import javafx.scene.accessibility.Role;
-
-public abstract class PlatformAccessible {
-
-    private Accessible accessible;
-    private View view;
-
-    protected PlatformAccessible(Accessible accessible) {
-        this.accessible = accessible;
-    }
-
-    public void setView(View view) {
-        this.view = view;
-    }
-
-    public View getView() {
-        return view;
-    }
-
-    public void dispose() {
-        if (accessible != null) accessible = null;
-        view = null;
-    }
-
-    protected boolean isDisposed() {
-        return accessible == null;
-    }
-
-    public String toString() {
-         return getClass().getSimpleName() + " (" + accessible + ")";
-    }
-
-    protected boolean isIgnored() {
-        Role role = (Role)getAttribute(ROLE);
-        if (role == null) return true;
-        return role == Role.NODE || role == Role.PARENT;
-    }
-
-    @SuppressWarnings("deprecation")
-    protected long getAccessible(Node node) {
-        if (node == null) return 0L;
-        Accessible acc = node.getAccessible();
-        if (acc == null) return 0L;
-        PlatformAccessible pAcc = acc.impl_getDelegate();
-        return pAcc != null ? pAcc.getNativeAccessible() : 0;
-    }
-
-    protected Node getContainerNode(Node node, Role targetRole) {
-        while (node != null) {
-            Accessible acc = node.getAccessible();
-            Role role = (Role)acc.getAttribute(ROLE);
-            if (role == targetRole) return node;
-            node = (Node)acc.getAttribute(PARENT);
-        }
-        return null;
-    }
-
-    protected Node getContainerNode(Role targetRole) {
-        return getContainerNode((Node)getAttribute(PARENT), targetRole);
-    }
-
-    protected Object getAttribute(Attribute attribute, Object... parameters) {
-        Object result = accessible.getAttribute(attribute, parameters);
-        if (result != null) {
-            Class<?> clazz = attribute.getReturnType();
-            if (clazz != null) {
-                try {
-                    clazz.cast(result);
-                } catch (Exception e) {
-                    String msg = "The expected return type for the " + attribute +
-                                 " attribute is " + clazz.getSimpleName() +
-                                 " but found " + result.getClass().getSimpleName();
-//                    throw new IllegalArgumentException(msg);
-                    System.err.println(msg);
-                    return null; //Fail no exception
-                }
-            }
-        }
-        return result;
-    }
-
-    protected void executeAction(Action action, Object... parameters) {
-        accessible.executeAction(action, parameters);
-    }
-
-    public abstract void sendNotification(Attribute notification);
-
-    protected abstract long getNativeAccessible(); 
-}
--- a/modules/graphics/src/main/java/com/sun/glass/ui/View.java	Mon Jun 30 17:21:27 2014 +0200
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/View.java	Mon Jun 30 14:37:19 2014 -0700
@@ -31,7 +31,6 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.Map;
-import javafx.scene.accessibility.Accessible;
 
 public abstract class View {
 
@@ -1096,9 +1095,8 @@
         if (accessible) {
             Accessible acc = eventHandler.getSceneAccessible();
             if (acc != null) {
-                PlatformAccessible pAcc = acc.impl_getDelegate();
-                pAcc.setView(this);
-                return pAcc.getNativeAccessible();
+                acc.setView(this);
+                return acc.getNativeAccessible();
             }
         }
         return 0L;
--- a/modules/graphics/src/main/java/com/sun/glass/ui/mac/MacAccessible.java	Mon Jun 30 17:21:27 2014 +0200
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/mac/MacAccessible.java	Mon Jun 30 14:37:19 2014 -0700
@@ -37,7 +37,6 @@
 import javafx.geometry.Orientation;
 import javafx.scene.Scene;
 import javafx.scene.Node;
-import javafx.scene.accessibility.Accessible;
 import javafx.scene.accessibility.Action;
 import javafx.scene.accessibility.Attribute;
 import javafx.scene.accessibility.Role;
@@ -46,7 +45,7 @@
 import javafx.scene.input.KeyCodeCombination;
 import javafx.scene.input.KeyCombination;
 import javafx.scene.text.Font;
-import com.sun.glass.ui.PlatformAccessible;
+import com.sun.glass.ui.Accessible;
 import com.sun.glass.ui.Screen;
 import com.sun.glass.ui.View;
 import static javafx.scene.accessibility.Attribute.*;
@@ -55,7 +54,7 @@
  * Native Interface - Implements NSAccessibility Protocol
  *
  */
-final class MacAccessible extends PlatformAccessible {
+final class MacAccessible extends Accessible {
 
     private native static void _initIDs();
     private native static boolean _initEnum(String enumName);
@@ -643,16 +642,11 @@
     private static final int kAXMenuItemModifierControl      = (1 << 2);
     private static final int kAXMenuItemModifierNoCommand    = (1 << 3);
 
-    private MacAccessible(Accessible accessible) {
-        super(accessible);
+    MacAccessible() {
         this.peer = _createGlassAccessible();
-    }
-
-    static MacAccessible createAccessible(Accessible accessible) {
-        if (accessible == null) return null;
-        MacAccessible macAccessible = new MacAccessible(accessible);
-        if (macAccessible.peer == 0L) return null;
-        return macAccessible;
+        if (this.peer == 0L) {
+            throw new RuntimeException("could not create platform accessible");
+        }
     }
 
     @Override
@@ -698,7 +692,7 @@
                      */
                     Scene scene = (Scene)getAttribute(SCENE);
                     if (scene != null) {
-                        Accessible acc = scene.getAccessible();
+                        Accessible acc = getAccessible(scene);
                         if (acc != null) {
                             node = (Node)acc.getAttribute(FOCUS_NODE);
                         }
@@ -707,8 +701,8 @@
 
                 long id = 0L;
                 if (node != null) {
-                    Node item = (Node)node.getAccessible().getAttribute(FOCUS_ITEM);
-                    id = item != null ? getAccessible(item) : getAccessible(node);
+                    Node item = (Node)getAccessible(node).getAttribute(FOCUS_ITEM);
+                    id = item != null ? getNativeAccessible(item) : getNativeAccessible(node);
                 } else {
                     /* 
                      * No focused element. Send the notification to the scene itself.
@@ -741,7 +735,7 @@
                 Role role = (Role) getAttribute(ROLE);
                 if (role == Role.TREE_ITEM || role == Role.TREE_TABLE_ROW) {
                     Role container = role == Role.TREE_ITEM ? Role.TREE_VIEW : Role.TREE_TABLE_VIEW;
-                    long control = getAccessible(getContainerNode(container));
+                    long control = getNativeAccessible(getContainerNode(container));
                     if (control != 0) {
                         NSAccessibilityPostNotification(control, MacNotification.NSAccessibilityRowCountChangedNotification.ptr);
                     }
@@ -762,7 +756,7 @@
                          * and send a close and open event for it.
                          */
                         Node menuItemOwner = (Node)getAttribute(MENU_FOR);
-                        long menu = getAccessible(getContainerNode(menuItemOwner, Role.CONTEXT_MENU));
+                        long menu = getNativeAccessible(getContainerNode(menuItemOwner, Role.CONTEXT_MENU));
                         if (menu != 0) {
                             NSAccessibilityPostNotification(menu, MacNotification.AXMenuClosed.ptr);
                             NSAccessibilityPostNotification(menu, MacNotification.AXMenuOpened.ptr);
@@ -789,14 +783,11 @@
         return peer;
     }
 
-    @SuppressWarnings("deprecation")
     private View getRootView(Scene scene) {
         if (scene == null) return null;
-        Accessible acc = scene.getAccessible();
-        if (acc == null) return null;
-        MacAccessible macAcc = (MacAccessible)acc.impl_getDelegate();
-        if (macAcc == null || macAcc.isDisposed()) return null;
-        View view = macAcc.getView();
+        Accessible acc = getAccessible(scene);
+        if (acc == null || acc.isDisposed()) return null;
+        View view = acc.getView();
         if (view == null || view.isClosed()) return null;
         return view;
     }
@@ -804,7 +795,7 @@
     long[] getUnignoredChildren(ObservableList<Node> children) {
         if (children == null) return new long[0];
         long[] ids = children.stream()
-                             .mapToLong(n -> getAccessible(n))
+                             .mapToLong(n -> getNativeAccessible(n))
                              .filter(n -> n != 0)
                              .toArray();
         return NSAccessibilityUnignoredChildren(ids);
@@ -857,7 +848,7 @@
         if (role == Role.TEXT) {
             Node parent = (Node)getAttribute(PARENT);
             if (parent == null) return ignoreInnerText;
-            Role parentRole = (Role)parent.getAccessible().getAttribute(ROLE);
+            Role parentRole = (Role)getAccessible(parent).getAttribute(ROLE);
             if (parentRole == null) return ignoreInnerText;
             switch (parentRole) {
                 case BUTTON:
@@ -1057,7 +1048,7 @@
                     int i = 0;
                     if (index == 0) {
                         Node menu = (Node)getAttribute(MENU);
-                        if (menu != null) result[i++] = getAccessible(menu);
+                        if (menu != null) result[i++] = getNativeAccessible(menu);
                     }
                     if (i < maxCount) {
                         @SuppressWarnings("unchecked")
@@ -1083,7 +1074,7 @@
             while (i < maxCount) {
                 Node node = (Node)getAttribute(jfxAttr, index + i);
                 if (node == null) break;
-                result[i] = getAccessible(node);
+                result[i] = getNativeAccessible(node);
                 i++;
             }
             if (i == maxCount) return NSAccessibilityUnignoredChildren(result);;
@@ -1187,11 +1178,9 @@
                          * within it.
                          */
                         Scene scene = (Scene)getAttribute(SCENE);
-                        if (scene != null) {
-                            Accessible acc = scene.getAccessible();
-                            if (acc != null) {
-                                focus = (Node)acc.getAttribute(FOCUS_NODE);
-                            }
+                        Accessible acc = getAccessible(scene);
+                        if (acc != null) {
+                            focus = (Node)acc.getAttribute(FOCUS_NODE);
                         }
                     }
                     if (role == Role.MENU_BAR) {
@@ -1202,9 +1191,9 @@
                         focus = (Node)getAttribute(FOCUS_NODE);
                     }
                     if (focus != null) {
-                        Role focusRole = (Role)focus.getAccessible().getAttribute(ROLE);
+                        Role focusRole = (Role)getAccessible(focus).getAttribute(ROLE);
                         if (isMenuElement(focusRole)) {
-                            long[] result = {getAccessible(focus)};
+                            long[] result = {getNativeAccessible(focus)};
                             return attr.map.apply(result);
                         }
                     }
@@ -1309,12 +1298,12 @@
                     if (role == Role.CONTEXT_MENU) {
                         Node menuItem = (Node)getAttribute(MENU_FOR);
                         if (menuItem != null) {
-                            if (menuItem.getAccessible().getAttribute(ROLE) == Role.MENU) {
+                            if (getAccessible(menuItem).getAttribute(ROLE) == Role.MENU) {
                                 result = menuItem;
                             }
                         }
                     }
-                    result = getAccessible((Node)result);
+                    result = getNativeAccessible((Node)result);
                 } else {
                     /* Root node: return the NSView (instead of acc.getNativeAccessible()) */
                     View view = getRootView((Scene)getAttribute(SCENE));
@@ -1328,7 +1317,7 @@
                 switch (role) {
                     case TAB_PANE:
                     case PAGINATION:
-                        result = getAccessible((Node)result);
+                        result = getNativeAccessible((Node)result);
                         break;
                     case CHECK_BOX:
                     case TOGGLE_BUTTON:
@@ -1383,12 +1372,12 @@
                          */
                         Node parent = (Node)getAttribute(PARENT);
                         if (parent == null) return null;
-                        Accessible acc = parent.getAccessible();
+                        Accessible acc = getAccessible(parent);
                         if (acc.getAttribute(ROLE) == Role.TREE_TABLE_ROW) {
                             @SuppressWarnings("unchecked")
                             Stream<Node> children = ((List<Node>)acc.getAttribute(CHILDREN)).stream();
 
-                            result = children.map(n -> n.getAccessible())
+                            result = children.map(n -> getAccessible(n))
                                              .filter(a -> a.getAttribute(ROLE) == Role.TREE_TABLE_CELL)
                                              .map(a -> (String)a.getAttribute(TITLE))
                                              .filter(t -> t != null && !t.isEmpty()) //Consider reporting empty cells as "(blank)"
@@ -1516,7 +1505,7 @@
             }
             case NSAccessibilityContentsAttribute: {
                 if (result != null) {
-                    result = new long [] {getAccessible((Node)result)};
+                    result = new long [] {getNativeAccessible((Node)result)};
                 }
                 break;
             }
@@ -1532,7 +1521,7 @@
             case NSAccessibilityHeaderAttribute:
             case NSAccessibilityHorizontalScrollBarAttribute:
             case NSAccessibilityVerticalScrollBarAttribute: {
-                result = getAccessible((Node)result);
+                result = getNativeAccessible((Node)result);
                 break;
             }
             case NSAccessibilityOrientationAttribute:
@@ -1739,7 +1728,7 @@
                 break;
             }
             case NSAccessibilityCellForColumnAndRowParameterizedAttribute: {
-                result = getAccessible((Node)result);
+                result = getNativeAccessible((Node)result);
                 break;
             }
             default:
@@ -1803,9 +1792,9 @@
         Node node = (Node)getAttribute(FOCUS_NODE);
         if (node == null) return 0L;
 
-        Node item = (Node)node.getAccessible().getAttribute(FOCUS_ITEM);
-        if (item != null) return getAccessible(item);
-        return getAccessible(node);
+        Node item = (Node)getAccessible(node).getAttribute(FOCUS_ITEM);
+        if (item != null) return getNativeAccessible(item);
+        return getNativeAccessible(node);
     }
 
     boolean accessibilityIsIgnored() {
@@ -1836,7 +1825,7 @@
         Screen screen = view.getWindow().getScreen();
         y = screen.getHeight() - y;
         Node node = (Node)getAttribute(NODE_AT_POINT, new Point2D(x, y));
-        return NSAccessibilityUnignoredAncestor(getAccessible(node));
+        return NSAccessibilityUnignoredAncestor(getNativeAccessible(node));
   }
 
 }
--- a/modules/graphics/src/main/java/com/sun/glass/ui/mac/MacApplication.java	Mon Jun 30 17:21:27 2014 +0200
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/mac/MacApplication.java	Mon Jun 30 14:37:19 2014 -0700
@@ -35,12 +35,6 @@
 
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import java.util.HashMap;
-
-import java.util.List;
-import java.util.Map;
-
-import javafx.scene.accessibility.Accessible;
 
 final class MacApplication extends Application implements InvokeLaterDispatcher.InvokeLaterSubmitter {
 
@@ -260,8 +254,8 @@
         return MacTimer.getMaxPeriod_impl();
     }
 
-    @Override public PlatformAccessible createAccessible(Accessible accessible) {
-        return MacAccessible.createAccessible(accessible);
+    @Override public Accessible createAccessible() {
+        return new MacAccessible();
     }
 
     @Override protected FileChooserResult staticCommonDialogs_showFileChooser(Window owner, String folder, String filename, String title, int type,
--- a/modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java	Mon Jun 30 17:21:27 2014 +0200
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java	Mon Jun 30 14:37:19 2014 -0700
@@ -31,12 +31,11 @@
 import javafx.geometry.Point2D;
 import javafx.scene.Node;
 import javafx.scene.Scene;
-import javafx.scene.accessibility.Accessible;
 import javafx.scene.accessibility.Action;
 import javafx.scene.accessibility.Attribute;
 import javafx.scene.accessibility.Role;
 import javafx.scene.input.KeyCombination;
-import com.sun.glass.ui.PlatformAccessible;
+import com.sun.glass.ui.Accessible;
 import com.sun.glass.ui.View;
 import static javafx.scene.accessibility.Attribute.*;
 
@@ -58,7 +57,7 @@
  *
  */
 
-final class WinAccessible extends PlatformAccessible {
+final class WinAccessible extends Accessible {
 
     private native static void _initIDs();
     static {
@@ -227,17 +226,12 @@
     private native static long UiaRaiseAutomationPropertyChangedEvent(long pProvider, int id, WinVariant oldV, WinVariant newV);
     private native static boolean UiaClientsAreListening();
 
-    private WinAccessible(Accessible accessible) {
-        super(accessible);
+    WinAccessible() {
         this.peer = _createGlassAccessible();
-    }
-
-    static WinAccessible createAccessible(Accessible accessible) {
-        if (accessible == null) return null;
-        WinAccessible winAccessible = new WinAccessible(accessible);
-        if (winAccessible.peer == 0L) return null;
-        winAccessible.id = idCount++;
-        return winAccessible;
+        if (this.peer == 0L) {
+            throw new RuntimeException("could not create platform accessible");
+        }
+        this.id = idCount++;
     }
 
     @Override
@@ -274,15 +268,13 @@
                     // This is a Scene.transientFocusContainer
                     Node node = (Node)getAttribute(FOCUS_NODE);
                     if (node != null) {
-                        UiaRaiseAutomationEvent(getAccessible(node), UIA_AutomationFocusChangedEventId);
+                        UiaRaiseAutomationEvent(getNativeAccessible(node), UIA_AutomationFocusChangedEventId);
                     } else {
                         // Delegate back to the Scene if the transient focus owner is null
                         Scene scene = (Scene)getAttribute(SCENE);
-                        if (scene != null) {
-                            Accessible acc = scene.getAccessible();
-                            if (acc != null) {
-                                acc.sendNotification(FOCUS_NODE);
-                            }
+                        Accessible acc = getAccessible(scene);
+                        if (acc != null) {
+                            acc.sendNotification(FOCUS_NODE);
                         }
                     }
                 }
@@ -295,7 +287,7 @@
                  */
                 Node node = (Node)getAttribute(SELECTED_PAGE);
                 if (node != null) {
-                    UiaRaiseAutomationEvent(getAccessible(node), UIA_AutomationFocusChangedEventId);
+                    UiaRaiseAutomationEvent(getNativeAccessible(node), UIA_AutomationFocusChangedEventId);
                 }
                 break;
             }
@@ -307,7 +299,7 @@
                  */
                 Node node = (Node)getAttribute(SELECTED_TAB);
                 if (node != null) {
-                    UiaRaiseAutomationEvent(getAccessible(node), UIA_AutomationFocusChangedEventId);
+                    UiaRaiseAutomationEvent(getNativeAccessible(node), UIA_AutomationFocusChangedEventId);
                 }
                 break;
             }
@@ -319,7 +311,7 @@
                  */
                 ObservableList<Node> selection = (ObservableList<Node>)getAttribute(SELECTED_CELLS);
                 if (selection != null) {
-                    selection.stream().forEach(n -> UiaRaiseAutomationEvent(getAccessible(n), UIA_AutomationFocusChangedEventId));
+                    selection.stream().forEach(n -> UiaRaiseAutomationEvent(getNativeAccessible(n), UIA_AutomationFocusChangedEventId));
                 }
                 break;
             }
@@ -331,7 +323,7 @@
                  */
                 ObservableList<Node> selection = (ObservableList<Node>)getAttribute(SELECTED_ROWS);
                 if (selection != null) {
-                    selection.stream().forEach(n -> UiaRaiseAutomationEvent(getAccessible(n), UIA_AutomationFocusChangedEventId));
+                    selection.stream().forEach(n -> UiaRaiseAutomationEvent(getNativeAccessible(n), UIA_AutomationFocusChangedEventId));
                 }
                 break;
             }
@@ -445,21 +437,9 @@
         return peer;
     }
 
-    /* Overwritten in order to make is visible to WinTextRangeProvider */
-    @Override
-    protected Object getAttribute(Attribute attribute, Object... parameters) {
-        return super.getAttribute(attribute, parameters);
-    }
-
-    /* Overwritten in order to make is visible to WinTextRangeProvider */
-    @Override
-    protected void executeAction(Action action, Object... parameters) {
-        super.executeAction(action, parameters);
-    }
-
     private long getContainer(Role targetRole) {
         Node node = getContainerNode(targetRole);
-        return node == null ? 0 : getAccessible(node);
+        return node == null ? 0 : getNativeAccessible(node);
     }
 
     private Node getContainerNode() {
@@ -737,7 +717,7 @@
                 if (name == null || name.length() == 0) {
                     Node label = (Node)getAttribute(LABELED_BY);
                     if (label != null) {
-                        name = (String)label.getAccessible().getAttribute(TITLE);
+                        name = (String)getAccessible(label).getAttribute(TITLE);
                     }
                 }
                 if (name == null || name.length() == 0) {
@@ -784,12 +764,12 @@
                 if (Boolean.FALSE.equals(focus)) {
                     Scene scene = (Scene)getAttribute(SCENE);
                     if (scene != null) {
-                        Accessible acc = scene.getAccessible();
+                        Accessible acc = getAccessible(scene);
                         if (acc != null) {
                             Node node = (Node)acc.getAttribute(FOCUS_NODE);
                             if (node != null) {
-                                Node item = (Node)node.getAccessible().getAttribute(FOCUS_ITEM);
-                                if (getAccessible(item) == peer) {
+                                Node item = (Node)getAccessible(node).getAttribute(FOCUS_ITEM);
+                                if (getNativeAccessible(item) == peer) {
                                     focus = true;
                                 }
                             }
@@ -868,11 +848,9 @@
         if (isDisposed()) return 0L;
         Scene scene = (Scene)getAttribute(SCENE);
         if (scene == null) return 0L;
-        Accessible acc = scene.getAccessible();
-        if (acc == null) return 0L;
-        WinAccessible winAcc = (WinAccessible)acc.impl_getDelegate();
-        if (winAcc == null || winAcc.isDisposed()) return 0L;
-        return winAcc.getNativeAccessible();
+        WinAccessible acc = (WinAccessible)getAccessible(scene);
+        if (acc == null || acc.isDisposed()) return 0L;
+        return acc.getNativeAccessible();
     }
 
     long[] GetEmbeddedFragmentRoots() {
@@ -891,7 +869,7 @@
     private long NavigateListView(WinAccessible listItemAccessible, int direction) {
         Node list = listItemAccessible.getContainerNode();
         if (list == null) return 0;
-        Accessible listAccessible = list.getAccessible();
+        Accessible listAccessible = getAccessible(list);
         if (listAccessible == null) return 0;
         Integer count = (Integer)listAccessible.getAttribute(ROW_COUNT);
         if (count == null || count == 0) return 0;
@@ -904,7 +882,7 @@
             case NavigateDirection_LastChild: index = count - 1; break;
         }
         Node node = (Node)listAccessible.getAttribute(ROW_AT_INDEX, index);
-        return getAccessible(node);
+        return getNativeAccessible(node);
     }
 
     long Navigate(int direction) {
@@ -933,12 +911,9 @@
                     if (node == null) {
                         /* scene root node case */
                         Scene scene = (Scene)getAttribute(SCENE);
-                        if (scene == null) return 0L;
-                        Accessible acc = scene.getAccessible();
-                        if (acc == null) return 0L;
-                        WinAccessible winAcc = (WinAccessible)acc.impl_getDelegate();
-                        if (winAcc == null || winAcc.isDisposed()) return 0L;
-                        return winAcc.getNativeAccessible();
+                        WinAccessible acc = (WinAccessible)getAccessible(scene);
+                        if (acc == null || acc.isDisposed()) return 0L;
+                        return acc.getNativeAccessible();
                     }
                 }
                 break;
@@ -955,7 +930,7 @@
                  * or the root tree item in a tree view. Either way, there is no siblings. 
                  */
                 if (parent != null) {
-                    Accessible parentAccessible = parent.getAccessible();
+                    WinAccessible parentAccessible = (WinAccessible)getAccessible(parent);
                     Function<Integer, Node> getChild;
                     int count = 0;
                     if (treeCell) {
@@ -974,14 +949,13 @@
                         };
                     }
 
-                    WinAccessible winAcc = (WinAccessible)parentAccessible.impl_getDelegate();
-                    int lastIndex = winAcc.lastIndex;
+                    int lastIndex = parentAccessible.lastIndex;
                     int currentIndex = -1;
-                    if (0 <= lastIndex && lastIndex < count && getAccessible(getChild.apply(lastIndex)) == peer) {
+                    if (0 <= lastIndex && lastIndex < count && getNativeAccessible(getChild.apply(lastIndex)) == peer) {
                         currentIndex = lastIndex;
                     } else {
                         for (int i = 0; i < count; i++) {
-                            if (getAccessible(getChild.apply(i)) == peer) {
+                            if (getNativeAccessible(getChild.apply(i)) == peer) {
                                 currentIndex = i;
                                 break;
                             }
@@ -995,7 +969,7 @@
                         }
                         if (0 <= currentIndex && currentIndex < count) {
                             node = getChild.apply(currentIndex);
-                            winAcc.lastIndex = currentIndex;
+                            parentAccessible.lastIndex = currentIndex;
                         }
                     }
                 }
@@ -1021,9 +995,9 @@
                         node = children.get(lastIndex);
                     }
                     if (node != null) {
-                        role = (Role)node.getAccessible().getAttribute(ROLE);
+                        role = (Role)getAccessible(node).getAttribute(ROLE);
                         if (role == Role.LIST_ITEM) {
-                            WinAccessible itemAcc = (WinAccessible)node.getAccessible().impl_getDelegate();
+                            WinAccessible itemAcc = (WinAccessible)getAccessible(node);
                             return NavigateListView(itemAcc, direction);
                         }
                     }
@@ -1031,7 +1005,7 @@
                 break;
             }
         }
-        return getAccessible(node);
+        return getNativeAccessible(node);
     }
 
     void SetFocus() {
@@ -1044,16 +1018,17 @@
     long ElementProviderFromPoint(double x, double y) {
         if (isDisposed()) return 0;
         Node node = (Node)getAttribute(NODE_AT_POINT, new Point2D(x, y));
-        return getAccessible(node);
+        return getNativeAccessible(node);
     }
 
     long GetFocus() {
         Node node = (Node)getAttribute(FOCUS_NODE);
         if (node == null) return 0L;
-        Node item = (Node)node.getAccessible().getAttribute(FOCUS_ITEM);
-        if (item != null) return getAccessible(item);
-        return getAccessible(node);
+        Node item = (Node)getAccessible(node).getAttribute(FOCUS_ITEM);
+        if (item != null) return getNativeAccessible(item);
+        return getNativeAccessible(node);
     }
+
     /***********************************************/
     /*     IRawElementProviderAdviseEvents         */
     /***********************************************/
@@ -1093,7 +1068,7 @@
             case TABLE_VIEW: {
                 ObservableList<Node> selection = (ObservableList<Node>)getAttribute(SELECTED_CELLS);
                 if (selection != null) {
-                    return selection.stream().mapToLong(n -> getAccessible(n)).toArray();
+                    return selection.stream().mapToLong(n -> getNativeAccessible(n)).toArray();
                 }
                 break;
             }
@@ -1101,21 +1076,21 @@
             case LIST_VIEW: {
                 ObservableList<Node> selection = (ObservableList<Node>)getAttribute(SELECTED_ROWS);
                 if (selection != null) {
-                    return selection.stream().mapToLong(n -> getAccessible(n)).toArray();
+                    return selection.stream().mapToLong(n -> getNativeAccessible(n)).toArray();
                 }
                 break;
             }
             case PAGINATION: {
                 Node node = (Node)getAttribute(SELECTED_PAGE);
                 if (node != null) {
-                    return new long[] {getAccessible(node)};
+                    return new long[] {getNativeAccessible(node)};
                 }
                 break;
             }
             case TAB_PANE: {
                 Node node = (Node)getAttribute(SELECTED_TAB);
                 if (node != null) {
-                    return new long[] {getAccessible(node)};
+                    return new long[] {getNativeAccessible(node)};
                 }
                 break;
             }
@@ -1295,7 +1270,7 @@
 
     long get_SelectionContainer() {
         Node node = getContainerNode();
-        return node == null ? 0 : getAccessible(node);
+        return node == null ? 0 : getNativeAccessible(node);
     }
 
     /***********************************************/
@@ -1367,7 +1342,7 @@
     long GetItem(int row, int column) {
         if (isDisposed()) return 0;
         Node node = (Node)getAttribute(CELL_AT_ROW_COLUMN, row, column);
-        return getAccessible(node);
+        return getNativeAccessible(node);
     }
 
     /***********************************************/
@@ -1452,7 +1427,7 @@
        Node table = null;
        Node node = (Node)getAttribute(PARENT);
        while (node != null) {
-           Accessible acc = node.getAccessible();
+           Accessible acc = getAccessible(node);
            Role role = (Role)acc.getAttribute(ROLE);
            if (role == Role.TABLE_VIEW || role == Role.TREE_TABLE_VIEW) {
                table = node;
@@ -1461,8 +1436,8 @@
            node = (Node)acc.getAttribute(PARENT);
        }
        if (table == null) return null;
-       Node column = (Node)table.getAccessible().getAttribute(COLUMN_AT_INDEX, columnIndex);
-       return new long[] {getAccessible(column)};
+       Node column = (Node)getAccessible(table).getAttribute(COLUMN_AT_INDEX, columnIndex);
+       return new long[] {getNativeAccessible(column)};
     }
 
     long[] GetRowHeaderItems() {
@@ -1497,7 +1472,7 @@
         if (role == Role.TOOL_BAR) {
             Node button = (Node)getAttribute(OVERFLOW_BUTTON);
             if (button != null) {
-                button.getAccessible().executeAction(Action.FIRE);
+                getAccessible(button).executeAction(Action.FIRE);
             }
             return;
         }
@@ -1510,7 +1485,7 @@
         if (role == Role.TOOL_BAR) {
             Node button = (Node)getAttribute(OVERFLOW_BUTTON);
             if (button != null) {
-                button.getAccessible().executeAction(Action.FIRE);
+                getAccessible(button).executeAction(Action.FIRE);
             }
             return;
         }
@@ -1524,7 +1499,7 @@
         if (role == Role.TOOL_BAR) {
             Node button = (Node)getAttribute(OVERFLOW_BUTTON);
             if (button != null) {
-                boolean visible = Boolean.TRUE.equals(button.getAccessible().getAttribute(VISIBLE));
+                boolean visible = Boolean.TRUE.equals(getAccessible(button).getAttribute(VISIBLE));
                 return visible ? ExpandCollapseState_Collapsed : ExpandCollapseState_Expanded;
             }
         }
@@ -1582,7 +1557,7 @@
         /* dealing with vertical scroll first */
         if (get_VerticallyScrollable()) {
             Node vsb = (Node)getAttribute(VERTICAL_SCROLLBAR);
-            Accessible vsba = vsb.getAccessible();
+            Accessible vsba = getAccessible(vsb);
             switch (verticalAmount) {
                 case ScrollAmount_LargeIncrement:
                     vsba.executeAction(Action.BLOCK_INCREMENT);
@@ -1603,7 +1578,7 @@
         /* now dealing with horizontal scroll */
         if (get_HorizontallyScrollable()) {
             Node hsb = (Node)getAttribute(HORIZONTAL_SCROLLBAR);
-            Accessible hsba = hsb.getAccessible();
+            Accessible hsba = getAccessible(hsb);
             switch (horizontalAmount) {
                 case ScrollAmount_LargeIncrement:
                     hsba.executeAction(Action.BLOCK_INCREMENT);
@@ -1628,20 +1603,22 @@
         /* dealing with vertical scroll first */
         if (verticalPercent != UIA_ScrollPatternNoScroll && get_VerticallyScrollable()) {
             Node vsb = (Node)getAttribute(VERTICAL_SCROLLBAR);
-            Double min = (Double)vsb.getAccessible().getAttribute(MIN_VALUE);
-            Double max = (Double)vsb.getAccessible().getAttribute(MAX_VALUE);
+            Accessible acc = getAccessible(vsb);
+            Double min = (Double)acc.getAttribute(MIN_VALUE);
+            Double max = (Double)acc.getAttribute(MAX_VALUE);
             if (min != null && max != null) {
-                vsb.getAccessible().executeAction(Action.SET_VALUE, (max-min)*(verticalPercent/100)+min);
+                acc.executeAction(Action.SET_VALUE, (max-min)*(verticalPercent/100)+min);
             }
         }
 
         /* now dealing with horizontal scroll */
         if (horizontalPercent != UIA_ScrollPatternNoScroll && get_HorizontallyScrollable()) {
             Node hsb = (Node)getAttribute(HORIZONTAL_SCROLLBAR);
-            Double min = (Double)hsb.getAccessible().getAttribute(MIN_VALUE);
-            Double max = (Double)hsb.getAccessible().getAttribute(MAX_VALUE);
+            Accessible acc = getAccessible(hsb);
+            Double min = (Double)acc.getAttribute(MIN_VALUE);
+            Double max = (Double)acc.getAttribute(MAX_VALUE);
             if (min != null && max != null) {
-                hsb.getAccessible().executeAction(Action.SET_VALUE, (max-min)*(horizontalPercent/100)+min);
+                acc.executeAction(Action.SET_VALUE, (max-min)*(horizontalPercent/100)+min);
             }
         }
     }
@@ -1652,7 +1629,7 @@
         Node hsb = (Node)getAttribute(HORIZONTAL_SCROLLBAR);
         if (hsb == null) return false;
 
-        Boolean visible = (Boolean)hsb.getAccessible().getAttribute(VISIBLE);
+        Boolean visible = (Boolean)getAccessible(hsb).getAttribute(VISIBLE);
         return Boolean.TRUE.equals(visible);
     }
 
@@ -1666,7 +1643,7 @@
         Node hsb = (Node) getAttribute(HORIZONTAL_SCROLLBAR);
         if (hsb != null) {
             /* Windows expects a percentage between 0 and 100 */
-            Accessible hsba = hsb.getAccessible();
+            Accessible hsba = getAccessible(hsb);
             Double value = (Double)hsba.getAttribute(VALUE);
             if (value == null) return 0;
             Double max = (Double)hsba.getAttribute(MAX_VALUE);
@@ -1684,7 +1661,7 @@
         if (!get_HorizontallyScrollable()) return 100; /* MSDN spec */
         Node content = (Node) getAttribute(CONTENTS);
         if (content == null) return 100;
-        Bounds contentBounds = (Bounds) content.getAccessible().getAttribute(BOUNDS);
+        Bounds contentBounds = (Bounds)getAccessible(content).getAttribute(BOUNDS);
         if (contentBounds == null) return 0;
         Bounds scrollPaneBounds = (Bounds)getAttribute(BOUNDS);
         if (scrollPaneBounds == null) return 0;
@@ -1697,7 +1674,7 @@
         Node vsb = (Node) getAttribute(VERTICAL_SCROLLBAR);
         if (vsb == null) return false;
 
-        Boolean visible = (Boolean)vsb.getAccessible().getAttribute(VISIBLE);
+        Boolean visible = (Boolean)getAccessible(vsb).getAttribute(VISIBLE);
         return Boolean.TRUE.equals(visible);
     }
 
@@ -1711,7 +1688,7 @@
         Node vsb = (Node) getAttribute(Attribute.VERTICAL_SCROLLBAR);
         if (vsb != null) {
             /* Windows expects a percentage between 0 and 100 */
-            Accessible vsba = vsb.getAccessible();
+            Accessible vsba = getAccessible(vsb);
             Double value = (Double)vsba.getAttribute(VALUE);
             if (value == null) return 0;
             Double max = (Double)vsba.getAttribute(MAX_VALUE);
@@ -1738,7 +1715,7 @@
         if (role == Role.SCROLL_PANE) {
             Node content = (Node) getAttribute(CONTENTS);
             if (content != null) {
-                Bounds contentBounds = (Bounds) content.getAccessible().getAttribute(BOUNDS);
+                Bounds contentBounds = (Bounds)getAccessible(content).getAttribute(BOUNDS);
                 contentHeight = contentBounds == null ? 0 : contentBounds.getHeight();
             }
         } else {
@@ -1775,7 +1752,7 @@
         if (cellIndex == null) cellIndex = (Integer)getAttribute(ROW_INDEX);
         Node container = getContainerNode();
         if (cellIndex != null && container != null) {
-            container.getAccessible().executeAction(Action.SCROLL_TO_INDEX, cellIndex);
+            getAccessible(container).executeAction(Action.SCROLL_TO_INDEX, cellIndex);
         }
     }
 }
--- a/modules/graphics/src/main/java/com/sun/glass/ui/win/WinApplication.java	Mon Jun 30 17:21:27 2014 +0200
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/win/WinApplication.java	Mon Jun 30 14:37:19 2014 -0700
@@ -36,8 +36,6 @@
 import java.security.PrivilegedAction;
 import java.util.List;
 
-import javafx.scene.accessibility.Accessible;
-
 final class WinApplication extends Application implements InvokeLaterDispatcher.InvokeLaterSubmitter {
 
     private static native void initIDs();
@@ -210,8 +208,8 @@
         return WinTimer.getMaxPeriod_impl();
     }
 
-    @Override public PlatformAccessible createAccessible(Accessible accessible) {
-        return WinAccessible.createAccessible(accessible);
+    @Override public Accessible createAccessible() {
+        return new WinAccessible();
     }
 
     @Override protected FileChooserResult staticCommonDialogs_showFileChooser(Window owner, String folder, String filename, String title, int type,
--- a/modules/graphics/src/main/java/com/sun/javafx/scene/NodeHelper.java	Mon Jun 30 17:21:27 2014 +0200
+++ b/modules/graphics/src/main/java/com/sun/javafx/scene/NodeHelper.java	Mon Jun 30 14:37:19 2014 -0700
@@ -25,6 +25,7 @@
 
 package com.sun.javafx.scene;
 
+import com.sun.glass.ui.Accessible;
 import javafx.scene.Node;
 import javafx.scene.SubScene;
 
@@ -53,6 +54,9 @@
         return nodeAccessor.getSubScene(node);
     };
 
+    public static Accessible getAccessible(Node node) {
+        return nodeAccessor.getAccessible(node);
+    };
 
     public static void setNodeAccessor(final NodeAccessor newAccessor) {
         if (nodeAccessor != null) {
@@ -75,6 +79,7 @@
         boolean isDerivedDepthTest(Node node);
         SubScene getSubScene(Node node);
         void setLabeledBy(Node node, Node labeledBy);
+        Accessible getAccessible(Node node);
     }
 
     private static void forceInit(final Class<?> classToInit) {
--- a/modules/graphics/src/main/java/com/sun/javafx/scene/SceneHelper.java	Mon Jun 30 17:21:27 2014 +0200
+++ b/modules/graphics/src/main/java/com/sun/javafx/scene/SceneHelper.java	Mon Jun 30 14:37:19 2014 -0700
@@ -25,6 +25,7 @@
 
 package com.sun.javafx.scene;
 
+import com.sun.glass.ui.Accessible;
 import javafx.scene.Camera;
 import javafx.scene.Node;
 import javafx.scene.Parent;
@@ -60,6 +61,10 @@
         return sceneAccessor.createPopupScene(root);
     }
 
+    public static Accessible getAccessible(Scene scene) {
+        return sceneAccessor.getAccessible(scene);
+    }
+
     public static void setSceneAccessor(final SceneAccessor newAccessor) {
         if (sceneAccessor != null) {
             throw new IllegalStateException();
@@ -83,6 +88,8 @@
         Scene createPopupScene(Parent root);
 
         void setTransientFocusContainer(Scene scene, Node node);
+
+        Accessible getAccessible(Scene scene);
     }
 
     private static void forceInit(final Class<?> classToInit) {
--- a/modules/graphics/src/main/java/com/sun/javafx/tk/TKSceneListener.java	Mon Jun 30 17:21:27 2014 +0200
+++ b/modules/graphics/src/main/java/com/sun/javafx/tk/TKSceneListener.java	Mon Jun 30 14:37:19 2014 -0700
@@ -25,9 +25,9 @@
 
 package com.sun.javafx.tk;
 
+import com.sun.glass.ui.Accessible;
 import javafx.collections.ObservableList;
 import javafx.event.EventType;
-import javafx.scene.accessibility.Accessible;
 import javafx.scene.input.*;
 
 /**
--- a/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/GlassViewEventHandler.java	Mon Jun 30 17:21:27 2014 +0200
+++ b/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/GlassViewEventHandler.java	Mon Jun 30 14:37:19 2014 -0700
@@ -31,6 +31,7 @@
 import com.sun.glass.events.ViewEvent;
 import com.sun.glass.events.TouchEvent;
 import com.sun.glass.events.SwipeGesture;
+import com.sun.glass.ui.Accessible;
 import com.sun.glass.ui.Clipboard;
 import com.sun.glass.ui.ClipboardAssistance;
 import com.sun.glass.ui.View;
@@ -46,7 +47,6 @@
 
 import javafx.event.EventType;
 import javafx.geometry.Point2D;
-import javafx.scene.accessibility.Accessible;
 import javafx.scene.input.InputMethodEvent;
 import javafx.scene.input.InputMethodHighlight;
 import javafx.scene.input.InputMethodTextRun;
--- a/modules/graphics/src/main/java/javafx/scene/Node.java	Mon Jun 30 17:21:27 2014 +0200
+++ b/modules/graphics/src/main/java/javafx/scene/Node.java	Mon Jun 30 14:37:19 2014 -0700
@@ -75,7 +75,6 @@
 import javafx.geometry.Point2D;
 import javafx.geometry.Point3D;
 import javafx.geometry.Rectangle2D;
-import javafx.scene.accessibility.Accessible;
 import javafx.scene.accessibility.Action;
 import javafx.scene.accessibility.Attribute;
 import javafx.scene.accessibility.Role;
@@ -112,6 +111,8 @@
 import java.util.Map;
 import java.util.Set;
 
+import com.sun.glass.ui.Accessible;
+import com.sun.glass.ui.Application;
 import com.sun.javafx.Logging;
 import com.sun.javafx.TempState;
 import com.sun.javafx.Utils;
@@ -9156,9 +9157,15 @@
                 return node.getSubScene();
             }
 
-            @Override public void setLabeledBy(Node node, Node labeledBy) {
+            @Override
+            public void setLabeledBy(Node node, Node labeledBy) {
                 node.labeledBy = labeledBy;
             }
+
+            @Override
+            public Accessible getAccessible(Node node) {
+                return node.getAccessible();
+            }
         });
     }
 
@@ -9207,13 +9214,7 @@
     }
 
     Accessible accessible;
-
-    /**
-     * Experimental API - Do not use (will be removed).
-     *
-     * @treatAsPrivate
-     */
-    public final Accessible getAccessible() {
+    Accessible getAccessible() {
         if (accessible == null) {
             Scene scene = getScene();
             /* It is possible the node was reparented and getAccessible() 
@@ -9229,7 +9230,8 @@
             }
         }
         if (accessible == null) {
-            accessible = new Accessible() {
+            accessible = Application.GetApplication().createAccessible();
+            accessible.setEventHandler(new Accessible.EventHandler() {
                 @Override public Object getAttribute(Attribute attribute, Object... parameters) {
                     return accGetAttribute(attribute, parameters);
                 }
@@ -9240,7 +9242,7 @@
                     String klassName = Node.this.getClass().getName();
                     return klassName.substring(klassName.lastIndexOf('.')+1);
                 }
-            };
+            });
         }
         return accessible;
     }
--- a/modules/graphics/src/main/java/javafx/scene/Scene.java	Mon Jun 30 17:21:27 2014 +0200
+++ b/modules/graphics/src/main/java/javafx/scene/Scene.java	Mon Jun 30 14:37:19 2014 -0700
@@ -25,6 +25,8 @@
 
 package javafx.scene;
 
+import com.sun.glass.ui.Application;
+import com.sun.glass.ui.Accessible;
 import com.sun.javafx.Logging;
 import com.sun.javafx.Utils;
 import com.sun.javafx.application.PlatformImpl;
@@ -69,7 +71,6 @@
 import javafx.css.StyleableObjectProperty;
 import javafx.event.*;
 import javafx.geometry.*;
-import javafx.scene.accessibility.Accessible;
 import javafx.scene.accessibility.Attribute;
 import javafx.scene.accessibility.Role;
 import javafx.scene.image.WritableImage;
@@ -398,6 +399,11 @@
                                 scene.transientFocusContainer = node;
                             }
                         }
+
+                        @Override
+                        public Accessible getAccessible(Scene scene) {
+                            return scene.getAccessible();
+                        }
                     });
         }
 
@@ -6208,13 +6214,7 @@
     }
     
     private Accessible accessible;
-
-    /**
-     * Experimental API - Do not use (will be removed).
-     *
-     * @treatAsPrivate
-     */
-    public Accessible getAccessible() {
+    Accessible getAccessible() {
         /*
          * The accessible for the Scene should never be
          * requested when the peer is not set.
@@ -6225,7 +6225,8 @@
          */
         if (impl_peer == null) return null;
         if (accessible == null) {
-            accessible = new Accessible() {
+            accessible = Application.GetApplication().createAccessible();
+            accessible.setEventHandler(new Accessible.EventHandler() {
                 @Override public Object getAttribute(Attribute attribute,
                                                      Object... parameters) {
                     switch (attribute) {
@@ -6266,7 +6267,7 @@
                     }
                     return super.getAttribute(attribute, parameters);
                 }
-            };
+            });
         }
         return accessible;
     }
--- a/modules/graphics/src/main/java/javafx/scene/accessibility/Accessible.java	Mon Jun 30 17:21:27 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javafx.scene.accessibility;
-
-import com.sun.glass.ui.PlatformAccessible;
-import com.sun.glass.ui.Application;
-
-/**
- * Experimental API - Do not use (will be removed).
- *
- * @treatAsPrivate
- */
-public abstract class Accessible {
-
-    private PlatformAccessible delegate;
-
-    public Accessible() {
-        delegate = Application.GetApplication().createAccessible(this);
-    }
-
-    public final void dispose() {
-        if (delegate != null) {
-            delegate.dispose();
-            delegate = null;
-        }
-    }
-
-    /**
-     * @treatAsPrivate implementation detail
-     * @deprecated This is an internal API that is not intended
-     * for use and will be removed in the next version
-     */
-    public final PlatformAccessible impl_getDelegate() {
-        return delegate;
-    }
-
-    /**
-     * This method is called by the AT to request the value for the given attribute.
-     *
-     * @see Attribute
-     * @param attribute the requested attribute
-     * @param parameters optional list of parameters
-     * @return the value for the requested attribute
-     */
-    public Object getAttribute(Attribute attribute, Object... parameters) {
-        return null;
-    }
-
-    /**
-     * This method is called by the AT to indicate the accessible to execute
-     * the given action.
-     *
-     * @see Action
-     * @param action the action to execute
-     * @param parameters optional list of parameters
-     */
-    public void executeAction(Action action, Object... parameters) {
-    }
-
-    /**
-     * This method is called by Accessible to notify the AT that
-     * the value for the given attribute has changed.
-     *
-     * @see Attribute
-     * @param notification the attribute which value has changed
-     */
-    public void sendNotification(Attribute notification) {
-        if (delegate != null) {
-            delegate.sendNotification(notification);
-        }
-    }
-}