Merge
authorddehaven
Tue, 25 Aug 2015 12:19:46 -0700
changeset 32298 453620b46da1
parent 32277 8671ccb7af7c (current diff)
parent 32297 1f709146c4cb (diff)
child 32299 e5540d66dd2d
child 32489 a7cf1c08d3f8
Merge
jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/java/awt/ButtonTranslator.java
jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/java/awt/CheckboxTranslator.java
jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/java/awt/LabelTranslator.java
jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/java/awt/ListTranslator.java
jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/java/awt/TextComponentTranslator.java
jdk/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/AccessBridge.java
jdk/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/ProviderImpl.java
--- a/jdk/src/demo/share/applets/NervousText/NervousText.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/demo/share/applets/NervousText/NervousText.java	Tue Aug 25 12:19:46 2015 -0700
@@ -72,8 +72,9 @@
     public void init() {
         banner = getParameter("text");
         if (banner == null) {
-            banner = "HotJava";
+            banner = "Java Development Kit ";
         }
+        banner += System.getProperty("java.version", "");
 
         int bannerLength = banner.length();
         StringBuilder bc = new StringBuilder(bannerLength);
--- a/jdk/src/demo/share/applets/NervousText/example1.html	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/demo/share/applets/NervousText/example1.html	Tue Aug 25 12:19:46 2015 -0700
@@ -1,7 +1,7 @@
 <title>Nervous Text 1.1</title>
 <hr>
 <applet code="NervousText.class" width=534 height=50>
-<param name=text value="Java SE Development Kit (JDK) 7.0">
+<param name=text value="Java Development Kit (JDK) ">
 </applet>
 <hr>
 <a href="NervousText.java">The source.</a>
--- a/jdk/src/java.base/share/conf/security/java.security	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.base/share/conf/security/java.security	Tue Aug 25 12:19:46 2015 -0700
@@ -246,6 +246,10 @@
                jdk.nashorn.tools.,\
                jdk.tools.jimage.,\
                com.sun.activation.registries.,\
+               com.sun.java.accessibility.util.internal.,\
+#ifdef windows
+               com.sun.java.accessibility.internal.,\
+#endif
 #ifdef macosx
                apple.,\
 #endif
@@ -297,6 +301,10 @@
                    jdk.nashorn.tools.,\
                    jdk.tools.jimage.,\
                    com.sun.activation.registries.,\
+                   com.sun.java.accessibility.util.internal.,\
+#ifdef windows
+                   com.sun.java.accessibility.internal.,\
+#endif
 #ifdef macosx
                    apple.,\
 #endif
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java	Tue Aug 25 12:19:46 2015 -0700
@@ -746,7 +746,7 @@
      */
     @Override
     public void notifyMouseEvent(int id, long when, int button,
-                                 int x, int y, int screenX, int screenY,
+                                 int x, int y, int absX, int absY,
                                  int modifiers, int clickCount, boolean popupTrigger,
                                  byte[] bdata)
     {
@@ -763,7 +763,7 @@
                             this);
                     Component target = lastMouseEventPeer.getTarget();
                     postMouseExitedEvent(target, when, modifiers, lp,
-                            screenX, screenY, clickCount, popupTrigger, button);
+                            absX, absY, clickCount, popupTrigger, button);
                 }
 
                 // Sometimes we may get MOUSE_EXITED after lastCommonMouseEventPeer is switched
@@ -781,7 +781,7 @@
                     Point lp = targetPeer.windowToLocal(x, y, this);
                     Component target = targetPeer.getTarget();
                     postMouseEnteredEvent(target, when, modifiers, lp,
-                            screenX, screenY, clickCount, popupTrigger, button);
+                            absX, absY, clickCount, popupTrigger, button);
                 }
                 lastCommonMouseEventPeer = targetPeer;
                 lastMouseEventPeer = targetPeer;
@@ -798,12 +798,12 @@
             // implemented in CPlatformEmbeddedFrame class
             if (topmostWindowPeer == this || topmostWindowPeer == null) {
                 generateMouseEnterExitEventsForComponents(when, button, x, y,
-                        screenX, screenY, modifiers, clickCount, popupTrigger,
+                        absX, absY, modifiers, clickCount, popupTrigger,
                         targetPeer);
             } else {
                 LWComponentPeer<?, ?> topmostTargetPeer = topmostWindowPeer.findPeerAt(r.x + x, r.y + y);
                 topmostWindowPeer.generateMouseEnterExitEventsForComponents(when, button, x, y,
-                        screenX, screenY, modifiers, clickCount, popupTrigger,
+                        absX, absY, modifiers, clickCount, popupTrigger,
                         topmostTargetPeer);
             }
 
@@ -874,7 +874,7 @@
             if (targetPeer.isEnabled()) {
                 MouseEvent event = new MouseEvent(targetPeer.getTarget(), id,
                                                   when, modifiers, lp.x, lp.y,
-                                                  screenX, screenY, clickCount,
+                                                  absX, absY, clickCount,
                                                   popupTrigger, button);
                 postEvent(event);
             }
@@ -885,7 +885,7 @@
                     postEvent(new MouseEvent(targetPeer.getTarget(),
                                              MouseEvent.MOUSE_CLICKED,
                                              when, modifiers,
-                                             lp.x, lp.y, screenX, screenY,
+                                             lp.x, lp.y, absX, absY,
                                              clickCount, popupTrigger, button));
                 }
                 mouseClickButtons &= ~eventButtonMask;
@@ -948,10 +948,10 @@
     }
 
     @Override
-    public void notifyMouseWheelEvent(long when, int x, int y, int modifiers,
-                                      int scrollType, int scrollAmount,
-                                      int wheelRotation, double preciseWheelRotation,
-                                      byte[] bdata)
+    public void notifyMouseWheelEvent(long when, int x, int y, int absX,
+                                      int absY, int modifiers, int scrollType,
+                                      int scrollAmount, int wheelRotation,
+                                      double preciseWheelRotation, byte[] bdata)
     {
         // TODO: could we just use the last mouse event target here?
         Rectangle r = getBounds();
@@ -963,12 +963,11 @@
 
         Point lp = targetPeer.windowToLocal(x, y, this);
         // TODO: fill "bdata" member of AWTEvent
-        // TODO: screenX/screenY
         postEvent(new MouseWheelEvent(targetPeer.getTarget(),
                                       MouseEvent.MOUSE_WHEEL,
                                       when, modifiers,
                                       lp.x, lp.y,
-                                      0, 0, /* screenX, Y */
+                                      absX, absY, /* absX, absY */
                                       0 /* clickCount */, false /* popupTrigger */,
                                       scrollType, scrollAmount,
                                       wheelRotation, preciseWheelRotation));
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/PlatformEventNotifier.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/PlatformEventNotifier.java	Tue Aug 25 12:19:46 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -49,14 +49,14 @@
      * point of the client area is (insets.top, insets.left).
      */
     void notifyMouseEvent(int id, long when, int button,
-                          int x, int y, int screenX, int screenY,
+                          int x, int y, int absX, int absY,
                           int modifiers, int clickCount, boolean popupTrigger,
                           byte[] bdata);
 
-    void notifyMouseWheelEvent(long when, int x, int y, int modifiers,
-                               int scrollType, int scrollAmount,
-                               int wheelRotation, double preciseWheelRotation,
-                               byte[] bdata);
+    void notifyMouseWheelEvent(long when, int x, int y, final int absX,
+                               final int absY, int modifiers, int scrollType,
+                               int scrollAmount, int wheelRotation,
+                               double preciseWheelRotation, byte[] bdata);
     /*
      * Called by the delegate when a key is pressed.
      */
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java	Tue Aug 25 12:19:46 2015 -0700
@@ -26,8 +26,6 @@
 package sun.lwawt.macosx;
 
 import java.awt.*;
-import java.awt.image.*;
-import sun.awt.image.ImageRepresentation;
 
 import java.io.*;
 import java.net.URL;
@@ -35,6 +33,7 @@
 import java.text.Normalizer;
 import java.text.Normalizer.Form;
 import java.util.*;
+import java.util.regex.*;
 
 import java.awt.datatransfer.*;
 import sun.awt.datatransfer.*;
@@ -123,26 +122,52 @@
 
     @Override
     public Object translateBytes(byte[] bytes, DataFlavor flavor,
-                                    long format, Transferable transferable) throws IOException {
+                                 long format, Transferable transferable) throws IOException {
+
+        if (format == CF_URL && URL.class.equals(flavor.getRepresentationClass())) {
+            String charset = Charset.defaultCharset().name();
+            if (transferable != null && transferable.isDataFlavorSupported(javaTextEncodingFlavor)) {
+                try {
+                    charset = new String((byte[]) transferable.getTransferData(javaTextEncodingFlavor), "UTF-8");
+                } catch (UnsupportedFlavorException cannotHappen) {
+                }
+            }
+            String xml = new String(bytes, charset);
+            // macosx pasteboard returns a property list that consists of one URL
+            // let's extract it.
+            return new URL(extractURL(xml));
+        }
+
+        if (format == CF_STRING) {
+            bytes = Normalizer.normalize(new String(bytes, "UTF8"), Form.NFC).getBytes("UTF8");
+        }
+
+        return super.translateBytes(bytes, flavor, format, transferable);
+    }
 
-            if (format == CF_URL && URL.class.equals(flavor.getRepresentationClass()))
-            {
-                String charset = Charset.defaultCharset().name();
-                if (transferable != null && transferable.isDataFlavorSupported(javaTextEncodingFlavor)) {
-                    try {
-                        charset = new String((byte[])transferable.getTransferData(javaTextEncodingFlavor), "UTF-8");
-                    } catch (UnsupportedFlavorException cannotHappen) {
-                    }
-                }
-
-                return new URL(new String(bytes, charset));
-            }
-
-            if (format == CF_STRING) {
-                bytes = Normalizer.normalize(new String(bytes, "UTF8"), Form.NFC).getBytes("UTF8");
-            }
-
-            return super.translateBytes(bytes, flavor, format, transferable);
+    /**
+     * Macosx pasteboard returns xml document that contains one URL, for exmple:
+     * <pre>
+     *     {@code
+     * <?xml version=\"1.0\" encoding=\"UTF-8\"?>
+     * <!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
+     * <plist version=\"1.0\">
+     *      <array>
+     *          <string>file:///path_to_file</string>
+     *          <string></string>
+     *      </array>
+     * </plist>
+     *     }
+     * </pre>
+     */
+    private String extractURL(String xml) {
+        Pattern urlExtractorPattern = Pattern.compile("<string>(.*)</string>");
+        Matcher matcher = urlExtractorPattern.matcher(xml);
+        if (matcher.find()) {
+            return matcher.group(1);
+        } else {
+            return null;
+        }
     }
 
     @Override
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java	Tue Aug 25 12:19:46 2015 -0700
@@ -75,8 +75,8 @@
         int x = (int)pluginX;
         int y = (int)pluginY;
         Point locationOnScreen = getLocationOnScreen();
-        int screenX = locationOnScreen.x + x;
-        int screenY = locationOnScreen.y + y;
+        int absX = locationOnScreen.x + x;
+        int absY = locationOnScreen.y + y;
 
         if (eventType == CocoaConstants.NPCocoaEventMouseEntered) {
             CCursorManager.nativeSetAllowsCursorSetInBackground(true);
@@ -85,15 +85,19 @@
         }
 
         responder.handleMouseEvent(eventType, modifierFlags, buttonNumber,
-                                   clickCount, x, y, screenX, screenY);
+                                   clickCount, x, y, absX, absY);
     }
 
     public void handleScrollEvent(double pluginX, double pluginY, int modifierFlags,
                                   double deltaX, double deltaY, double deltaZ) {
         int x = (int)pluginX;
         int y = (int)pluginY;
+        Point locationOnScreen = getLocationOnScreen();
+        int absX = locationOnScreen.x + x;
+        int absY = locationOnScreen.y + y;
 
-        responder.handleScrollEvent(x, y, modifierFlags, deltaX, deltaY);
+        responder.handleScrollEvent(x, y, absX, absY, modifierFlags, deltaX,
+                                    deltaY);
     }
 
     public void handleKeyEvent(int eventType, int modifierFlags, String characters,
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java	Tue Aug 25 12:19:46 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -54,8 +54,7 @@
      * Handles mouse events.
      */
     void handleMouseEvent(int eventType, int modifierFlags, int buttonNumber,
-                          int clickCount, int x, int y, int absoluteX,
-                          int absoluteY) {
+                          int clickCount, int x, int y, int absX, int absY) {
         final SunToolkit tk = (SunToolkit)Toolkit.getDefaultToolkit();
         if ((buttonNumber > 2 && !tk.areExtraMouseButtonsEnabled())
                 || buttonNumber > tk.getNumberOfButtons() - 1) {
@@ -81,14 +80,15 @@
         boolean jpopupTrigger = NSEvent.isPopupTrigger(jmodifiers);
 
         eventNotifier.notifyMouseEvent(jeventType, System.currentTimeMillis(), jbuttonNumber,
-                x, y, absoluteX, absoluteY, jmodifiers, jclickCount,
+                x, y, absX, absY, jmodifiers, jclickCount,
                 jpopupTrigger, null);
     }
 
     /**
      * Handles scroll events.
      */
-    void handleScrollEvent(final int x, final int y, final int modifierFlags,
+    void handleScrollEvent(final int x, final int y, final int absX,
+                           final int absY, final int modifierFlags,
                            final double deltaX, final double deltaY) {
         final int buttonNumber = CocoaConstants.kCGMouseButtonCenter;
         int jmodifiers = NSEvent.nsToJavaMouseModifiers(buttonNumber,
@@ -97,18 +97,19 @@
 
         // Vertical scroll.
         if (!isShift && deltaY != 0.0) {
-            dispatchScrollEvent(x, y, jmodifiers, deltaY);
+            dispatchScrollEvent(x, y, absX, absY, jmodifiers, deltaY);
         }
         // Horizontal scroll or shirt+vertical scroll.
         final double delta = isShift && deltaY != 0.0 ? deltaY : deltaX;
         if (delta != 0.0) {
             jmodifiers |= InputEvent.SHIFT_DOWN_MASK;
-            dispatchScrollEvent(x, y, jmodifiers, delta);
+            dispatchScrollEvent(x, y, absX, absY, jmodifiers, delta);
         }
     }
 
-    private void dispatchScrollEvent(final int x, final int y,
-                                     final int modifiers, final double delta) {
+    private void dispatchScrollEvent(final int x, final int y, final int absX,
+                                     final int absY, final int modifiers,
+                                     final double delta) {
         final long when = System.currentTimeMillis();
         final int scrollType = MouseWheelEvent.WHEEL_UNIT_SCROLL;
         final int scrollAmount = 1;
@@ -118,8 +119,9 @@
             wheelRotation = signum;
         }
         // invert the wheelRotation for the peer
-        eventNotifier.notifyMouseWheelEvent(when, x, y, modifiers, scrollType,
-                scrollAmount, -wheelRotation, -delta, null);
+        eventNotifier.notifyMouseWheelEvent(when, x, y, absX, absY, modifiers,
+                                            scrollType, scrollAmount,
+                                            -wheelRotation, -delta, null);
     }
 
     /**
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformView.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformView.java	Tue Aug 25 12:19:46 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -186,16 +186,19 @@
     }
 
 
-    private void deliverMouseEvent(NSEvent event) {
+    private void deliverMouseEvent(final NSEvent event) {
         int x = event.getX();
         int y = getBounds().height - event.getY();
+        int absX = event.getAbsX();
+        int absY = event.getAbsY();
 
         if (event.getType() == CocoaConstants.NSScrollWheel) {
-            responder.handleScrollEvent(x, y, event.getModifierFlags(),
+            responder.handleScrollEvent(x, y, absX, absY, event.getModifierFlags(),
                                         event.getScrollDeltaX(), event.getScrollDeltaY());
         } else {
             responder.handleMouseEvent(event.getType(), event.getModifierFlags(), event.getButtonNumber(),
-                                       event.getClickCount(), x, y, event.getAbsX(), event.getAbsY());
+                                       event.getClickCount(), x, y,
+                                       absX, absY);
         }
     }
 
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java	Tue Aug 25 12:19:46 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -173,7 +173,7 @@
 
     @Override
     public void notifyMouseEvent(int id, long when, int button, int x, int y,
-                                 int screenX, int screenY, int modifiers,
+                                 int absX, int absY, int modifiers,
                                  int clickCount, boolean popupTrigger,
                                  byte[] bdata) {
         LWWindowPeer peer = ownerPeer.get();
@@ -239,9 +239,10 @@
     }
 
     @Override
-    public void notifyMouseWheelEvent(long when, int x, int y, int modifiers,
-                                      int scrollType, int scrollAmount,
-                                      int wheelRotation, double preciseWheelRotation,
+    public void notifyMouseWheelEvent(long when, int x, int y, int absX,
+                                      int absY, int modifiers, int scrollType,
+                                      int scrollAmount, int wheelRotation,
+                                      double preciseWheelRotation,
                                       byte[] bdata) {
     }
 
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m	Tue Aug 25 12:19:46 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -71,7 +71,7 @@
     return eventCount;
 }
 
-+ (void) eventCountPlusPlus{    
++ (void) eventCountPlusPlus{
     eventCount++;
 }
 
@@ -167,7 +167,7 @@
                                                ^(CFRunLoopObserverRef observer, CFRunLoopActivity activity) {
                                                    setBusy(YES);
                                                });
-        
+
         CFRunLoopObserverRef notBusyObserver = CFRunLoopObserverCreateWithHandler(
                                                 NULL,                        // CFAllocator
                                                 kCFRunLoopBeforeWaiting,     // CFOptionFlags
@@ -176,14 +176,14 @@
                                                 ^(CFRunLoopObserverRef observer, CFRunLoopActivity activity) {
                                                     setBusy(NO);
                                                 });
-        
+
         CFRunLoopRef runLoop = [[NSRunLoop currentRunLoop] getCFRunLoop];
         CFRunLoopAddObserver(runLoop, busyObserver, kCFRunLoopDefaultMode);
         CFRunLoopAddObserver(runLoop, notBusyObserver, kCFRunLoopDefaultMode);
-        
+
         CFRelease(busyObserver);
         CFRelease(notBusyObserver);
-        
+
         setBusy(YES);
     }
 
@@ -344,19 +344,19 @@
         // We're either embedded, or showing a splash screen
         if (isEmbedded) {
             AWT_STARTUP_LOG(@"running embedded");
-            
+
             // We don't track if the runloop is busy, so set it free to let AWT finish when it needs
             setBusy(NO);
         } else {
             AWT_STARTUP_LOG(@"running after showing a splash screen");
         }
-        
+
         // Signal so that JNI_OnLoad can proceed.
         if (!wasOnMainThread) [AWTStarter appKitIsRunning:nil];
-        
+
         // Proceed to exit this call as there is no reason to run the NSApplication event loop.
     }
-    
+
     [pool drain];
 }
 
@@ -370,24 +370,34 @@
 JNIEXPORT jboolean JNICALL Java_sun_lwawt_macosx_LWCToolkit_nativeSyncQueue
 (JNIEnv *env, jobject self, jlong timeout)
 {
-    int currentEventNum = [AWTToolkit getEventCount];
+    long currentEventNum = [AWTToolkit getEventCount];
 
     NSApplication* sharedApp = [NSApplication sharedApplication];
     if ([sharedApp isKindOfClass:[NSApplicationAWT class]]) {
         NSApplicationAWT* theApp = (NSApplicationAWT*)sharedApp;
-        [theApp postDummyEvent];
-        [theApp waitForDummyEvent:timeout];
+        // We use two different API to post events to the application,
+        //  - [NSApplication postEvent]
+        //  - CGEventPost(), see CRobot.m
+        // It was found that if we post an event via CGEventPost in robot and
+        // immediately after this we will post the second event via
+        // [NSApp postEvent] then sometimes the second event will be handled
+        // first. The opposite isn't proved, but we use both here to be safer.
+        [theApp postDummyEvent:false];
+        [theApp waitForDummyEvent:timeout / 2.0];
+        [theApp postDummyEvent:true];
+        [theApp waitForDummyEvent:timeout / 2.0];
+
     } else {
         // could happen if we are embedded inside SWT application,
-        // in this case just spin a single empty block through 
+        // in this case just spin a single empty block through
         // the event loop to give it a chance to process pending events
         [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){}];
     }
-    
+
     if (([AWTToolkit getEventCount] - currentEventNum) != 0) {
         return JNI_TRUE;
     }
-        
+
     return JNI_FALSE;
 }
 
@@ -516,7 +526,7 @@
                                              beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.010]];
         if (processEvents) {
             //We do not spin a runloop here as date is nil, so does not matter which mode to use
-            // Processing all events excluding NSApplicationDefined which need to be processed 
+            // Processing all events excluding NSApplicationDefined which need to be processed
             // on the main loop only (those events are intended for disposing resources)
             NSEvent *event;
             if ((event = [NSApp nextEventMatchingMask:(NSAnyEventMask & ~NSApplicationDefined)
--- a/jdk/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.h	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.h	Tue Aug 25 12:19:46 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -36,9 +36,9 @@
 - (void) finishLaunching;
 - (void) registerWithProcessManager;
 - (void) setDockIconWithEnv:(JNIEnv *)env;
-- (void) postDummyEvent;
+- (void) postDummyEvent:(bool) useCocoa;
 - (void) postRunnableEvent:(void (^)())block;
-- (void) waitForDummyEvent:(long long) timeout;
+- (void) waitForDummyEvent:(double) timeout;
 
 + (void) runAWTLoopWithApp:(NSApplication*)app;
 
--- a/jdk/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m	Tue Aug 25 12:19:46 2015 -0700
@@ -349,6 +349,7 @@
             && [event subtype] == NativeSyncQueueEvent) {
         [seenDummyEventLock lockWhenCondition:NO];
         [seenDummyEventLock unlockWithCondition:YES];
+
     } else if ([event type] == NSApplicationDefined && [event subtype] == ExecuteBlockEvent) {
         void (^block)() = (void (^)()) [event data1];
         block();
@@ -387,9 +388,7 @@
     [pool drain];
 }
 
-
-
-- (void)postDummyEvent {
+- (void)postDummyEvent:(bool)useCocoa {
     seenDummyEventLock = [[NSConditionLock alloc] initWithCondition:NO];
     dummyEventTimestamp = [NSProcessInfo processInfo].systemUptime;
 
@@ -403,19 +402,28 @@
                                          subtype: NativeSyncQueueEvent
                                            data1: 0
                                            data2: 0];
-    [NSApp postEvent: event atStart: NO];
+    if (useCocoa) {
+        [NSApp postEvent:event atStart:NO];
+    } else {
+        ProcessSerialNumber psn;
+        GetCurrentProcess(&psn);
+        CGEventPostToPSN(&psn, [event CGEvent]);
+    }
     [pool drain];
 }
 
-- (void)waitForDummyEvent:(long long) timeout {
+- (void)waitForDummyEvent:(double)timeout {
+    bool unlock = true;
     if (timeout >= 0) {
-        double sec = ((double) timeout)/1000;
-        [seenDummyEventLock lockWhenCondition:YES
+        double sec = timeout / 1000;
+        unlock = [seenDummyEventLock lockWhenCondition:YES
                                beforeDate:[NSDate dateWithTimeIntervalSinceNow:sec]];
     } else {
         [seenDummyEventLock lockWhenCondition:YES];
     }
-    [seenDummyEventLock unlock];
+    if (unlock) {
+        [seenDummyEventLock unlock];
+    }
     [seenDummyEventLock release];
 
     seenDummyEventLock = nil;
--- a/jdk/src/java.desktop/share/classes/java/applet/AppletContext.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/applet/AppletContext.java	Tue Aug 25 12:19:46 2015 -0700
@@ -55,8 +55,8 @@
     AudioClip getAudioClip(URL url);
 
     /**
-     * Returns an <code>Image</code> object that can then be painted on
-     * the screen. The <code>url</code> argument that is
+     * Returns an {@code Image} object that can then be painted on
+     * the screen. The {@code url} argument that is
      * passed as an argument must specify an absolute URL.
      * <p>
      * This method always returns immediately, whether or not the image
@@ -73,10 +73,10 @@
     /**
      * Finds and returns the applet in the document represented by this
      * applet context with the given name. The name can be set in the
-     * HTML tag by setting the <code>name</code> attribute.
+     * HTML tag by setting the {@code name} attribute.
      *
      * @param   name   an applet name.
-     * @return  the applet with the given name, or <code>null</code> if
+     * @return  the applet with the given name, or {@code null} if
      *          not found.
      */
     Applet getApplet(String name);
@@ -92,7 +92,7 @@
 
     /**
      * Requests that the browser or applet viewer show the Web page
-     * indicated by the <code>url</code> argument. The browser or
+     * indicated by the {@code url} argument. The browser or
      * applet viewer determines which window or frame to display the
      * Web page. This method may be ignored by applet contexts that
      * are not browsers.
@@ -103,22 +103,22 @@
 
     /**
      * Requests that the browser or applet viewer show the Web page
-     * indicated by the <code>url</code> argument. The
-     * <code>target</code> argument indicates in which HTML frame the
+     * indicated by the {@code url} argument. The
+     * {@code target} argument indicates in which HTML frame the
      * document is to be displayed.
      * The target argument is interpreted as follows:
      *
      * <center><table border="3" summary="Target arguments and their descriptions">
      * <tr><th>Target Argument</th><th>Description</th></tr>
-     * <tr><td><code>"_self"</code>  <td>Show in the window and frame that
+     * <tr><td>{@code "_self"}  <td>Show in the window and frame that
      *                                   contain the applet.</tr>
-     * <tr><td><code>"_parent"</code><td>Show in the applet's parent frame. If
+     * <tr><td>{@code "_parent"}<td>Show in the applet's parent frame. If
      *                                   the applet's frame has no parent frame,
      *                                   acts the same as "_self".</tr>
-     * <tr><td><code>"_top"</code>   <td>Show in the top-level frame of the applet's
+     * <tr><td>{@code "_top"}   <td>Show in the top-level frame of the applet's
      *                                   window. If the applet's frame is the
      *                                   top-level frame, acts the same as "_self".</tr>
-     * <tr><td><code>"_blank"</code> <td>Show in a new, unnamed
+     * <tr><td>{@code "_blank"} <td>Show in a new, unnamed
      *                                   top-level window.</tr>
      * <tr><td><i>name</i><td>Show in the frame or window named <i>name</i>. If
      *                        a target named <i>name</i> does not already exist, a
@@ -126,10 +126,10 @@
      *                        and the document is shown there.</tr>
      * </table> </center>
      * <p>
-     * An applet viewer or browser is free to ignore <code>showDocument</code>.
+     * An applet viewer or browser is free to ignore {@code showDocument}.
      *
      * @param   url   an absolute URL giving the location of the document.
-     * @param   target   a <code>String</code> indicating where to display
+     * @param   target   a {@code String} indicating where to display
      *                   the page.
      */
     public void showDocument(URL url, String target);
@@ -155,7 +155,7 @@
      *
      * @param key key with which the specified value is to be associated.
      * @param stream stream to be associated with the specified key. If this
-     *               parameter is <code>null</code>, the specified key is removed
+     *               parameter is {@code null}, the specified key is removed
      *               in this applet context.
      * @throws IOException if the stream size exceeds a certain
      *         size limit. Size limit is decided by the implementor of this
@@ -166,7 +166,7 @@
 
     /**
      * Returns the stream to which specified key is associated within this
-     * applet context. Returns <tt>null</tt> if the applet context contains
+     * applet context. Returns {@code null} if the applet context contains
      * no stream for this key.
      * <p>
      * For security reasons, mapping of streams and keys exists for each
--- a/jdk/src/java.desktop/share/classes/java/applet/AppletStub.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/applet/AppletStub.java	Tue Aug 25 12:19:46 2015 -0700
@@ -28,7 +28,7 @@
 
 /**
  * When an applet is first created, an applet stub is attached to it
- * using the applet's <code>setStub</code> method. This stub
+ * using the applet's {@code setStub} method. This stub
  * serves as the interface between the applet and the browser
  * environment or applet viewer environment in which the application
  * is running.
@@ -40,11 +40,11 @@
 public interface AppletStub {
     /**
      * Determines if the applet is active. An applet is active just
-     * before its <code>start</code> method is called. It becomes
-     * inactive just before its <code>stop</code> method is called.
+     * before its {@code start} method is called. It becomes
+     * inactive just before its {@code stop} method is called.
      *
-     * @return  <code>true</code> if the applet is active;
-     *          <code>false</code> otherwise.
+     * @return  {@code true} if the applet is active;
+     *          {@code false} otherwise.
      */
     boolean isActive();
 
@@ -85,12 +85,12 @@
      * &lt;/applet&gt;
      * </pre></blockquote>
      * <p>
-     * then a call to <code>getParameter("Color")</code> returns the
-     * value <code>"blue"</code>.
+     * then a call to {@code getParameter("Color")} returns the
+     * value {@code "blue"}.
      *
      * @param   name   a parameter name.
      * @return  the value of the named parameter,
-     * or <tt>null</tt> if not set.
+     * or {@code null} if not set.
      */
     String getParameter(String name);
 
--- a/jdk/src/java.desktop/share/classes/java/awt/BasicStroke.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/awt/BasicStroke.java	Tue Aug 25 12:19:46 2015 -0700
@@ -30,14 +30,14 @@
 import java.lang.annotation.Native;
 
 /**
- * The <code>BasicStroke</code> class defines a basic set of rendering
+ * The {@code BasicStroke} class defines a basic set of rendering
  * attributes for the outlines of graphics primitives, which are rendered
  * with a {@link Graphics2D} object that has its Stroke attribute set to
- * this <code>BasicStroke</code>.
- * The rendering attributes defined by <code>BasicStroke</code> describe
+ * this {@code BasicStroke}.
+ * The rendering attributes defined by {@code BasicStroke} describe
  * the shape of the mark made by a pen drawn along the outline of a
  * {@link Shape} and the decorations applied at the ends and joins of
- * path segments of the <code>Shape</code>.
+ * path segments of the {@code Shape}.
  * These rendering attributes include:
  * <dl>
  * <dt><i>width</i>
@@ -73,32 +73,32 @@
  * </dl>
  * All attributes that specify measurements and distances controlling
  * the shape of the returned outline are measured in the same
- * coordinate system as the original unstroked <code>Shape</code>
- * argument.  When a <code>Graphics2D</code> object uses a
- * <code>Stroke</code> object to redefine a path during the execution
- * of one of its <code>draw</code> methods, the geometry is supplied
- * in its original form before the <code>Graphics2D</code> transform
+ * coordinate system as the original unstroked {@code Shape}
+ * argument.  When a {@code Graphics2D} object uses a
+ * {@code Stroke} object to redefine a path during the execution
+ * of one of its {@code draw} methods, the geometry is supplied
+ * in its original form before the {@code Graphics2D} transform
  * attribute is applied.  Therefore, attributes such as the pen width
  * are interpreted in the user space coordinate system of the
- * <code>Graphics2D</code> object and are subject to the scaling and
+ * {@code Graphics2D} object and are subject to the scaling and
  * shearing effects of the user-space-to-device-space transform in that
- * particular <code>Graphics2D</code>.
+ * particular {@code Graphics2D}.
  * For example, the width of a rendered shape's outline is determined
- * not only by the width attribute of this <code>BasicStroke</code>,
+ * not only by the width attribute of this {@code BasicStroke},
  * but also by the transform attribute of the
- * <code>Graphics2D</code> object.  Consider this code:
- * <blockquote><tt>
+ * {@code Graphics2D} object.  Consider this code:
+ * <blockquote><pre>{@code
  *      // sets the Graphics2D object's Transform attribute
  *      g2d.scale(10, 10);
  *      // sets the Graphics2D object's Stroke attribute
  *      g2d.setStroke(new BasicStroke(1.5f));
- * </tt></blockquote>
+ * }</pre></blockquote>
  * Assuming there are no other scaling transforms added to the
- * <code>Graphics2D</code> object, the resulting line
+ * {@code Graphics2D} object, the resulting line
  * will be approximately 15 pixels wide.
  * As the example code demonstrates, a floating-point line
  * offers better precision, especially when large transforms are
- * used with a <code>Graphics2D</code> object.
+ * used with a {@code Graphics2D} object.
  * When a line is diagonal, the exact width depends on how the
  * rendering pipeline chooses which pixels to fill as it traces the
  * theoretical widened outline.  The choice of which pixels to turn
@@ -107,7 +107,7 @@
  * partially-covered pixels.
  * <p>
  * For more information on the user space coordinate system and the
- * rendering process, see the <code>Graphics2D</code> class comments.
+ * rendering process, see the {@code Graphics2D} class comments.
  * @see Graphics2D
  * @author Jim Graham
  */
@@ -161,30 +161,30 @@
     float dash_phase;
 
     /**
-     * Constructs a new <code>BasicStroke</code> with the specified
+     * Constructs a new {@code BasicStroke} with the specified
      * attributes.
-     * @param width the width of this <code>BasicStroke</code>.  The
+     * @param width the width of this {@code BasicStroke}.  The
      *         width must be greater than or equal to 0.0f.  If width is
      *         set to 0.0f, the stroke is rendered as the thinnest
      *         possible line for the target device and the antialias
      *         hint setting.
-     * @param cap the decoration of the ends of a <code>BasicStroke</code>
+     * @param cap the decoration of the ends of a {@code BasicStroke}
      * @param join the decoration applied where path segments meet
      * @param miterlimit the limit to trim the miter join.  The miterlimit
      *        must be greater than or equal to 1.0f.
      * @param dash the array representing the dashing pattern
      * @param dash_phase the offset to start the dashing pattern
-     * @throws IllegalArgumentException if <code>width</code> is negative
-     * @throws IllegalArgumentException if <code>cap</code> is not either
+     * @throws IllegalArgumentException if {@code width} is negative
+     * @throws IllegalArgumentException if {@code cap} is not either
      *         CAP_BUTT, CAP_ROUND or CAP_SQUARE
-     * @throws IllegalArgumentException if <code>miterlimit</code> is less
-     *         than 1 and <code>join</code> is JOIN_MITER
-     * @throws IllegalArgumentException if <code>join</code> is not
+     * @throws IllegalArgumentException if {@code miterlimit} is less
+     *         than 1 and {@code join} is JOIN_MITER
+     * @throws IllegalArgumentException if {@code join} is not
      *         either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER
-     * @throws IllegalArgumentException if <code>dash_phase</code>
-     *         is negative and <code>dash</code> is not <code>null</code>
+     * @throws IllegalArgumentException if {@code dash_phase}
+     *         is negative and {@code dash} is not {@code null}
      * @throws IllegalArgumentException if the length of
-     *         <code>dash</code> is zero
+     *         {@code dash} is zero
      * @throws IllegalArgumentException if dash lengths are all zero.
      */
     @ConstructorProperties({ "lineWidth", "endCap", "lineJoin", "miterLimit", "dashArray", "dashPhase" })
@@ -231,18 +231,18 @@
     }
 
     /**
-     * Constructs a solid <code>BasicStroke</code> with the specified
+     * Constructs a solid {@code BasicStroke} with the specified
      * attributes.
-     * @param width the width of the <code>BasicStroke</code>
-     * @param cap the decoration of the ends of a <code>BasicStroke</code>
+     * @param width the width of the {@code BasicStroke}
+     * @param cap the decoration of the ends of a {@code BasicStroke}
      * @param join the decoration applied where path segments meet
      * @param miterlimit the limit to trim the miter join
-     * @throws IllegalArgumentException if <code>width</code> is negative
-     * @throws IllegalArgumentException if <code>cap</code> is not either
+     * @throws IllegalArgumentException if {@code width} is negative
+     * @throws IllegalArgumentException if {@code cap} is not either
      *         CAP_BUTT, CAP_ROUND or CAP_SQUARE
-     * @throws IllegalArgumentException if <code>miterlimit</code> is less
-     *         than 1 and <code>join</code> is JOIN_MITER
-     * @throws IllegalArgumentException if <code>join</code> is not
+     * @throws IllegalArgumentException if {@code miterlimit} is less
+     *         than 1 and {@code join} is JOIN_MITER
+     * @throws IllegalArgumentException if {@code join} is not
      *         either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER
      */
     public BasicStroke(float width, int cap, int join, float miterlimit) {
@@ -250,17 +250,17 @@
     }
 
     /**
-     * Constructs a solid <code>BasicStroke</code> with the specified
-     * attributes.  The <code>miterlimit</code> parameter is
+     * Constructs a solid {@code BasicStroke} with the specified
+     * attributes.  The {@code miterlimit} parameter is
      * unnecessary in cases where the default is allowable or the
      * line joins are not specified as JOIN_MITER.
-     * @param width the width of the <code>BasicStroke</code>
-     * @param cap the decoration of the ends of a <code>BasicStroke</code>
+     * @param width the width of the {@code BasicStroke}
+     * @param cap the decoration of the ends of a {@code BasicStroke}
      * @param join the decoration applied where path segments meet
-     * @throws IllegalArgumentException if <code>width</code> is negative
-     * @throws IllegalArgumentException if <code>cap</code> is not either
+     * @throws IllegalArgumentException if {@code width} is negative
+     * @throws IllegalArgumentException if {@code cap} is not either
      *         CAP_BUTT, CAP_ROUND or CAP_SQUARE
-     * @throws IllegalArgumentException if <code>join</code> is not
+     * @throws IllegalArgumentException if {@code join} is not
      *         either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER
      */
     public BasicStroke(float width, int cap, int join) {
@@ -268,18 +268,18 @@
     }
 
     /**
-     * Constructs a solid <code>BasicStroke</code> with the specified
+     * Constructs a solid {@code BasicStroke} with the specified
      * line width and with default values for the cap and join
      * styles.
-     * @param width the width of the <code>BasicStroke</code>
-     * @throws IllegalArgumentException if <code>width</code> is negative
+     * @param width the width of the {@code BasicStroke}
+     * @throws IllegalArgumentException if {@code width} is negative
      */
     public BasicStroke(float width) {
         this(width, CAP_SQUARE, JOIN_MITER, 10.0f, null, 0.0f);
     }
 
     /**
-     * Constructs a new <code>BasicStroke</code> with defaults for all
+     * Constructs a new {@code BasicStroke} with defaults for all
      * attributes.
      * The default attributes are a solid line of width 1.0, CAP_SQUARE,
      * JOIN_MITER, a miter limit of 10.0.
@@ -290,10 +290,10 @@
 
 
     /**
-     * Returns a <code>Shape</code> whose interior defines the
-     * stroked outline of a specified <code>Shape</code>.
-     * @param s the <code>Shape</code> boundary be stroked
-     * @return the <code>Shape</code> of the stroked outline.
+     * Returns a {@code Shape} whose interior defines the
+     * stroked outline of a specified {@code Shape}.
+     * @param s the {@code Shape} boundary be stroked
+     * @return the {@code Shape} of the stroked outline.
      */
     public Shape createStrokedShape(Shape s) {
         sun.java2d.pipe.RenderingEngine re =
@@ -305,9 +305,9 @@
     /**
      * Returns the line width.  Line width is represented in user space,
      * which is the default-coordinate space used by Java 2D.  See the
-     * <code>Graphics2D</code> class comments for more information on
+     * {@code Graphics2D} class comments for more information on
      * the user space coordinate system.
-     * @return the line width of this <code>BasicStroke</code>.
+     * @return the line width of this {@code BasicStroke}.
      * @see Graphics2D
      */
     public float getLineWidth() {
@@ -316,8 +316,8 @@
 
     /**
      * Returns the end cap style.
-     * @return the end cap style of this <code>BasicStroke</code> as one
-     * of the static <code>int</code> values that define possible end cap
+     * @return the end cap style of this {@code BasicStroke} as one
+     * of the static {@code int} values that define possible end cap
      * styles.
      */
     public int getEndCap() {
@@ -326,8 +326,8 @@
 
     /**
      * Returns the line join style.
-     * @return the line join style of the <code>BasicStroke</code> as one
-     * of the static <code>int</code> values that define possible line
+     * @return the line join style of the {@code BasicStroke} as one
+     * of the static {@code int} values that define possible line
      * join styles.
      */
     public int getLineJoin() {
@@ -336,7 +336,7 @@
 
     /**
      * Returns the limit of miter joins.
-     * @return the limit of miter joins of the <code>BasicStroke</code>.
+     * @return the limit of miter joins of the {@code BasicStroke}.
      */
     public float getMiterLimit() {
         return miterlimit;
@@ -346,7 +346,7 @@
      * Returns the array representing the lengths of the dash segments.
      * Alternate entries in the array represent the user space lengths
      * of the opaque and transparent segments of the dashes.
-     * As the pen moves along the outline of the <code>Shape</code>
+     * As the pen moves along the outline of the {@code Shape}
      * to be stroked, the user space
      * distance that the pen travels is accumulated.  The distance
      * value is used to index into the dash array.
@@ -368,7 +368,7 @@
      * represents an offset into the dashing pattern. In other words, the dash
      * phase defines the point in the dashing pattern that will correspond to
      * the beginning of the stroke.
-     * @return the dash phase as a <code>float</code> value.
+     * @return the dash phase as a {@code float} value.
      */
     public float getDashPhase() {
         return dash_phase;
@@ -397,15 +397,15 @@
      * stroking operation as the given argument.
      */
    /**
-    * Tests if a specified object is equal to this <code>BasicStroke</code>
-    * by first testing if it is a <code>BasicStroke</code> and then comparing
+    * Tests if a specified object is equal to this {@code BasicStroke}
+    * by first testing if it is a {@code BasicStroke} and then comparing
     * its width, join, cap, miter limit, dash, and dash phase attributes with
-    * those of this <code>BasicStroke</code>.
+    * those of this {@code BasicStroke}.
     * @param  obj the specified object to compare to this
-    *              <code>BasicStroke</code>
-    * @return <code>true</code> if the width, join, cap, miter limit, dash, and
+    *              {@code BasicStroke}
+    * @return {@code true} if the width, join, cap, miter limit, dash, and
     *            dash phase are the same for both objects;
-    *            <code>false</code> otherwise.
+    *            {@code false} otherwise.
     */
     public boolean equals(Object obj) {
         if (!(obj instanceof BasicStroke)) {
--- a/jdk/src/java.desktop/share/classes/java/awt/CheckboxGroup.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/awt/CheckboxGroup.java	Tue Aug 25 12:19:46 2015 -0700
@@ -25,10 +25,10 @@
 package java.awt;
 
 /**
- * The <code>CheckboxGroup</code> class is used to group together
- * a set of <code>Checkbox</code> buttons.
+ * The {@code CheckboxGroup} class is used to group together
+ * a set of {@code Checkbox} buttons.
  * <p>
- * Exactly one check box button in a <code>CheckboxGroup</code> can
+ * Exactly one check box button in a {@code CheckboxGroup} can
  * be in the "on" state at any given time. Pushing any
  * button sets its state to "on" and forces any other button that
  * is in the "on" state into the "off" state.
@@ -69,7 +69,7 @@
     private static final long serialVersionUID = 3729780091441768983L;
 
     /**
-     * Creates a new instance of <code>CheckboxGroup</code>.
+     * Creates a new instance of {@code CheckboxGroup}.
      */
     public CheckboxGroup() {
     }
@@ -78,10 +78,10 @@
      * Gets the current choice from this check box group.
      * The current choice is the check box in this
      * group that is currently in the "on" state,
-     * or <code>null</code> if all check boxes in the
+     * or {@code null} if all check boxes in the
      * group are off.
      * @return   the check box that is currently in the
-     *                 "on" state, or <code>null</code>.
+     *                 "on" state, or {@code null}.
      * @see      java.awt.Checkbox
      * @see      java.awt.CheckboxGroup#setSelectedCheckbox
      * @since    1.1
@@ -96,7 +96,7 @@
      *
      * @return the selected checkbox
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>getSelectedCheckbox()</code>.
+     * replaced by {@code getSelectedCheckbox()}.
      */
     @Deprecated
     public Checkbox getCurrent() {
@@ -109,11 +109,11 @@
      * This method sets the state of that check box to "on" and
      * sets all other check boxes in the group to be off.
      * <p>
-     * If the check box argument is <tt>null</tt>, all check boxes
+     * If the check box argument is {@code null}, all check boxes
      * in this check box group are deselected. If the check box argument
      * belongs to a different check box group, this method does
      * nothing.
-     * @param     box   the <code>Checkbox</code> to set as the
+     * @param     box   the {@code Checkbox} to set as the
      *                      current selection.
      * @see      java.awt.Checkbox
      * @see      java.awt.CheckboxGroup#getSelectedCheckbox
@@ -130,7 +130,7 @@
      * @param  box the {@code Checkbox} to set as the
      *         current selection.
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>setSelectedCheckbox(Checkbox)</code>.
+     * replaced by {@code setSelectedCheckbox(Checkbox)}.
      */
     @Deprecated
     public synchronized void setCurrent(Checkbox box) {
--- a/jdk/src/java.desktop/share/classes/java/awt/GridLayout.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/awt/GridLayout.java	Tue Aug 25 12:19:46 2015 -0700
@@ -26,7 +26,7 @@
 package java.awt;
 
 /**
- * The <code>GridLayout</code> class is a layout manager that
+ * The {@code GridLayout} class is a layout manager that
  * lays out a container's components in a rectangular grid.
  * The container is divided into equal-sized rectangles,
  * and one component is placed in each rectangle.
@@ -50,9 +50,9 @@
  * }
  * </pre></blockquote><hr>
  * <p>
- * If the container's <code>ComponentOrientation</code> property is horizontal
+ * If the container's {@code ComponentOrientation} property is horizontal
  * and left-to-right, the above example produces the output shown in Figure 1.
- * If the container's <code>ComponentOrientation</code> property is horizontal
+ * If the container's {@code ComponentOrientation} property is horizontal
  * and right-to-left, the example produces the output shown in Figure 2.
  *
  * <table style="float:center" WIDTH=600 summary="layout">
@@ -77,7 +77,7 @@
  * <p>
  * When both the number of rows and the number of columns have
  * been set to non-zero values, either by a constructor or
- * by the <tt>setRows</tt> and <tt>setColumns</tt> methods, the number of
+ * by the {@code setRows} and {@code setColumns} methods, the number of
  * columns specified is ignored.  Instead, the number of
  * columns is determined from the specified number of rows
  * and the total number of components in the layout. So, for
@@ -154,7 +154,7 @@
      * Creates a grid layout with the specified number of rows and
      * columns. All components in the layout are given equal size.
      * <p>
-     * One, but not both, of <code>rows</code> and <code>cols</code> can
+     * One, but not both, of {@code rows} and {@code cols} can
      * be zero, which means that any number of objects can be placed in a
      * row or in a column.
      * @param     rows   the rows, with the value zero meaning
@@ -175,11 +175,11 @@
      * of the columns. Vertical gaps are placed between each of
      * the rows.
      * <p>
-     * One, but not both, of <code>rows</code> and <code>cols</code> can
+     * One, but not both, of {@code rows} and {@code cols} can
      * be zero, which means that any number of objects can be placed in a
      * row or in a column.
      * <p>
-     * All <code>GridLayout</code> constructors defer to this one.
+     * All {@code GridLayout} constructors defer to this one.
      * @param     rows   the rows, with the value zero meaning
      *                   any number of rows
      * @param     cols   the columns, with the value zero meaning
@@ -187,7 +187,7 @@
      * @param     hgap   the horizontal gap
      * @param     vgap   the vertical gap
      * @exception   IllegalArgumentException  if the value of both
-     *                  <code>rows</code> and <code>cols</code> is
+     *                  {@code rows} and {@code cols} is
      *                  set to zero
      */
     public GridLayout(int rows, int cols, int hgap, int vgap) {
@@ -213,7 +213,7 @@
      * Sets the number of rows in this layout to the specified value.
      * @param        rows   the number of rows in this layout
      * @exception    IllegalArgumentException  if the value of both
-     *               <code>rows</code> and <code>cols</code> is set to zero
+     *               {@code rows} and {@code cols} is set to zero
      * @since        1.1
      */
     public void setRows(int rows) {
@@ -236,12 +236,12 @@
      * Sets the number of columns in this layout to the specified value.
      * Setting the number of columns has no affect on the layout
      * if the number of rows specified by a constructor or by
-     * the <tt>setRows</tt> method is non-zero. In that case, the number
+     * the {@code setRows} method is non-zero. In that case, the number
      * of columns displayed in the layout is determined by the total
      * number of components and the number of rows specified.
      * @param        cols   the number of columns in this layout
      * @exception    IllegalArgumentException  if the value of both
-     *               <code>rows</code> and <code>cols</code> is set to zero
+     *               {@code rows} and {@code cols} is set to zero
      * @since        1.1
      */
     public void setColumns(int cols) {
@@ -405,7 +405,7 @@
      * <p>
      * This method reshapes the components in the specified target
      * container in order to satisfy the constraints of the
-     * <code>GridLayout</code> object.
+     * {@code GridLayout} object.
      * <p>
      * The grid layout manager determines the size of individual
      * components by dividing the free space in the container into
--- a/jdk/src/java.desktop/share/classes/java/awt/Window.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/awt/Window.java	Tue Aug 25 12:19:46 2015 -0700
@@ -53,6 +53,7 @@
 import sun.awt.AWTPermissions;
 import sun.awt.AppContext;
 import sun.awt.CausedFocusEvent;
+import sun.awt.DebugSettings;
 import sun.awt.SunToolkit;
 import sun.awt.util.IdentityArrayList;
 import sun.java2d.pipe.Region;
@@ -2159,11 +2160,13 @@
      * @param e  the keyboard event
      */
     void preProcessKeyEvent(KeyEvent e) {
-        // Dump the list of child windows to System.out.
-        if (e.isActionKey() && e.getKeyCode() == KeyEvent.VK_F1 &&
-            e.isControlDown() && e.isShiftDown() &&
-            e.getID() == KeyEvent.KEY_PRESSED) {
-            list(System.out, 0);
+        // Dump the list of child windows to System.out if debug is enabled.
+        if (DebugSettings.getInstance().getBoolean("on", false)) {
+            if (e.isActionKey() && e.getKeyCode() == KeyEvent.VK_F1 &&
+                    e.isControlDown() && e.isShiftDown() &&
+                    e.getID() == KeyEvent.KEY_PRESSED) {
+                list(System.out, 0);
+            }
         }
     }
 
--- a/jdk/src/java.desktop/share/classes/java/awt/dnd/DropTargetContext.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/awt/dnd/DropTargetContext.java	Tue Aug 25 12:19:46 2015 -0700
@@ -43,11 +43,11 @@
 import sun.awt.AWTAccessor.DropTargetContextAccessor;
 
 /**
- * A <code>DropTargetContext</code> is created
+ * A {@code DropTargetContext} is created
  * whenever the logical cursor associated
  * with a Drag and Drop operation coincides with the visible geometry of
- * a <code>Component</code> associated with a <code>DropTarget</code>.
- * The <code>DropTargetContext</code> provides
+ * a {@code Component} associated with a {@code DropTarget}.
+ * The {@code DropTargetContext} provides
  * the mechanism for a potential receiver
  * of a drop operation to both provide the end user with the appropriate
  * drag under feedback, but also to effect the subsequent data transfer
@@ -74,8 +74,8 @@
         });
     }
     /**
-     * Construct a <code>DropTargetContext</code>
-     * given a specified <code>DropTarget</code>.
+     * Construct a {@code DropTargetContext}
+     * given a specified {@code DropTarget}.
      *
      * @param dt the DropTarget to associate with
      */
@@ -87,17 +87,17 @@
     }
 
     /**
-     * This method returns the <code>DropTarget</code> associated with this
-     * <code>DropTargetContext</code>.
+     * This method returns the {@code DropTarget} associated with this
+     * {@code DropTargetContext}.
      *
-     * @return the <code>DropTarget</code> associated with this <code>DropTargetContext</code>
+     * @return the {@code DropTarget} associated with this {@code DropTargetContext}
      */
 
     public DropTarget getDropTarget() { return dropTarget; }
 
     /**
-     * This method returns the <code>Component</code> associated with
-     * this <code>DropTargetContext</code>.
+     * This method returns the {@code Component} associated with
+     * this {@code DropTargetContext}.
      *
      * @return the Component associated with this Context
      */
@@ -105,7 +105,7 @@
     public Component getComponent() { return dropTarget.getComponent(); }
 
     /**
-     * Called when disassociated with the <code>DropTargetContextPeer</code>.
+     * Called when disassociated with the {@code DropTargetContextPeer}.
      */
     void reset() {
         dropTargetContextPeer = null;
@@ -114,9 +114,9 @@
 
     /**
      * This method sets the current actions acceptable to
-     * this <code>DropTarget</code>.
+     * this {@code DropTarget}.
      *
-     * @param actions an <code>int</code> representing the supported action(s)
+     * @param actions an {@code int} representing the supported action(s)
      */
 
     protected void setTargetActions(int actions) {
@@ -132,10 +132,10 @@
     }
 
     /**
-     * This method returns an <code>int</code> representing the
-     * current actions this <code>DropTarget</code> will accept.
+     * This method returns an {@code int} representing the
+     * current actions this {@code DropTarget} will accept.
      *
-     * @return the current actions acceptable to this <code>DropTarget</code>
+     * @return the current actions acceptable to this {@code DropTarget}
      */
 
     protected int getTargetActions() {
@@ -215,11 +215,11 @@
 
     /**
      * get the available DataFlavors of the
-     * <code>Transferable</code> operand of this operation.
+     * {@code Transferable} operand of this operation.
      *
-     * @return a <code>DataFlavor[]</code> containing the
-     * supported <code>DataFlavor</code>s of the
-     * <code>Transferable</code> operand.
+     * @return a {@code DataFlavor[]} containing the
+     * supported {@code DataFlavor}s of the
+     * {@code Transferable} operand.
      */
 
     protected DataFlavor[] getCurrentDataFlavors() {
@@ -229,11 +229,11 @@
 
     /**
      * This method returns a the currently available DataFlavors
-     * of the <code>Transferable</code> operand
-     * as a <code>java.util.List</code>.
+     * of the {@code Transferable} operand
+     * as a {@code java.util.List}.
      *
      * @return the currently available
-     * DataFlavors as a <code>java.util.List</code>
+     * DataFlavors as a {@code java.util.List}
      */
 
     protected List<DataFlavor> getCurrentDataFlavorsAsList() {
@@ -241,13 +241,13 @@
     }
 
     /**
-     * This method returns a <code>boolean</code>
-     * indicating if the given <code>DataFlavor</code> is
-     * supported by this <code>DropTargetContext</code>.
+     * This method returns a {@code boolean}
+     * indicating if the given {@code DataFlavor} is
+     * supported by this {@code DropTargetContext}.
      *
-     * @param df the <code>DataFlavor</code>
+     * @param df the {@code DataFlavor}
      *
-     * @return if the <code>DataFlavor</code> specified is supported
+     * @return if the {@code DataFlavor} specified is supported
      */
 
     protected boolean isDataFlavorSupported(DataFlavor df) {
@@ -259,7 +259,7 @@
      *
      * @throws InvalidDnDOperationException if a drag is not outstanding/extant
      *
-     * @return the <code>Transferable</code>
+     * @return the {@code Transferable}
      */
 
     protected Transferable getTransferable() throws InvalidDnDOperationException {
@@ -282,7 +282,7 @@
     }
 
     /**
-     * Get the <code>DropTargetContextPeer</code>
+     * Get the {@code DropTargetContextPeer}
      *
      * @return the platform peer
      */
@@ -301,10 +301,10 @@
      * Creates a TransferableProxy to proxy for the specified
      * Transferable.
      *
-     * @param t the <tt>Transferable</tt> to be proxied
-     * @param local <tt>true</tt> if <tt>t</tt> represents
+     * @param t the {@code Transferable} to be proxied
+     * @param local {@code true} if {@code t} represents
      *        the result of a local drag-n-drop operation.
-     * @return the new <tt>TransferableProxy</tt> instance.
+     * @return the new {@code TransferableProxy} instance.
      */
     protected Transferable createTransferableProxy(Transferable t, boolean local) {
         return new TransferableProxy(t, local);
@@ -314,9 +314,9 @@
 
 
     /**
-     * <code>TransferableProxy</code> is a helper inner class that implements
-     * <code>Transferable</code> interface and serves as a proxy for another
-     * <code>Transferable</code> object which represents data transfer for
+     * {@code TransferableProxy} is a helper inner class that implements
+     * {@code Transferable} interface and serves as a proxy for another
+     * {@code Transferable} object which represents data transfer for
      * a particular drag-n-drop operation.
      * <p>
      * The proxy forwards all requests to the encapsulated transferable
@@ -327,14 +327,14 @@
     protected class TransferableProxy implements Transferable {
 
         /**
-         * Constructs a <code>TransferableProxy</code> given
-         * a specified <code>Transferable</code> object representing
+         * Constructs a {@code TransferableProxy} given
+         * a specified {@code Transferable} object representing
          * data transfer for a particular drag-n-drop operation and
-         * a <code>boolean</code> which indicates whether the
+         * a {@code boolean} which indicates whether the
          * drag-n-drop operation is local (within the same JVM).
          *
-         * @param t the <code>Transferable</code> object
-         * @param local <code>true</code>, if <code>t</code> represents
+         * @param t the {@code Transferable} object
+         * @param local {@code true}, if {@code t} represents
          *        the result of local drag-n-drop operation
          */
         TransferableProxy(Transferable t, boolean local) {
@@ -358,8 +358,8 @@
          * Returns whether or not the specified data flavor is supported by
          * the encapsulated transferable.
          * @param flavor the requested flavor for the data
-         * @return <code>true</code> if the data flavor is supported,
-         *         <code>false</code> otherwise
+         * @return {@code true} if the data flavor is supported,
+         *         {@code false} otherwise
          */
         public boolean isDataFlavorSupported(DataFlavor flavor) {
             return proxy.isDataFlavorSupported(flavor);
@@ -397,13 +397,13 @@
         // public constructor.
 
         /**
-         * The encapsulated <code>Transferable</code> object.
+         * The encapsulated {@code Transferable} object.
          */
         protected Transferable  transferable;
 
         /**
-         * A <code>boolean</code> indicating if the encapsulated
-         * <code>Transferable</code> object represents the result
+         * A {@code boolean} indicating if the encapsulated
+         * {@code Transferable} object represents the result
          * of local drag-n-drop operation (within the same JVM).
          */
         protected boolean       isLocal;
--- a/jdk/src/java.desktop/share/classes/java/awt/event/InvocationEvent.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/InvocationEvent.java	Tue Aug 25 12:19:46 2015 -0700
@@ -31,16 +31,16 @@
 import java.awt.AWTEvent;
 
 /**
- * An event which executes the <code>run()</code> method on a <code>Runnable
- * </code> when dispatched by the AWT event dispatcher thread. This class can
- * be used as a reference implementation of <code>ActiveEvent</code> rather
- * than declaring a new class and defining <code>dispatch()</code>.<p>
+ * An event which executes the {@code run()} method on a {@code Runnable
+ * } when dispatched by the AWT event dispatcher thread. This class can
+ * be used as a reference implementation of {@code ActiveEvent} rather
+ * than declaring a new class and defining {@code dispatch()}.<p>
  *
- * Instances of this class are placed on the <code>EventQueue</code> by calls
- * to <code>invokeLater</code> and <code>invokeAndWait</code>. Client code
- * can use this fact to write replacement functions for <code>invokeLater
- * </code> and <code>invokeAndWait</code> without writing special-case code
- * in any <code>AWTEventListener</code> objects.
+ * Instances of this class are placed on the {@code EventQueue} by calls
+ * to {@code invokeLater} and {@code invokeAndWait}. Client code
+ * can use this fact to write replacement functions for {@code invokeLater
+ * } and {@code invokeAndWait} without writing special-case code
+ * in any {@code AWTEventListener} objects.
  * <p>
  * An unspecified behavior will be caused if the {@code id} parameter
  * of any particular {@code InvocationEvent} instance is not
@@ -106,7 +106,7 @@
     private final Runnable listener;
 
     /**
-     * Indicates whether the <code>run()</code> method of the <code>runnable</code>
+     * Indicates whether the {@code run()} method of the {@code runnable}
      * was executed or not.
      *
      * @see #isDispatched
@@ -149,20 +149,21 @@
     private static final long serialVersionUID = 436056344909459450L;
 
     /**
-     * Constructs an <code>InvocationEvent</code> with the specified
-     * source which will execute the runnable's <code>run</code>
+     * Constructs an {@code InvocationEvent} with the specified
+     * source which will execute the runnable's {@code run}
      * method when dispatched.
      * <p>This is a convenience constructor.  An invocation of the form
-     * <tt>InvocationEvent(source, runnable)</tt>
+     * {@code InvocationEvent(source, runnable)}
      * behaves in exactly the same way as the invocation of
-     * <tt>{@link #InvocationEvent(Object, Runnable, Object, boolean) InvocationEvent}(source, runnable, null, false)</tt>.
-     * <p> This method throws an <code>IllegalArgumentException</code>
-     * if <code>source</code> is <code>null</code>.
+     * {@link #InvocationEvent(Object, Runnable, Object, boolean)
+     * InvocationEvent(source, runnable, null, false)}.
+     * <p> This method throws an {@code IllegalArgumentException}
+     * if {@code source} is {@code null}.
      *
-     * @param source    The <code>Object</code> that originated the event
-     * @param runnable  The <code>Runnable</code> whose <code>run</code>
+     * @param source    The {@code Object} that originated the event
+     * @param runnable  The {@code Runnable} whose {@code run}
      *                  method will be executed
-     * @throws IllegalArgumentException if <code>source</code> is null
+     * @throws IllegalArgumentException if {@code source} is null
      *
      * @see #getSource()
      * @see #InvocationEvent(Object, Runnable, Object, boolean)
@@ -172,35 +173,36 @@
     }
 
     /**
-     * Constructs an <code>InvocationEvent</code> with the specified
-     * source which will execute the runnable's <code>run</code>
-     * method when dispatched.  If notifier is non-<code>null</code>,
-     * <code>notifyAll()</code> will be called on it
-     * immediately after <code>run</code> has returned or thrown an exception.
-     * <p>An invocation of the form <tt>InvocationEvent(source,
-     * runnable, notifier, catchThrowables)</tt>
+     * Constructs an {@code InvocationEvent} with the specified
+     * source which will execute the runnable's {@code run}
+     * method when dispatched.  If notifier is non-{@code null},
+     * {@code notifyAll()} will be called on it
+     * immediately after {@code run} has returned or thrown an exception.
+     * <p>An invocation of the form
+     * {@code InvocationEvent(source, runnable, notifier, catchThrowables)}
      * behaves in exactly the same way as the invocation of
-     * <tt>{@link #InvocationEvent(Object, int, Runnable, Object, boolean) InvocationEvent}(source, InvocationEvent.INVOCATION_DEFAULT, runnable, notifier, catchThrowables)</tt>.
-     * <p>This method throws an <code>IllegalArgumentException</code>
-     * if <code>source</code> is <code>null</code>.
+     * {@link #InvocationEvent(Object, int, Runnable, Object, boolean)
+     * InvocationEvent(source, InvocationEvent.INVOCATION_DEFAULT, runnable, notifier, catchThrowables)}.
+     * <p>This method throws an {@code IllegalArgumentException}
+     * if {@code source} is {@code null}.
      *
-     * @param source            The <code>Object</code> that originated
+     * @param source            The {@code Object} that originated
      *                          the event
-     * @param runnable          The <code>Runnable</code> whose
-     *                          <code>run</code> method will be
+     * @param runnable          The {@code Runnable} whose
+     *                          {@code run} method will be
      *                          executed
-     * @param notifier          The {@code Object} whose <code>notifyAll</code>
+     * @param notifier          The {@code Object} whose {@code notifyAll}
      *                          method will be called after
-     *                          <code>Runnable.run</code> has returned or
+     *                          {@code Runnable.run} has returned or
      *                          thrown an exception or after the event was
      *                          disposed
-     * @param catchThrowables   Specifies whether <code>dispatch</code>
+     * @param catchThrowables   Specifies whether {@code dispatch}
      *                          should catch Throwable when executing
-     *                          the <code>Runnable</code>'s <code>run</code>
+     *                          the {@code Runnable}'s {@code run}
      *                          method, or should instead propagate those
      *                          Throwables to the EventDispatchThread's
      *                          dispatch loop
-     * @throws IllegalArgumentException if <code>source</code> is null
+     * @throws IllegalArgumentException if {@code source} is null
      *
      * @see #getSource()
      * @see     #InvocationEvent(Object, int, Runnable, Object, boolean)
@@ -211,31 +213,31 @@
     }
 
     /**
-     * Constructs an <code>InvocationEvent</code> with the specified
-     * source which will execute the runnable's <code>run</code>
-     * method when dispatched.  If listener is non-<code>null</code>,
-     * <code>listener.run()</code> will be called immediately after
-     * <code>run</code> has returned, thrown an exception or the event
+     * Constructs an {@code InvocationEvent} with the specified
+     * source which will execute the runnable's {@code run}
+     * method when dispatched.  If listener is non-{@code null},
+     * {@code listener.run()} will be called immediately after
+     * {@code run} has returned, thrown an exception or the event
      * was disposed.
-     * <p>This method throws an <code>IllegalArgumentException</code>
-     * if <code>source</code> is <code>null</code>.
+     * <p>This method throws an {@code IllegalArgumentException}
+     * if {@code source} is {@code null}.
      *
-     * @param source            The <code>Object</code> that originated
+     * @param source            The {@code Object} that originated
      *                          the event
-     * @param runnable          The <code>Runnable</code> whose
-     *                          <code>run</code> method will be
+     * @param runnable          The {@code Runnable} whose
+     *                          {@code run} method will be
      *                          executed
-     * @param listener          The <code>Runnable</code>Runnable whose
-     *                          <code>run()</code> method will be called
+     * @param listener          The {@code Runnable}Runnable whose
+     *                          {@code run()} method will be called
      *                          after the {@code InvocationEvent}
      *                          was dispatched or disposed
-     * @param catchThrowables   Specifies whether <code>dispatch</code>
+     * @param catchThrowables   Specifies whether {@code dispatch}
      *                          should catch Throwable when executing
-     *                          the <code>Runnable</code>'s <code>run</code>
+     *                          the {@code Runnable}'s {@code run}
      *                          method, or should instead propagate those
      *                          Throwables to the EventDispatchThread's
      *                          dispatch loop
-     * @throws IllegalArgumentException if <code>source</code> is null
+     * @throws IllegalArgumentException if {@code source} is null
      */
     public InvocationEvent(Object source, Runnable runnable, Runnable listener,
                            boolean catchThrowables)  {
@@ -243,34 +245,34 @@
     }
 
     /**
-     * Constructs an <code>InvocationEvent</code> with the specified
-     * source and ID which will execute the runnable's <code>run</code>
-     * method when dispatched.  If notifier is non-<code>null</code>,
-     * <code>notifyAll</code> will be called on it immediately after
-     * <code>run</code> has returned or thrown an exception.
+     * Constructs an {@code InvocationEvent} with the specified
+     * source and ID which will execute the runnable's {@code run}
+     * method when dispatched.  If notifier is non-{@code null},
+     * {@code notifyAll} will be called on it immediately after
+     * {@code run} has returned or thrown an exception.
      * <p>This method throws an
-     * <code>IllegalArgumentException</code> if <code>source</code>
-     * is <code>null</code>.
+     * {@code IllegalArgumentException} if {@code source}
+     * is {@code null}.
      *
-     * @param source            The <code>Object</code> that originated
+     * @param source            The {@code Object} that originated
      *                          the event
      * @param id     An integer indicating the type of event.
      *                     For information on allowable values, see
      *                     the class description for {@link InvocationEvent}
-     * @param runnable          The <code>Runnable</code> whose
-     *                          <code>run</code> method will be executed
-     * @param notifier          The <code>Object</code> whose <code>notifyAll</code>
+     * @param runnable          The {@code Runnable} whose
+     *                          {@code run} method will be executed
+     * @param notifier          The {@code Object} whose {@code notifyAll}
      *                          method will be called after
-     *                          <code>Runnable.run</code> has returned or
+     *                          {@code Runnable.run} has returned or
      *                          thrown an exception or after the event was
      *                          disposed
-     * @param catchThrowables   Specifies whether <code>dispatch</code>
+     * @param catchThrowables   Specifies whether {@code dispatch}
      *                          should catch Throwable when executing the
-     *                          <code>Runnable</code>'s <code>run</code>
+     *                          {@code Runnable}'s {@code run}
      *                          method, or should instead propagate those
      *                          Throwables to the EventDispatchThread's
      *                          dispatch loop
-     * @throws IllegalArgumentException if <code>source</code> is null
+     * @throws IllegalArgumentException if {@code source} is null
      * @see #getSource()
      * @see #getID()
      */
@@ -289,8 +291,8 @@
         this.when = System.currentTimeMillis();
     }
     /**
-     * Executes the Runnable's <code>run()</code> method and notifies the
-     * notifier (if any) when <code>run()</code> has returned or thrown an exception.
+     * Executes the Runnable's {@code run()} method and notifies the
+     * notifier (if any) when {@code run()} has returned or thrown an exception.
      *
      * @see #isDispatched
      */
@@ -316,8 +318,8 @@
     }
 
     /**
-     * Returns any Exception caught while executing the Runnable's <code>run()
-     * </code> method.
+     * Returns any Exception caught while executing
+     * the Runnable's {@code run()} method.
      *
      * @return  A reference to the Exception if one was thrown; null if no
      *          Exception was thrown or if this InvocationEvent does not
@@ -328,8 +330,8 @@
     }
 
     /**
-     * Returns any Throwable caught while executing the Runnable's <code>run()
-     * </code> method.
+     * Returns any Throwable caught while executing
+     * the Runnable's {@code run()} method.
      *
      * @return  A reference to the Throwable if one was thrown; null if no
      *          Throwable was thrown or if this InvocationEvent does not
--- a/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java	Tue Aug 25 12:19:46 2015 -0700
@@ -78,26 +78,26 @@
  *     </ul>
  * </ul>
  * <P>
- * A <code>MouseEvent</code> object is passed to every
- * <code>MouseListener</code>
- * or <code>MouseAdapter</code> object which is registered to receive
+ * A {@code MouseEvent} object is passed to every
+ * {@code MouseListener}
+ * or {@code MouseAdapter} object which is registered to receive
  * the "interesting" mouse events using the component's
- * <code>addMouseListener</code> method.
- * (<code>MouseAdapter</code> objects implement the
- * <code>MouseListener</code> interface.) Each such listener object
- * gets a <code>MouseEvent</code> containing the mouse event.
+ * {@code addMouseListener} method.
+ * ({@code MouseAdapter} objects implement the
+ * {@code MouseListener} interface.) Each such listener object
+ * gets a {@code MouseEvent} containing the mouse event.
  * <P>
- * A <code>MouseEvent</code> object is also passed to every
- * <code>MouseMotionListener</code> or
- * <code>MouseMotionAdapter</code> object which is registered to receive
+ * A {@code MouseEvent} object is also passed to every
+ * {@code MouseMotionListener} or
+ * {@code MouseMotionAdapter} object which is registered to receive
  * mouse motion events using the component's
- * <code>addMouseMotionListener</code>
- * method. (<code>MouseMotionAdapter</code> objects implement the
- * <code>MouseMotionListener</code> interface.) Each such listener object
- * gets a <code>MouseEvent</code> containing the mouse motion event.
+ * {@code addMouseMotionListener}
+ * method. ({@code MouseMotionAdapter} objects implement the
+ * {@code MouseMotionListener} interface.) Each such listener object
+ * gets a {@code MouseEvent} containing the mouse motion event.
  * <P>
  * When a mouse button is clicked, events are generated and sent to the
- * registered <code>MouseListener</code>s.
+ * registered {@code MouseListener}s.
  * The state of modal keys can be retrieved using {@link InputEvent#getModifiers}
  * and {@link InputEvent#getModifiersEx}.
  * The button mask returned by {@link InputEvent#getModifiers} reflects
@@ -111,31 +111,31 @@
  * <P>
  * For example, if the first mouse button is pressed, events are sent in the
  * following order:
- * <PRE>
- *    <b   >id           </b   >   <b   >modifiers   </b   > <b   >button </b   >
- *    <code>MOUSE_PRESSED</code>:  <code>BUTTON1_MASK</code> <code>BUTTON1</code>
- *    <code>MOUSE_RELEASED</code>: <code>BUTTON1_MASK</code> <code>BUTTON1</code>
- *    <code>MOUSE_CLICKED</code>:  <code>BUTTON1_MASK</code> <code>BUTTON1</code>
- * </PRE>
+ * <pre><b>
+ *    id              modifiers    button</b>{@code
+ *    MOUSE_PRESSED:  BUTTON1_MASK BUTTON1
+ *    MOUSE_RELEASED: BUTTON1_MASK BUTTON1
+ *    MOUSE_CLICKED:  BUTTON1_MASK BUTTON1
+ * }</pre>
  * When multiple mouse buttons are pressed, each press, release, and click
  * results in a separate event.
  * <P>
  * For example, if the user presses <b>button 1</b> followed by
  * <b>button 2</b>, and then releases them in the same order,
  * the following sequence of events is generated:
- * <PRE>
- *    <b   >id           </b   >   <b   >modifiers   </b   > <b   >button </b   >
- *    <code>MOUSE_PRESSED</code>:  <code>BUTTON1_MASK</code> <code>BUTTON1</code>
- *    <code>MOUSE_PRESSED</code>:  <code>BUTTON2_MASK</code> <code>BUTTON2</code>
- *    <code>MOUSE_RELEASED</code>: <code>BUTTON1_MASK</code> <code>BUTTON1</code>
- *    <code>MOUSE_CLICKED</code>:  <code>BUTTON1_MASK</code> <code>BUTTON1</code>
- *    <code>MOUSE_RELEASED</code>: <code>BUTTON2_MASK</code> <code>BUTTON2</code>
- *    <code>MOUSE_CLICKED</code>:  <code>BUTTON2_MASK</code> <code>BUTTON2</code>
- * </PRE>
+ * <pre><b>
+ *    id              modifiers    button</b>{@code
+ *    MOUSE_PRESSED:  BUTTON1_MASK BUTTON1
+ *    MOUSE_PRESSED:  BUTTON2_MASK BUTTON2
+ *    MOUSE_RELEASED: BUTTON1_MASK BUTTON1
+ *    MOUSE_CLICKED:  BUTTON1_MASK BUTTON1
+ *    MOUSE_RELEASED: BUTTON2_MASK BUTTON2
+ *    MOUSE_CLICKED:  BUTTON2_MASK BUTTON2
+ * }</pre>
  * If <b>button 2</b> is released first, the
- * <code>MOUSE_RELEASED</code>/<code>MOUSE_CLICKED</code> pair
- * for <code>BUTTON2_MASK</code> arrives first,
- * followed by the pair for <code>BUTTON1_MASK</code>.
+ * {@code MOUSE_RELEASED}/{@code MOUSE_CLICKED} pair
+ * for {@code BUTTON2_MASK} arrives first,
+ * followed by the pair for {@code BUTTON1_MASK}.
  * <p>
  * Some extra mouse buttons are added to extend the standard set of buttons
  * represented by the following constants:{@code BUTTON1}, {@code BUTTON2}, and {@code BUTTON3}.
@@ -154,20 +154,20 @@
  * Drag&amp;Drop operation.
  *
  * In a multi-screen environment mouse drag events are delivered to the
- * <code>Component</code> even if the mouse position is outside the bounds of the
- * <code>GraphicsConfiguration</code> associated with that
- * <code>Component</code>. However, the reported position for mouse drag events
+ * {@code Component} even if the mouse position is outside the bounds of the
+ * {@code GraphicsConfiguration} associated with that
+ * {@code Component}. However, the reported position for mouse drag events
  * in this case may differ from the actual mouse position:
  * <ul>
  * <li>In a multi-screen environment without a virtual device:
  * <br>
  * The reported coordinates for mouse drag events are clipped to fit within the
- * bounds of the <code>GraphicsConfiguration</code> associated with
- * the <code>Component</code>.
+ * bounds of the {@code GraphicsConfiguration} associated with
+ * the {@code Component}.
  * <li>In a multi-screen environment with a virtual device:
  * <br>
  * The reported coordinates for mouse drag events are clipped to fit within the
- * bounds of the virtual device associated with the <code>Component</code>.
+ * bounds of the virtual device associated with the {@code Component}.
  * </ul>
  * <p>
  * An unspecified behavior will be caused if the {@code id} parameter
@@ -200,51 +200,51 @@
     public static final int MOUSE_LAST          = 507;
 
     /**
-     * The "mouse clicked" event. This <code>MouseEvent</code>
+     * The "mouse clicked" event. This {@code MouseEvent}
      * occurs when a mouse button is pressed and released.
      */
     public static final int MOUSE_CLICKED = MOUSE_FIRST;
 
     /**
-     * The "mouse pressed" event. This <code>MouseEvent</code>
+     * The "mouse pressed" event. This {@code MouseEvent}
      * occurs when a mouse button is pushed down.
      */
     public static final int MOUSE_PRESSED = 1 + MOUSE_FIRST; //Event.MOUSE_DOWN
 
     /**
-     * The "mouse released" event. This <code>MouseEvent</code>
+     * The "mouse released" event. This {@code MouseEvent}
      * occurs when a mouse button is let up.
      */
     public static final int MOUSE_RELEASED = 2 + MOUSE_FIRST; //Event.MOUSE_UP
 
     /**
-     * The "mouse moved" event. This <code>MouseEvent</code>
+     * The "mouse moved" event. This {@code MouseEvent}
      * occurs when the mouse position changes.
      */
     public static final int MOUSE_MOVED = 3 + MOUSE_FIRST; //Event.MOUSE_MOVE
 
     /**
-     * The "mouse entered" event. This <code>MouseEvent</code>
+     * The "mouse entered" event. This {@code MouseEvent}
      * occurs when the mouse cursor enters the unobscured part of component's
      * geometry.
      */
     public static final int MOUSE_ENTERED = 4 + MOUSE_FIRST; //Event.MOUSE_ENTER
 
     /**
-     * The "mouse exited" event. This <code>MouseEvent</code>
+     * The "mouse exited" event. This {@code MouseEvent}
      * occurs when the mouse cursor exits the unobscured part of component's
      * geometry.
      */
     public static final int MOUSE_EXITED = 5 + MOUSE_FIRST; //Event.MOUSE_EXIT
 
     /**
-     * The "mouse dragged" event. This <code>MouseEvent</code>
+     * The "mouse dragged" event. This {@code MouseEvent}
      * occurs when the mouse position changes while a mouse button is pressed.
      */
     public static final int MOUSE_DRAGGED = 6 + MOUSE_FIRST; //Event.MOUSE_DRAG
 
     /**
-     * The "mouse wheel" event.  This is the only <code>MouseWheelEvent</code>.
+     * The "mouse wheel" event.  This is the only {@code MouseWheelEvent}.
      * It occurs when a mouse equipped with a wheel has its wheel rotated.
      * @since 1.4
      */
@@ -320,10 +320,10 @@
      * Indicates the number of quick consecutive clicks of
      * a mouse button.
      * clickCount will be valid for only three mouse events :<BR>
-     * <code>MOUSE_CLICKED</code>,
-     * <code>MOUSE_PRESSED</code> and
-     * <code>MOUSE_RELEASED</code>.
-     * For the above, the <code>clickCount</code> will be at least 1.
+     * {@code MOUSE_CLICKED},
+     * {@code MOUSE_PRESSED} and
+     * {@code MOUSE_RELEASED}.
+     * For the above, the {@code clickCount} will be at least 1.
      * For all other events the count will be 0.
      *
      * @serial
@@ -365,8 +365,8 @@
     /**
      * A property used to indicate whether a Popup Menu
      * should appear  with a certain gestures.
-     * If <code>popupTrigger</code> = <code>false</code>,
-     * no popup menu should appear.  If it is <code>true</code>
+     * If {@code popupTrigger} = {@code false},
+     * no popup menu should appear.  If it is {@code true}
      * then a popup menu should appear.
      *
      * @serial
@@ -415,7 +415,7 @@
      * Otherwise, these coordinates are relative to the coordinate system
      * associated with the Component's GraphicsConfiguration.
      *
-     * @return a <code>Point</code> object containing the absolute  x
+     * @return a {@code Point} object containing the absolute  x
      *  and y coordinates.
      *
      * @see java.awt.GraphicsConfiguration
@@ -460,7 +460,7 @@
     }
 
     /**
-     * Constructs a <code>MouseEvent</code> object with the
+     * Constructs a {@code MouseEvent} object with the
      * specified source component,
      * type, time, modifiers, coordinates, click count, popupTrigger flag,
      * and button number.
@@ -469,19 +469,19 @@
      * as by using more than one of the old _MASKs, or modifier/button
      * values which don't match) results in unspecified behavior.
      * An invocation of the form
-     * <tt>MouseEvent(source, id, when, modifiers, x, y, clickCount, popupTrigger, button)</tt>
+     * {@code MouseEvent(source, id, when, modifiers, x, y, clickCount, popupTrigger, button)}
      * behaves in exactly the same way as the invocation
-     * <tt> {@link #MouseEvent(Component, int, long, int, int, int,
-     * int, int, int, boolean, int) MouseEvent}(source, id, when, modifiers,
-     * x, y, xAbs, yAbs, clickCount, popupTrigger, button)</tt>
+     * {@link #MouseEvent(Component, int, long, int, int, int,
+     * int, int, int, boolean, int) MouseEvent(source, id, when, modifiers,
+     * x, y, xAbs, yAbs, clickCount, popupTrigger, button)}
      * where xAbs and yAbs defines as source's location on screen plus
      * relative coordinates x and y.
      * xAbs and yAbs are set to zero if the source is not showing.
      * This method throws an
-     * <code>IllegalArgumentException</code> if <code>source</code>
-     * is <code>null</code>.
+     * {@code IllegalArgumentException} if {@code source}
+     * is {@code null}.
      *
-     * @param source       The <code>Component</code> that originated the event
+     * @param source       The {@code Component} that originated the event
      * @param id              An integer indicating the type of event.
      *                     For information on allowable values, see
      *                     the class description for {@link MouseEvent}
@@ -527,16 +527,16 @@
      * if the mouse has more than three buttons.
      * </ul>
      * @throws IllegalArgumentException if {@code button} is less then zero
-     * @throws IllegalArgumentException if <code>source</code> is null
+     * @throws IllegalArgumentException if {@code source} is null
      * @throws IllegalArgumentException if {@code button} is greater then BUTTON3 and the support for extended mouse buttons is
      *                                  {@link Toolkit#areExtraMouseButtonsEnabled() disabled} by Java
      * @throws IllegalArgumentException if {@code button} is greater then the
      *                                  {@link java.awt.MouseInfo#getNumberOfButtons() current number of buttons} and the support
      *                                  for extended mouse buttons is {@link Toolkit#areExtraMouseButtonsEnabled() enabled}
      *                                  by Java
-     * @throws IllegalArgumentException if an invalid <code>button</code>
+     * @throws IllegalArgumentException if an invalid {@code button}
      *            value is passed in
-     * @throws IllegalArgumentException if <code>source</code> is null
+     * @throws IllegalArgumentException if {@code source} is null
      * @see #getSource()
      * @see #getID()
      * @see #getWhen()
@@ -565,22 +565,22 @@
     }
 
     /**
-     * Constructs a <code>MouseEvent</code> object with the
+     * Constructs a {@code MouseEvent} object with the
      * specified source component,
      * type, modifiers, coordinates, click count, and popupTrigger flag.
      * An invocation of the form
-     * <tt>MouseEvent(source, id, when, modifiers, x, y, clickCount, popupTrigger)</tt>
+     * {@code MouseEvent(source, id, when, modifiers, x, y, clickCount, popupTrigger)}
      * behaves in exactly the same way as the invocation
-     * <tt> {@link #MouseEvent(Component, int, long, int, int, int,
-     * int, int, int, boolean, int) MouseEvent}(source, id, when, modifiers,
-     * x, y, xAbs, yAbs, clickCount, popupTrigger, MouseEvent.NOBUTTON)</tt>
+     * {@link #MouseEvent(Component, int, long, int, int, int,
+     * int, int, int, boolean, int) MouseEvent(source, id, when, modifiers,
+     * x, y, xAbs, yAbs, clickCount, popupTrigger, MouseEvent.NOBUTTON)}
      * where xAbs and yAbs defines as source's location on screen plus
      * relative coordinates x and y.
      * xAbs and yAbs are set to zero if the source is not showing.
-     * This method throws an <code>IllegalArgumentException</code>
-     * if <code>source</code> is <code>null</code>.
+     * This method throws an {@code IllegalArgumentException}
+     * if {@code source} is {@code null}.
      *
-     * @param source       The <code>Component</code> that originated the event
+     * @param source       The {@code Component} that originated the event
      * @param id              An integer indicating the type of event.
      *                     For information on allowable values, see
      *                     the class description for {@link MouseEvent}
@@ -605,7 +605,7 @@
      *                       is not recommended
      * @param popupTrigger A boolean that equals {@code true} if this event
      *                     is a trigger for a popup menu
-     * @throws IllegalArgumentException if <code>source</code> is null
+     * @throws IllegalArgumentException if {@code source} is null
      * @see #getSource()
      * @see #getID()
      * @see #getWhen()
@@ -637,7 +637,7 @@
     }
 
     /**
-     * Constructs a <code>MouseEvent</code> object with the
+     * Constructs a {@code MouseEvent} object with the
      * specified source component,
      * type, time, modifiers, coordinates, absolute coordinates, click count, popupTrigger flag,
      * and button number.
@@ -649,10 +649,10 @@
      * passed to the constructor, the mouse event instance is still
      * created and no exception is thrown.
      * This method throws an
-     * <code>IllegalArgumentException</code> if <code>source</code>
-     * is <code>null</code>.
+     * {@code IllegalArgumentException} if {@code source}
+     * is {@code null}.
      *
-     * @param source       The <code>Component</code> that originated the event
+     * @param source       The {@code Component} that originated the event
      * @param id              An integer indicating the type of event.
      *                     For information on allowable values, see
      *                     the class description for {@link MouseEvent}
@@ -702,16 +702,16 @@
      * if the mouse has more than three buttons.
      * </ul>
      * @throws IllegalArgumentException if {@code button} is less then zero
-     * @throws IllegalArgumentException if <code>source</code> is null
+     * @throws IllegalArgumentException if {@code source} is null
      * @throws IllegalArgumentException if {@code button} is greater then BUTTON3 and the support for extended mouse buttons is
      *                                  {@link Toolkit#areExtraMouseButtonsEnabled() disabled} by Java
      * @throws IllegalArgumentException if {@code button} is greater then the
      *                                  {@link java.awt.MouseInfo#getNumberOfButtons() current number of buttons} and the support
      *                                  for extended mouse buttons is {@link Toolkit#areExtraMouseButtonsEnabled() enabled}
      *                                  by Java
-     * @throws IllegalArgumentException if an invalid <code>button</code>
+     * @throws IllegalArgumentException if an invalid {@code button}
      *            value is passed in
-     * @throws IllegalArgumentException if <code>source</code> is null
+     * @throws IllegalArgumentException if {@code source} is null
      * @see #getSource()
      * @see #getID()
      * @see #getWhen()
@@ -803,7 +803,7 @@
     /**
      * Returns the x,y position of the event relative to the source component.
      *
-     * @return a <code>Point</code> object containing the x and y coordinates
+     * @return a {@code Point} object containing the x and y coordinates
      *         relative to the source component
      *
      */
@@ -819,7 +819,7 @@
 
     /**
      * Translates the event's coordinates to a new position
-     * by adding specified <code>x</code> (horizontal) and <code>y</code>
+     * by adding specified {@code x} (horizontal) and {@code y}
      * (vertical) offsets.
      *
      * @param x the horizontal x value to add to the current x
@@ -901,9 +901,9 @@
      * Returns whether or not this mouse event is the popup menu
      * trigger event for the platform.
      * <p><b>Note</b>: Popup menus are triggered differently
-     * on different systems. Therefore, <code>isPopupTrigger</code>
-     * should be checked in both <code>mousePressed</code>
-     * and <code>mouseReleased</code>
+     * on different systems. Therefore, {@code isPopupTrigger}
+     * should be checked in both {@code mousePressed}
+     * and {@code mouseReleased}
      * for proper cross-platform functionality.
      *
      * @return boolean, true if this event is the popup menu trigger
@@ -914,16 +914,16 @@
     }
 
     /**
-     * Returns a <code>String</code> instance describing the modifier keys and
+     * Returns a {@code String} instance describing the modifier keys and
      * mouse buttons that were down during the event, such as "Shift",
      * or "Ctrl+Shift". These strings can be localized by changing
-     * the <code>awt.properties</code> file.
+     * the {@code awt.properties} file.
      * <p>
-     * Note that the <code>InputEvent.ALT_MASK</code> and
-     * <code>InputEvent.BUTTON2_MASK</code> have equal values,
+     * Note that the {@code InputEvent.ALT_MASK} and
+     * {@code InputEvent.BUTTON2_MASK} have equal values,
      * so the "Alt" string is returned for both modifiers.  Likewise,
-     * the <code>InputEvent.META_MASK</code> and
-     * <code>InputEvent.BUTTON3_MASK</code> have equal values,
+     * the {@code InputEvent.META_MASK} and
+     * {@code InputEvent.BUTTON3_MASK} have equal values,
      * so the "Meta" string is returned for both modifiers.
      * <p>
      * Note that passing negative parameter is incorrect,
--- a/jdk/src/java.desktop/share/classes/java/awt/image/PixelGrabber.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/PixelGrabber.java	Tue Aug 25 12:19:46 2015 -0700
@@ -99,7 +99,7 @@
      * The pixels are stored into the array in the default RGB ColorModel.
      * The RGB data for pixel (i, j) where (i, j) is inside the rectangle
      * (x, y, w, h) is stored in the array at
-     * <tt>pix[(j - y) * scansize + (i - x) + off]</tt>.
+     * {@code pix[(j - y) * scansize + (i - x) + off]}.
      * @see ColorModel#getRGBdefault
      * @param img the image to retrieve pixels from
      * @param x the x coordinate of the upper left corner of the rectangle
@@ -127,8 +127,8 @@
      * The pixels are stored into the array in the default RGB ColorModel.
      * The RGB data for pixel (i, j) where (i, j) is inside the rectangle
      * (x, y, w, h) is stored in the array at
-     * <tt>pix[(j - y) * scansize + (i - x) + off]</tt>.
-     * @param ip the <code>ImageProducer</code> that produces the
+     * {@code pix[(j - y) * scansize + (i - x) + off]}.
+     * @param ip the {@code ImageProducer} that produces the
      * image from which to retrieve pixels
      * @param x the x coordinate of the upper left corner of the rectangle
      * of pixels to retrieve from the image, relative to the default
@@ -231,13 +231,13 @@
      * wait for all of the pixels in the rectangle of interest to be
      * delivered or until the specified timeout has elapsed.  This method
      * behaves in the following ways, depending on the value of
-     * <code>ms</code>:
+     * {@code ms}:
      * <ul>
      * <li> If {@code ms == 0}, waits until all pixels are delivered
      * <li> If {@code ms > 0}, waits until all pixels are delivered
      * as timeout expires.
-     * <li> If {@code ms < 0}, returns <code>true</code> if all pixels
-     * are grabbed, <code>false</code> otherwise and does not wait.
+     * <li> If {@code ms < 0}, returns {@code true} if all pixels
+     * are grabbed, {@code false} otherwise and does not wait.
      * </ul>
      * @param ms the number of milliseconds to wait for the image pixels
      * to arrive before timing out
@@ -420,7 +420,7 @@
      * this class to retrieve pixels from an image should avoid calling
      * this method directly since that operation could result in problems
      * with retrieving the requested pixels.
-     * @param model the specified <code>ColorModel</code>
+     * @param model the specified {@code ColorModel}
      * @see #getColorModel
      */
     public void setColorModel(ColorModel model) {
@@ -461,7 +461,7 @@
      *        of the area of pixels to be set
      * @param srcW the width of the area of pixels
      * @param srcH the height of the area of pixels
-     * @param model the specified <code>ColorModel</code>
+     * @param model the specified {@code ColorModel}
      * @param pixels the array of pixels
      * @param srcOff the offset into the pixels array
      * @param srcScan the distance from one row of pixels to the next
@@ -548,7 +548,7 @@
      *        of the area of pixels to be set
      * @param srcW the width of the area of pixels
      * @param srcH the height of the area of pixels
-     * @param model the specified <code>ColorModel</code>
+     * @param model the specified {@code ColorModel}
      * @param pixels the array of pixels
      * @param srcOff the offset into the pixels array
      * @param srcScan the distance from one row of pixels to the next
@@ -658,7 +658,7 @@
      * Returns the status of the pixels.  The ImageObserver flags
      * representing the available pixel information are returned.
      * This method and {@link #getStatus() getStatus} have the
-     * same implementation, but <code>getStatus</code> is the
+     * same implementation, but {@code getStatus} is the
      * preferred method because it conforms to the convention of
      * naming information-retrieval methods with the form
      * "getXXX".
--- a/jdk/src/java.desktop/share/classes/java/awt/image/RescaleOp.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/RescaleOp.java	Tue Aug 25 12:19:46 2015 -0700
@@ -326,16 +326,16 @@
     public final BufferedImage filter (BufferedImage src, BufferedImage dst) {
         ColorModel srcCM = src.getColorModel();
         ColorModel dstCM;
-        int numBands = srcCM.getNumColorComponents();
-
+        int numSrcColorComp = srcCM.getNumColorComponents();
+        int scaleConst = length;
 
         if (srcCM instanceof IndexColorModel) {
             throw new
                 IllegalArgumentException("Rescaling cannot be "+
                                          "performed on an indexed image");
         }
-        if (length != 1 && length != numBands &&
-            length != srcCM.getNumComponents())
+        if (scaleConst != 1 && scaleConst != numSrcColorComp &&
+            scaleConst != srcCM.getNumComponents())
         {
             throw new IllegalArgumentException("Number of scaling constants "+
                                                "does not equal the number of"+
@@ -346,13 +346,14 @@
         boolean needToConvert = false;
 
         // Include alpha
-        if (length > numBands && srcCM.hasAlpha()) {
-            length = numBands+1;
+        if (scaleConst > numSrcColorComp && srcCM.hasAlpha()) {
+            scaleConst = numSrcColorComp+1;
         }
 
         int width = src.getWidth();
         int height = src.getHeight();
 
+        BufferedImage origDst = dst;
         if (dst == null) {
             dst = createCompatibleDestImage(src, null);
             dstCM = srcCM;
@@ -380,7 +381,19 @@
 
         }
 
-        BufferedImage origDst = dst;
+        boolean scaleAlpha = true;
+
+        //
+        // The number of sets of scaling constants may be one,
+        // in which case the same constants are applied to all color
+        // (but NOT alpha) components. Otherwise, the number of sets
+        // of scaling constants may equal the number of Source color
+        // components, in which case NO rescaling of the alpha component
+        // (if present) is performed.
+        //
+        if (numSrcColorComp == scaleConst || scaleConst == 1) {
+            scaleAlpha = false;
+        }
 
         //
         // Try to use a native BI rescale operation first
@@ -392,12 +405,13 @@
             WritableRaster srcRaster = src.getRaster();
             WritableRaster dstRaster = dst.getRaster();
 
-            if (srcCM.hasAlpha()) {
-                if (numBands-1 == length || length == 1) {
+            if (!scaleAlpha) {
+                if (srcCM.hasAlpha()) {
+                    // Do not rescale Alpha component
                     int minx = srcRaster.getMinX();
                     int miny = srcRaster.getMinY();
-                    int[] bands = new int[numBands-1];
-                    for (int i=0; i < numBands-1; i++) {
+                    int[] bands = new int[numSrcColorComp];
+                    for (int i=0; i < numSrcColorComp; i++) {
                         bands[i] = i;
                     }
                     srcRaster =
@@ -407,14 +421,11 @@
                                                       minx, miny,
                                                       bands);
                 }
-            }
-            if (dstCM.hasAlpha()) {
-                int dstNumBands = dstRaster.getNumBands();
-                if (dstNumBands-1 == length || length == 1) {
+                if (dstCM.hasAlpha()) {
                     int minx = dstRaster.getMinX();
                     int miny = dstRaster.getMinY();
-                    int[] bands = new int[numBands-1];
-                    for (int i=0; i < numBands-1; i++) {
+                    int[] bands = new int[numSrcColorComp];
+                    for (int i=0; i < numSrcColorComp; i++) {
                         bands[i] = i;
                     }
                     dstRaster =
@@ -429,17 +440,42 @@
             //
             // Call the raster filter method
             //
-            filter(srcRaster, dstRaster);
+            filterRasterImpl(srcRaster, dstRaster, scaleConst);
+
+            //
+            // here copy the unscaled src alpha to destination alpha channel
+            //
+            if (!scaleAlpha) {
+                Raster srcAlphaRaster = null;
+                WritableRaster dstAlphaRaster = null;
 
+                if (srcCM.hasAlpha()) {
+                    srcAlphaRaster = src.getAlphaRaster();
+                }
+                if (dstCM.hasAlpha()) {
+                    dstAlphaRaster = dst.getAlphaRaster();
+                    if (srcAlphaRaster != null) {
+                        dstAlphaRaster.setRect(srcAlphaRaster);
+                    } else {
+                        int alpha = 0xff << 24;
+                        for (int cy=0; cy < dst.getHeight(); cy++) {
+                            for (int cx=0; cx < dst.getWidth(); cx++) {
+                                int color = dst.getRGB(cx, cy);
+
+                                dst.setRGB(cx, cy, color | alpha);
+                            }
+                        }
+                    }
+                }
+            }
         }
 
         if (needToConvert) {
             // ColorModels are not the same
             ColorConvertOp ccop = new ColorConvertOp(hints);
-            ccop.filter(dst, origDst);
+            dst = ccop.filter(dst, origDst);
         }
-
-        return origDst;
+        return dst;
     }
 
     /**
@@ -461,6 +497,10 @@
      *         stated in the class comments.
      */
     public final WritableRaster filter (Raster src, WritableRaster dst)  {
+        return filterRasterImpl(src, dst, length);
+    }
+
+    private WritableRaster filterRasterImpl(Raster src, WritableRaster dst, int scaleConst) {
         int numBands = src.getNumBands();
         int width  = src.getWidth();
         int height = src.getHeight();
@@ -484,15 +524,15 @@
                             + " does not equal number of bands in dest "
                             + dst.getNumBands());
         }
+
         // Make sure that the arrays match
         // Make sure that the low/high/constant arrays match
-        if (length != 1 && length != src.getNumBands()) {
+        if (scaleConst != 1 && scaleConst != src.getNumBands()) {
             throw new IllegalArgumentException("Number of scaling constants "+
                                                "does not equal the number of"+
                                                " of bands in the src raster");
         }
 
-
         //
         // Try for a native raster rescale first
         //
@@ -523,7 +563,7 @@
             //
             // Fall back to the slow code
             //
-            if (length > 1) {
+            if (scaleConst > 1) {
                 step = 1;
             }
 
--- a/jdk/src/java.desktop/share/classes/java/beans/EventSetDescriptor.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/beans/EventSetDescriptor.java	Tue Aug 25 12:19:46 2015 -0700
@@ -54,16 +54,16 @@
     private boolean inDefaultEventSet = true;
 
     /**
-     * Creates an <TT>EventSetDescriptor</TT> assuming that you are
+     * Creates an {@code EventSetDescriptor} assuming that you are
      * following the most simple standard design pattern where a named
-     * event &quot;fred&quot; is (1) delivered as a call on the single method of
+     * event "fred" is (1) delivered as a call on the single method of
      * interface FredListener, (2) has a single argument of type FredEvent,
      * and (3) where the FredListener may be registered with a call on an
      * addFredListener method of the source component and removed with a
      * call on a removeFredListener method.
      *
      * @param sourceClass  The class firing the event.
-     * @param eventSetName  The programmatic name of the event.  E.g. &quot;fred&quot;.
+     * @param eventSetName  The programmatic name of the event.  E.g. "fred".
      *          Note that this should normally start with a lower-case character.
      * @param listenerType  The target interface that events
      *          will get delivered to.
@@ -100,7 +100,7 @@
     }
 
     /**
-     * Creates an <TT>EventSetDescriptor</TT> from scratch using
+     * Creates an {@code EventSetDescriptor} from scratch using
      * string names.
      *
      * @param sourceClass  The class firing the event.
@@ -199,8 +199,8 @@
     }
 
     /**
-     * Creates an <TT>EventSetDescriptor</TT> from scratch using
-     * <TT>java.lang.reflect.Method</TT> and <TT>java.lang.Class</TT> objects.
+     * Creates an {@code EventSetDescriptor} from scratch using
+     * {@code java.lang.reflect.Method} and {@code java.lang.Class} objects.
      *
      * @param eventSetName The programmatic name of the event set.
      * @param listenerType The Class for the listener interface.
@@ -267,8 +267,8 @@
     }
 
     /**
-     * Creates an <TT>EventSetDescriptor</TT> from scratch using
-     * <TT>java.lang.reflect.MethodDescriptor</TT> and <TT>java.lang.Class</TT>
+     * Creates an {@code EventSetDescriptor} from scratch using
+     * {@code java.lang.reflect.MethodDescriptor} and {@code java.lang.Class}
      *  objects.
      *
      * @param eventSetName The programmatic name of the event set.
@@ -299,7 +299,7 @@
     }
 
     /**
-     * Gets the <TT>Class</TT> object for the target interface.
+     * Gets the {@code Class} object for the target interface.
      *
      * @return The Class object for the target interface that will
      * get invoked when the event is fired.
@@ -317,7 +317,7 @@
     /**
      * Gets the methods of the target listener interface.
      *
-     * @return An array of <TT>Method</TT> objects for the target methods
+     * @return An array of {@code Method} objects for the target methods
      * within the target listener interface that will get called when
      * events are fired.
      */
@@ -355,9 +355,9 @@
     }
 
     /**
-     * Gets the <code>MethodDescriptor</code>s of the target listener interface.
+     * Gets the {@code MethodDescriptor}s of the target listener interface.
      *
-     * @return An array of <code>MethodDescriptor</code> objects for the target methods
+     * @return An array of {@code MethodDescriptor} objects for the target methods
      * within the target listener interface that will get called when
      * events are fired.
      */
@@ -442,30 +442,30 @@
      * Normally event sources are multicast.  However there are some
      * exceptions that are strictly unicast.
      *
-     * @return  <TT>true</TT> if the event set is unicast.
-     *          Defaults to <TT>false</TT>.
+     * @return  {@code true} if the event set is unicast.
+     *          Defaults to {@code false}.
      */
     public boolean isUnicast() {
         return unicast;
     }
 
     /**
-     * Marks an event set as being in the &quot;default&quot; set (or not).
-     * By default this is <TT>true</TT>.
+     * Marks an event set as being in the "default" set (or not).
+     * By default this is {@code true}.
      *
-     * @param inDefaultEventSet <code>true</code> if the event set is in
-     *                          the &quot;default&quot; set,
-     *                          <code>false</code> if not
+     * @param inDefaultEventSet {@code true} if the event set is in
+     *                          the "default" set,
+     *                          {@code false} if not
      */
     public void setInDefaultEventSet(boolean inDefaultEventSet) {
         this.inDefaultEventSet = inDefaultEventSet;
     }
 
     /**
-     * Reports if an event set is in the &quot;default&quot; set.
+     * Reports if an event set is in the "default" set.
      *
-     * @return  <TT>true</TT> if the event set is in
-     *          the &quot;default&quot; set.  Defaults to <TT>true</TT>.
+     * @return  {@code true} if the event set is in
+     *          the "default" set.  Defaults to {@code true}.
      */
     public boolean isInDefaultEventSet() {
         return inDefaultEventSet;
--- a/jdk/src/java.desktop/share/classes/java/beans/SimpleBeanInfo.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/beans/SimpleBeanInfo.java	Tue Aug 25 12:19:46 2015 -0700
@@ -27,8 +27,7 @@
 
 import java.awt.Image;
 import java.awt.Toolkit;
-import java.awt.image.ImageProducer;
-import java.net.URL;
+import java.io.InputStream;
 
 /**
  * This is a support class to make it easier for people to provide
@@ -122,14 +121,8 @@
      * @return  an image object.  May be null if the load failed.
      */
     public Image loadImage(final String resourceName) {
-        try {
-            final URL url = getClass().getResource(resourceName);
-            if (url != null) {
-                final ImageProducer ip = (ImageProducer) url.getContent();
-                if (ip != null) {
-                    return Toolkit.getDefaultToolkit().createImage(ip);
-                }
-            }
+        try (InputStream in = getClass().getResourceAsStream(resourceName)) {
+            return Toolkit.getDefaultToolkit().createImage(in.readAllBytes());
         } catch (final Exception ignored) {
         }
         return null;
--- a/jdk/src/java.desktop/share/classes/java/beans/beancontext/BeanContextChildSupport.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/beans/beancontext/BeanContextChildSupport.java	Tue Aug 25 12:19:46 2015 -0700
@@ -91,9 +91,9 @@
     }
 
     /**
-     * Sets the <code>BeanContext</code> for
-     * this <code>BeanContextChildSupport</code>.
-     * @param bc the new value to be assigned to the <code>BeanContext</code>
+     * Sets the {@code BeanContext} for
+     * this {@code BeanContextChildSupport}.
+     * @param bc the new value to be assigned to the {@code BeanContext}
      * property
      * @throws PropertyVetoException if the change is rejected
      */
@@ -137,10 +137,10 @@
     }
 
     /**
-     * Gets the nesting <code>BeanContext</code>
-     * for this <code>BeanContextChildSupport</code>.
-     * @return the nesting <code>BeanContext</code> for
-     * this <code>BeanContextChildSupport</code>.
+     * Gets the nesting {@code BeanContext}
+     * for this {@code BeanContextChildSupport}.
+     * @return the nesting {@code BeanContext} for
+     * this {@code BeanContextChildSupport}.
      */
     public synchronized BeanContext getBeanContext() { return beanContext; }
 
@@ -149,11 +149,11 @@
      * The same listener object may be added more than once.  For each
      * property,  the listener will be invoked the number of times it was added
      * for that property.
-     * If <code>name</code> or <code>pcl</code> is null, no exception is thrown
+     * If {@code name} or {@code pcl} is null, no exception is thrown
      * and no action is taken.
      *
      * @param name The name of the property to listen on
-     * @param pcl The <code>PropertyChangeListener</code> to be added
+     * @param pcl The {@code PropertyChangeListener} to be added
      */
     public void addPropertyChangeListener(String name, PropertyChangeListener pcl) {
         pcSupport.addPropertyChangeListener(name, pcl);
@@ -161,12 +161,12 @@
 
     /**
      * Remove a PropertyChangeListener for a specific property.
-     * If <code>pcl</code> was added more than once to the same event
+     * If {@code pcl} was added more than once to the same event
      * source for the specified property, it will be notified one less time
      * after being removed.
-     * If <code>name</code> is null, no exception is thrown
+     * If {@code name} is null, no exception is thrown
      * and no action is taken.
-     * If <code>pcl</code> is null, or was never added for the specified
+     * If {@code pcl} is null, or was never added for the specified
      * property, no exception is thrown and no action is taken.
      *
      * @param name The name of the property that was listened on
@@ -181,28 +181,28 @@
      * The same listener object may be added more than once.  For each
      * property,  the listener will be invoked the number of times it was added
      * for that property.
-     * If <code>name</code> or <code>vcl</code> is null, no exception is thrown
+     * If {@code name} or {@code vcl} is null, no exception is thrown
      * and no action is taken.
      *
      * @param name The name of the property to listen on
-     * @param vcl The <code>VetoableChangeListener</code> to be added
+     * @param vcl The {@code VetoableChangeListener} to be added
      */
     public void addVetoableChangeListener(String name, VetoableChangeListener vcl) {
         vcSupport.addVetoableChangeListener(name, vcl);
     }
 
     /**
-     * Removes a <code>VetoableChangeListener</code>.
-     * If <code>pcl</code> was added more than once to the same event
+     * Removes a {@code VetoableChangeListener}.
+     * If {@code pcl} was added more than once to the same event
      * source for the specified property, it will be notified one less time
      * after being removed.
-     * If <code>name</code> is null, no exception is thrown
+     * If {@code name} is null, no exception is thrown
      * and no action is taken.
-     * If <code>vcl</code> is null, or was never added for the specified
+     * If {@code vcl} is null, or was never added for the specified
      * property, no exception is thrown and no action is taken.
      *
      * @param name The name of the property that was listened on
-     * @param vcl The <code>VetoableChangeListener</code> to be removed
+     * @param vcl The {@code VetoableChangeListener} to be removed
      */
     public void removeVetoableChangeListener(String name, VetoableChangeListener vcl) {
         vcSupport.removeVetoableChangeListener(name, vcl);
@@ -213,7 +213,7 @@
      *
      * Subclasses may override this method in order to implement their own
      * behaviors.
-     * @param bcsre The <code>BeanContextServiceRevokedEvent</code> fired as a
+     * @param bcsre The {@code BeanContextServiceRevokedEvent} fired as a
      * result of a service being revoked
      */
     public void serviceRevoked(BeanContextServiceRevokedEvent bcsre) { }
@@ -230,10 +230,10 @@
     public void serviceAvailable(BeanContextServiceAvailableEvent bcsae) { }
 
     /**
-     * Gets the <tt>BeanContextChild</tt> associated with this
-     * <tt>BeanContextChildSupport</tt>.
+     * Gets the {@code BeanContextChild} associated with this
+     * {@code BeanContextChildSupport}.
      *
-     * @return the <tt>BeanContextChild</tt> peer of this class
+     * @return the {@code BeanContextChild} peer of this class
      */
     public BeanContextChild getBeanContextChildPeer() { return beanContextChildPeer; }
 
@@ -283,7 +283,7 @@
      * PropertyVetoException.
      * @param newValue the new value that has been requested for
      *  the BeanContext property
-     * @return <code>true</code> if the change operation is to be vetoed
+     * @return {@code true} if the change operation is to be vetoed
      */
     public boolean validatePendingSetBeanContext(BeanContext newValue) {
         return true;
@@ -345,20 +345,20 @@
      */
 
     /**
-     * The <code>BeanContext</code> in which
-     * this <code>BeanContextChild</code> is nested.
+     * The {@code BeanContext} in which
+     * this {@code BeanContextChild} is nested.
      */
     public    BeanContextChild      beanContextChildPeer;
 
    /**
-    * The <tt>PropertyChangeSupport</tt> associated with this
-    * <tt>BeanContextChildSupport</tt>.
+    * The {@code PropertyChangeSupport} associated with this
+    * {@code BeanContextChildSupport}.
     */
     protected PropertyChangeSupport pcSupport;
 
    /**
-    * The <tt>VetoableChangeSupport</tt> associated with this
-    * <tt>BeanContextChildSupport</tt>.
+    * The {@code VetoableChangeSupport} associated with this
+    * {@code BeanContextChildSupport}.
     */
     protected VetoableChangeSupport vcSupport;
 
@@ -369,7 +369,7 @@
 
    /**
     * A flag indicating that there has been
-    * at least one <code>PropertyChangeVetoException</code>
+    * at least one {@code PropertyChangeVetoException}
     * thrown for the attempted setBeanContext operation.
     */
     protected transient boolean               rejectedSetBCOnce;
--- a/jdk/src/java.desktop/share/classes/java/beans/beancontext/BeanContextServicesSupport.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/beans/beancontext/BeanContextServicesSupport.java	Tue Aug 25 12:19:46 2015 -0700
@@ -134,10 +134,10 @@
     }
 
     /**
-     * Gets the <tt>BeanContextServices</tt> associated with this
-     * <tt>BeanContextServicesSupport</tt>.
+     * Gets the {@code BeanContextServices} associated with this
+     * {@code BeanContextServicesSupport}.
      *
-     * @return the instance of <tt>BeanContext</tt>
+     * @return the instance of {@code BeanContext}
      * this object is providing the implementation for.
      */
     public BeanContextServices getBeanContextServicesPeer() {
@@ -1001,7 +1001,7 @@
     }
 
     /**
-     * Gets the <tt>BeanContextServicesListener</tt> (if any) of the specified
+     * Gets the {@code BeanContextServicesListener} (if any) of the specified
      * child.
      *
      * @param child the specified child
@@ -1084,7 +1084,7 @@
     }
 
     /**
-     * Fires a <tt>BeanContextServiceEvent</tt> notifying of a new service.
+     * Fires a {@code BeanContextServiceEvent} notifying of a new service.
      * @param serviceClass the service class
      */
     protected final void fireServiceAdded(Class<?> serviceClass) {
@@ -1094,10 +1094,10 @@
     }
 
     /**
-     * Fires a <tt>BeanContextServiceAvailableEvent</tt> indicating that a new
+     * Fires a {@code BeanContextServiceAvailableEvent} indicating that a new
      * service has become available.
      *
-     * @param bcssae the <tt>BeanContextServiceAvailableEvent</tt>
+     * @param bcssae the {@code BeanContextServiceAvailableEvent}
      */
     protected final void fireServiceAdded(BeanContextServiceAvailableEvent bcssae) {
         Object[]                         copy;
@@ -1110,9 +1110,9 @@
     }
 
     /**
-     * Fires a <tt>BeanContextServiceEvent</tt> notifying of a service being revoked.
+     * Fires a {@code BeanContextServiceEvent} notifying of a service being revoked.
      *
-     * @param bcsre the <tt>BeanContextServiceRevokedEvent</tt>
+     * @param bcsre the {@code BeanContextServiceRevokedEvent}
      */
     protected final void fireServiceRevoked(BeanContextServiceRevokedEvent bcsre) {
         Object[]                         copy;
@@ -1125,7 +1125,7 @@
     }
 
     /**
-     * Fires a <tt>BeanContextServiceRevokedEvent</tt>
+     * Fires a {@code BeanContextServiceRevokedEvent}
      * indicating that a particular service is
      * no longer available.
      * @param serviceClass the service class
@@ -1235,25 +1235,25 @@
      */
 
     /**
-     * all accesses to the <code> protected transient HashMap services </code>
+     * all accesses to the {@code protected transient HashMap services}
      * field should be synchronized on that object
      */
     protected transient HashMap<Object, BCSSServiceProvider>  services;
 
     /**
-     * The number of instances of a serializable <tt>BeanContextServceProvider</tt>.
+     * The number of instances of a serializable {@code BeanContextServceProvider}.
      */
     protected transient int                      serializable = 0;
 
 
     /**
-     * Delegate for the <tt>BeanContextServiceProvider</tt>.
+     * Delegate for the {@code BeanContextServiceProvider}.
      */
     protected transient BCSSProxyServiceProvider proxy;
 
 
     /**
-     * List of <tt>BeanContextServicesListener</tt> objects.
+     * List of {@code BeanContextServicesListener} objects.
      */
     protected transient ArrayList<BeanContextServicesListener> bcsListeners;
 }
--- a/jdk/src/java.desktop/share/classes/java/beans/beancontext/BeanContextSupport.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/java/beans/beancontext/BeanContextSupport.java	Tue Aug 25 12:19:46 2015 -0700
@@ -85,16 +85,16 @@
      * Construct a BeanContextSupport instance
      *
      *
-     * @param peer      The peer <tt>BeanContext</tt> we are
+     * @param peer      The peer {@code BeanContext} we are
      *                  supplying an implementation for,
-     *                  or <tt>null</tt>
+     *                  or {@code null}
      *                  if this object is its own peer
      * @param lcle      The current Locale for this BeanContext. If
-     *                  <tt>lcle</tt> is <tt>null</tt>, the default locale
-     *                  is assigned to the <tt>BeanContext</tt> instance.
+     *                  {@code lcle} is {@code null}, the default locale
+     *                  is assigned to the {@code BeanContext} instance.
      * @param dTime     The initial state,
-     *                  <tt>true</tt> if in design mode,
-     *                  <tt>false</tt> if runtime.
+     *                  {@code true} if in design mode,
+     *                  {@code false} if runtime.
      * @param visible   The initial visibility.
      * @see java.util.Locale#getDefault()
      * @see java.util.Locale#setDefault(java.util.Locale)
@@ -112,15 +112,15 @@
     /**
      * Create an instance using the specified Locale and design mode.
      *
-     * @param peer      The peer <tt>BeanContext</tt> we
+     * @param peer      The peer {@code BeanContext} we
      *                  are supplying an implementation for,
-     *                  or <tt>null</tt> if this object is its own peer
-     * @param lcle      The current Locale for this <tt>BeanContext</tt>. If
-     *                  <tt>lcle</tt> is <tt>null</tt>, the default locale
-     *                  is assigned to the <tt>BeanContext</tt> instance.
-     * @param dtime     The initial state, <tt>true</tt>
+     *                  or {@code null} if this object is its own peer
+     * @param lcle      The current Locale for this {@code BeanContext}. If
+     *                  {@code lcle} is {@code null}, the default locale
+     *                  is assigned to the {@code BeanContext} instance.
+     * @param dtime     The initial state, {@code true}
      *                  if in design mode,
-     *                  <tt>false</tt> if runtime.
+     *                  {@code false} if runtime.
      * @see java.util.Locale#getDefault()
      * @see java.util.Locale#setDefault(java.util.Locale)
      */
@@ -133,13 +133,13 @@
      *
      * @param peer      The peer BeanContext we are
      *                  supplying an implementation for,
-     *                  or <tt>null</tt> if this object
+     *                  or {@code null} if this object
      *                  is its own peer
      * @param lcle      The current Locale for this
-     *                  <tt>BeanContext</tt>. If
-     *                  <tt>lcle</tt> is <tt>null</tt>,
+     *                  {@code BeanContext}. If
+     *                  {@code lcle} is {@code null},
      *                  the default locale
-     *                  is assigned to the <tt>BeanContext</tt>
+     *                  is assigned to the {@code BeanContext}
      *                  instance.
      * @see java.util.Locale#getDefault()
      * @see java.util.Locale#setDefault(java.util.Locale)
@@ -151,9 +151,9 @@
     /**
      * Create an instance using with a default locale
      *
-     * @param peer      The peer <tt>BeanContext</tt> we are
+     * @param peer      The peer {@code BeanContext} we are
      *                  supplying an implementation for,
-     *                  or <tt>null</tt> if this object
+     *                  or {@code null} if this object
      *                  is its own peer
      */
     public BeanContextSupport(BeanContext peer) {
@@ -169,7 +169,7 @@
     }
 
     /**
-     * Gets the instance of <tt>BeanContext</tt> that
+     * Gets the instance of {@code BeanContext} that
      * this object is providing the implementation for.
      * @return the BeanContext instance
      */
@@ -180,7 +180,7 @@
      * The instantiateChild method is a convenience hook
      * in BeanContext to simplify
      * the task of instantiating a Bean, nested,
-     * into a <tt>BeanContext</tt>.
+     * into a {@code BeanContext}.
      * </p>
      * <p>
      * The semantics of the beanName parameter are defined by java.beans.Beans.instantiate.
@@ -213,8 +213,8 @@
 
     /**
      * Reports whether or not this
-     * <tt>BeanContext</tt> is empty.
-     * A <tt>BeanContext</tt> is considered
+     * {@code BeanContext} is empty.
+     * A {@code BeanContext} is considered
      * empty when it contains zero
      * nested children.
      * @return if there are not children
@@ -227,7 +227,7 @@
 
     /**
      * Determines whether or not the specified object
-     * is currently a child of this <tt>BeanContext</tt>.
+     * is currently a child of this {@code BeanContext}.
      * @param o the Object in question
      * @return if this object is a child
      */
@@ -239,7 +239,7 @@
 
     /**
      * Determines whether or not the specified object
-     * is currently a child of this <tt>BeanContext</tt>.
+     * is currently a child of this {@code BeanContext}.
      * @param o the Object in question
      * @return if this object is a child
      */
@@ -250,9 +250,9 @@
     }
 
     /**
-     * Gets all JavaBean or <tt>BeanContext</tt> instances
-     * currently nested in this <tt>BeanContext</tt>.
-     * @return an <tt>Iterator</tt> of the nested children
+     * Gets all JavaBean or {@code BeanContext} instances
+     * currently nested in this {@code BeanContext}.
+     * @return an {@code Iterator} of the nested children
      */
     public Iterator<Object> iterator() {
         synchronized(children) {
@@ -261,7 +261,7 @@
     }
 
     /**
-     * Gets all JavaBean or <tt>BeanContext</tt>
+     * Gets all JavaBean or {@code BeanContext}
      * instances currently nested in this BeanContext.
      */
     public Object[] toArray() {
@@ -272,7 +272,7 @@
 
     /**
      * Gets an array containing all children of
-     * this <tt>BeanContext</tt> that match
+     * this {@code BeanContext} that match
      * the types contained in arry.
      * @param arry The array of object
      * types that are of interest.
@@ -362,7 +362,7 @@
     /************************************************************************/
 
     /**
-     * Adds/nests a child within this <tt>BeanContext</tt>.
+     * Adds/nests a child within this {@code BeanContext}.
      * <p>
      * Invoked as a side effect of java.beans.Beans.instantiate().
      * If the child object is not valid for adding then this method
@@ -371,7 +371,7 @@
      *
      *
      * @param targetChild The child objects to nest
-     * within this <tt>BeanContext</tt>
+     * within this {@code BeanContext}
      * @return true if the child was added successfully.
      * @see #validatePendingAdd
      */
@@ -485,12 +485,12 @@
 
     /**
      * internal remove used when removal caused by
-     * unexpected <tt>setBeanContext</tt> or
-     * by <tt>remove()</tt> invocation.
+     * unexpected {@code setBeanContext} or
+     * by {@code remove()} invocation.
      * @param targetChild the JavaBean, BeanContext, or Object to be removed
      * @param callChildSetBC used to indicate that
      * the child should be notified that it is no
-     * longer nested in this <tt>BeanContext</tt>.
+     * longer nested in this {@code BeanContext}.
      * @return whether or not was present before being removed
      */
     protected boolean remove(Object targetChild, boolean callChildSetBC) {
@@ -558,13 +558,13 @@
 
     /**
      * Tests to see if all objects in the
-     * specified <tt>Collection</tt> are children of
-     * this <tt>BeanContext</tt>.
-     * @param c the specified <tt>Collection</tt>
+     * specified {@code Collection} are children of
+     * this {@code BeanContext}.
+     * @param c the specified {@code Collection}
      *
-     * @return <tt>true</tt> if all objects
+     * @return {@code true} if all objects
      * in the collection are children of
-     * this <tt>BeanContext</tt>, false if not.
+     * this {@code BeanContext}, false if not.
      */
     @SuppressWarnings("rawtypes")
     public boolean containsAll(Collection c) {
@@ -698,7 +698,7 @@
     }
 
     /**
-     * Sets the new design time value for this <tt>BeanContext</tt>.
+     * Sets the new design time value for this {@code BeanContext}.
      * @param dTime the new designTime value
      */
     public synchronized void setDesignTime(boolean dTime) {
@@ -713,15 +713,15 @@
     /**
      * Reports whether or not this object is in
      * currently in design time mode.
-     * @return <tt>true</tt> if in design time mode,
-     * <tt>false</tt> if not
+     * @return {@code true} if in design time mode,
+     * {@code false} if not
      */
     public synchronized boolean isDesignTime() { return designTime; }
 
     /**
      * Sets the locale of this BeanContext.
      * @param newLocale the new locale. This method call will have
-     *        no effect if newLocale is <CODE>null</CODE>.
+     *        no effect if newLocale is {@code null}.
      * @throws PropertyVetoException if the new value is rejected
      */
     public synchronized void setLocale(Locale newLocale) throws PropertyVetoException {
@@ -738,9 +738,9 @@
     }
 
     /**
-     * Gets the locale for this <tt>BeanContext</tt>.
+     * Gets the locale for this {@code BeanContext}.
      *
-     * @return the current Locale of the <tt>BeanContext</tt>
+     * @return the current Locale of the {@code BeanContext}
      */
     public synchronized Locale getLocale() { return locale; }
 
@@ -754,7 +754,7 @@
      * to determine if they are either Containers, Components, or if they implement
      * Visibility and return needsGui() == true.
      * </p>
-     * @return <tt>true</tt> if the implementor needs a GUI
+     * @return {@code true} if the implementor needs a GUI
      */
     public synchronized boolean needsGui() {
         BeanContext bc = getBeanContextPeer();
@@ -823,7 +823,7 @@
     }
 
     /**
-     * Used to determine if the <tt>BeanContext</tt>
+     * Used to determine if the {@code BeanContext}
      * child is avoiding using its GUI.
      * @return is this instance avoiding using its GUI?
      * @see Visibility
@@ -833,16 +833,16 @@
     }
 
     /**
-     * Is this <tt>BeanContext</tt> in the
+     * Is this {@code BeanContext} in the
      * process of being serialized?
-     * @return if this <tt>BeanContext</tt> is
+     * @return if this {@code BeanContext} is
      * currently being serialized
      */
     public boolean isSerializing() { return serializing; }
 
     /**
      * Returns an iterator of all children
-     * of this <tt>BeanContext</tt>.
+     * of this {@code BeanContext}.
      * @return an iterator for all the current BCSChild values
      */
     protected Iterator<BCSChild> bcsChildren() { synchronized(children) { return children.values().iterator();  } }
@@ -895,9 +895,9 @@
 
     /**
      * Used by writeObject to serialize a Collection.
-     * @param oos the <tt>ObjectOutputStream</tt>
+     * @param oos the {@code ObjectOutputStream}
      * to use during serialization
-     * @param coll the <tt>Collection</tt> to serialize
+     * @param coll the {@code Collection} to serialize
      * @throws IOException if serialization failed
      */
     protected final void serialize(ObjectOutputStream oos, Collection<?> coll) throws IOException {
@@ -943,8 +943,8 @@
 
     /**
      * Used to serialize all children of
-     * this <tt>BeanContext</tt>.
-     * @param oos the <tt>ObjectOutputStream</tt>
+     * this {@code BeanContext}.
+     * @param oos the {@code ObjectOutputStream}
      * to use during serialization
      * @throws IOException if serialization failed
      */
@@ -1375,7 +1375,7 @@
 
 
     /**
-     * all accesses to the <code> protected HashMap children </code> field
+     * all accesses to the {@code protected HashMap children} field
      * shall be synchronized on that object.
      */
     protected transient HashMap<Object, BCSChild>         children;
@@ -1383,7 +1383,7 @@
     private             int             serializable  = 0; // children serializable
 
     /**
-     * all accesses to the <code> protected ArrayList bcmListeners </code> field
+     * all accesses to the {@code protected ArrayList bcmListeners} field
      * shall be synchronized on that object.
      */
     protected transient ArrayList<BeanContextMembershipListener> bcmListeners;
@@ -1396,14 +1396,14 @@
     protected           Locale          locale;
 
     /**
-     * A <tt>boolean</tt> indicating if this
+     * A {@code boolean} indicating if this
      * instance may now render a GUI.
      */
     protected           boolean         okToUseGui;
 
 
     /**
-     * A <tt>boolean</tt> indicating whether or not
+     * A {@code boolean} indicating whether or not
      * this object is currently in design time mode.
      */
     protected           boolean         designTime;
--- a/jdk/src/java.desktop/share/classes/javax/accessibility/package.html	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/accessibility/package.html	Tue Aug 25 12:19:46 2015 -0700
@@ -43,7 +43,7 @@
 <A NAME="Accessible"></A><A HREF="Accessible.html">Interface Accessible</A></H3>
 <A HREF="Accessible.html">Interface Accessible</A> is the main interface
 of the Java Accessibility API. All components that support the Java Accessibility
-API must implement this interface. It contains a single method, <TT>getAccessibleContext</TT>,
+API must implement this interface. It contains a single method, <code>getAccessibleContext</code>,
 that returns an instance of the class <A HREF="#AccessibleContext">AccessibleContext</A>.
 Sun thinks that implementing this interface is the absolute minimum requirement
 of every object that is part of the user interface of a Java application,
@@ -53,7 +53,7 @@
 AccessibleContext</A></H3>
 <A HREF="AccessibleContext.html">AccessibleContext</A> represents the minimum
 information all accessible objects return and is obtained by calling the
-<TT>getAccessibleContext</TT> method on an object that implements the <A HREF="#Accessible">Accessible</A>
+<code>getAccessibleContext</code> method on an object that implements the <A HREF="#Accessible">Accessible</A>
 interface. This information includes the accessible name, description,
 <A HREF="#AccessibleRole">role</A>, and <A HREF="#AccessibleState">state</A>
 of the object, as well as information about the parent and children of
@@ -69,7 +69,7 @@
 perform one or more actions. This interface provides the standard mechanism
 for an assistive technology to determine what those actions are and tell
 the object to perform those actions. Any object that can be manipulated
-should return an object that implements this interface when the <TT>getAccessibleAction</TT>
+should return an object that implements this interface when the <code>getAccessibleAction</code>
 method is called on an AccessibleContext.</LI>
 
 <LI>
@@ -77,7 +77,7 @@
 has a graphical representation. This interface provides the standard mechanism
 for an assistive technology to determine and set the graphical representation
 of the object. Any object that is rendered on the screen should return
-an object that implements this interface when the <TT>getAccessibleComponent</TT>
+an object that implements this interface when the <code>getAccessibleComponent</code>
 method is called on an AccessibleContext.</LI>
 
 <LI>
@@ -86,7 +86,7 @@
 mechanism for an assistive technology to determine the currently selected
 children as well as modify the selection set. Any object that has children
 that can be selected should return an object that implements this interface
-when the <TT>getAccessibleSelection</TT> method is called on an AccessibleContext.</LI>
+when the <code>getAccessibleSelection</code> method is called on an AccessibleContext.</LI>
 
 <LI>
 <B><A HREF="#AccessibleText">AccessibleText</A></B> - the object presents
@@ -94,7 +94,7 @@
 standard mechanism for an assistive technology to access that text via
 its content, attributes, and spatial location. Any object that contains
 editable text should return an object that implements this interface when
-the <TT>getAccessibleText</TT> method is called on an AccessibleContext.</LI>
+the <code>getAccessibleText</code> method is called on an AccessibleContext.</LI>
 
 <LI>
 <B><A HREF="#AccessibleHypertext">AccessibleHypertext</A></B> - the object
@@ -102,25 +102,25 @@
 the standard mechanism for an assistive technology to access that hypertext
 via its content, attributes, and spatial location. Any object that contains
 hypertext should return an object that implements this interface when the
-<TT>getAccessibleText</TT> method is called on an AccessibleContext.</LI>
+<code>getAccessibleText</code> method is called on an AccessibleContext.</LI>
 
 <LI>
 <B><A HREF="#AccessibleValue">AccessibleValue</A></B> - the object supports
 a numerical value. This interface provides the standard mechanism for an
 assistive technology to determine and set the current value of the object,
 as well as the minimum and maximum values. Any object that supports a numerical
-value should return an object that implements this interface when the <TT>getAccessibleValue</TT>
+value should return an object that implements this interface when the <code>getAccessibleValue</code>
 method is called on an AccessibleContext.</LI>
 </UL>
 
 <H3>
 <A NAME="AccessibleRole"></A><A HREF="AccessibleRole.html">Class AccessibleRole</A></H3>
 This class encapsulates the Accessible object's role in the user interface
-and is obtained by calling the <TT>getAccessibleRole</TT> method on an
+and is obtained by calling the <code>getAccessibleRole</code> method on an
 <A HREF="#AccessibleContext">AccessibleContext</A>. Accessible roles include
 "Check box", "Menu Item", "Panel", etc. These roles are identified by the
-constants in this class such as <TT>AccessibleRole.CHECK_BOX, AccessibleRole.MENU_ITEM,</TT>
-and <TT>AccessibleRole.PANEL</TT>. The constants in this class present
+constants in this class such as <code>AccessibleRole.CHECK_BOX, AccessibleRole.MENU_ITEM,</code>
+and <code>AccessibleRole.PANEL</code>. The constants in this class present
 a strongly typed enumeration of common object roles. A public constructor
 for this class has been purposely omitted and applications should use one
 of the constants from this class. Although this class pre-defines a large
@@ -131,10 +131,10 @@
 <A NAME="AccessibleState"></A><A HREF="AccessibleState.html">Class AccessibleState</A></H3>
 This class encapsulates a particular state of the Accessible object. Accessible
 states include things like "Armed", "Busy", "Checked", "Focused", etc.
-These roles are identified by the constants in this class such as <TT>AccessibleState.ARMED,
-AccessibleState.BUSY, AccessibleState.CHECKED,</TT> and <TT>AccessibleState.FOCUSED</TT>.
+These roles are identified by the constants in this class such as <code>AccessibleState.ARMED,
+AccessibleState.BUSY, AccessibleState.CHECKED,</code> and <code>AccessibleState.FOCUSED</code>.
 The sum of all the states of an Accessible object is called the <A HREF="#AccessibleStateSet">AccessibleStateSet</A>,
-and can be obtained by calling the <TT>getAccessibleStateSet</TT> method
+and can be obtained by calling the <code>getAccessibleStateSet</code> method
 on an <A HREF="#AccessibleContext">AccessibleContext</A>.
 
 <P>The constants in this class present a strongly typed enumeration of
@@ -148,7 +148,7 @@
 <A NAME="AccessibleStateSet"></A><A HREF="AccessibleStateSet.html">Class
 AccessibleStateSet</A></H3>
 This class encapsulates a collection of states of the Accessible object
-and is obtained by calling the <TT>getAccessibleStateSet</TT> method on
+and is obtained by calling the <code>getAccessibleStateSet</code> method on
 an <A HREF="#AccessibleContext">AccessibleContext</A>. Since an object
 might have multiple states (e.g. it might be both "Checked" and "Focused"),
 this class is needed to encapsulate a collection of these states. Methods
@@ -173,7 +173,7 @@
 
 <P>Applications can determine if an object supports the AccessibleAction
 interface by first obtaining its <A HREF="#AccessibleContext">AccessibleContext</A>
-(see <A HREF="#Accessible">Accessible</A>) and then calling the <TT>getAccessibleAction</TT>
+(see <A HREF="#Accessible">Accessible</A>) and then calling the <code>getAccessibleAction</code>
 method of <A HREF="#AccessibleContext">AccessibleContext</A>. If the return
 value is not null, the object supports this interface.
 <H3>
@@ -186,7 +186,7 @@
 
 <P>Applications can determine if an object supports the AccessibleComponent
 interface by first obtaining its <A HREF="#AccessibleContext">AccessibleContext</A>
-(see <A HREF="#Accessible">Accessible</A>) and then calling the <TT>getAccessibleComponent</TT>
+(see <A HREF="#Accessible">Accessible</A>) and then calling the <code>getAccessibleComponent</code>
 method of <A HREF="#AccessibleContext">AccessibleContext</A>. If the return
 value is not null, the object supports this interface.
 <H3>
@@ -200,7 +200,7 @@
 
 <P>Applications can determine if an object supports the AccessibleSelection
 interface by first obtaining its <A HREF="#AccessibleContext">AccessibleContext</A>
-(see <A HREF="#Accessible">Accessible</A>) and then calling the <TT>getAccessibleSelection</TT>
+(see <A HREF="#Accessible">Accessible</A>) and then calling the <code>getAccessibleSelection</code>
 method of <A HREF="#AccessibleContext">AccessibleContext</A>. If the return
 value is not null, the object supports this interface.
 <H3>
@@ -222,7 +222,7 @@
 
 <P>Applications can determine if an object supports the AccessibleText
 interface by first obtaining its <A HREF="#AccessibleContext">AccessibleContext</A>
-(see <A HREF="#Accessible">Accessible</A>) and then calling the <TT>getAccessibleText</TT>
+(see <A HREF="#Accessible">Accessible</A>) and then calling the <code>getAccessibleText</code>
 method of <A HREF="#AccessibleContext">AccessibleContext</A>. If the return
 value is not null, the object supports this interface.
 <H3><A NAME="AccessibleHypertext"></A>
@@ -256,7 +256,7 @@
 
 <P>Applications can determine if an object supports the AccessibleValue
 interface by first obtaining its <A HREF="#AccessibleContext">AccessibleContext</A>
-(see <A HREF="#Accessible">Accessible</A>) and then calling the <TT>getAccessibleValue</TT>
+(see <A HREF="#Accessible">Accessible</A>) and then calling the <code>getAccessibleValue</code>
 method of <A HREF="#AccessibleContext">AccessibleContext</A>. If the return
 value is not null, the object supports this interface.
 
--- a/jdk/src/java.desktop/share/classes/javax/imageio/spi/IIOServiceProvider.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/imageio/spi/IIOServiceProvider.java	Tue Aug 25 12:19:46 2015 -0700
@@ -40,7 +40,7 @@
  * @see javax.imageio.spi.ImageWriterSpi
  * @see javax.imageio.spi.ImageTranscoderSpi
  * @see javax.imageio.spi.ImageInputStreamSpi
- *
+ * @see javax.imageio.spi.ImageOutputStreamSpi
  */
 public abstract class IIOServiceProvider implements RegisterableService {
 
--- a/jdk/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java	Tue Aug 25 12:19:46 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -47,18 +47,33 @@
  * <p> Service providers are stored in one or more <i>categories</i>,
  * each of which is defined by a class of interface (described by a
  * <code>Class</code> object) that all of its members must implement.
- * The set of categories may be changed dynamically.
+ *
+ * <p>The set of categories supported is limited
+ * to the following standard Image I/O service types:
+ *
+ * <ul>
+ * <li>{@link ImageInputStreamSpi}
+ * <li>{@link ImageOutputStreamSpi}
+ * <li>{@link ImageReaderSpi}
+ * <li>{@link ImageTranscoderSpi}
+ * <li>{@link ImageWriterSpi}
+ * </ul>
+ *
+ * <p>An attempt to load a provider that is not a subtype of one of the
+ * above types will result in {@code IllegalArgumentException}. For
+ * a general mechanism to load service providers, see
+ * {@link java.util.ServiceLoader ServiceLoader}.
  *
  * <p> Only a single instance of a given leaf class (that is, the
  * actual class returned by <code>getClass()</code>, as opposed to any
  * inherited classes or interfaces) may be registered.  That is,
  * suppose that the
- * <code>com.mycompany.mypkg.GreenServiceProvider</code> class
- * implements the <code>com.mycompany.mypkg.MyService</code>
- * interface.  If a <code>GreenServiceProvider</code> instance is
+ * <code>com.mycompany.mypkg.GreenImageReaderProvider</code> class
+ * is a subclass of <code>javax.imageio.spi.ImageReaderSpi</code>.
+ * If a <code>GreenImageReaderProvider</code> instance is
  * registered, it will be stored in the category defined by the
- * <code>MyService</code> class.  If a new instance of
- * <code>GreenServiceProvider</code> is registered, it will replace
+ * <code>ImageReaderSpi</code> class.  If a new instance of
+ * <code>GreenImageReaderProvider</code> is registered, it will replace
  * the previous instance.  In practice, service provider objects are
  * usually singletons so this behavior is appropriate.
  *
@@ -68,15 +83,15 @@
  * for each service provider interface that has one or more
  * implementation classes present in the JAR file.  For example, if
  * the JAR file contained a class named
- * <code>com.mycompany.mypkg.MyServiceImpl</code> which implements the
- * <code>javax.someapi.SomeService</code> interface, the JAR file
+ * <code>com.mycompany.mypkg.GreenImageReaderProvider</code> which implements the
+ * <code>javax.imageio.spi.ImageReaderSpi</code> interface, the JAR file
  * would contain a file named: <pre>
- * META-INF/services/javax.someapi.SomeService </pre>
+ * META-INF/services/javax.imageio.spi.ImageReaderSpi</pre>
  *
  * containing the line:
  *
  * <pre>
- * com.mycompany.mypkg.MyService
+ * com.mycompany.mypkg.GreenImageReaderProvider
  * </pre>
  *
  * <p> The service provider classes should be to be lightweight and
@@ -94,7 +109,7 @@
  * JAR File Specification</a>.
  *
  * @see RegisterableService
- *
+ * @see java.util.ServiceLoader
  */
 public class ServiceRegistry {
 
@@ -104,13 +119,15 @@
     /**
      * Constructs a <code>ServiceRegistry</code> instance with a
      * set of categories taken from the <code>categories</code>
-     * argument.
+     * argument. The categories must all be members of the set
+     * of service types listed in the class specification.
      *
      * @param categories an <code>Iterator</code> containing
      * <code>Class</code> objects to be used to define categories.
      *
      * @exception IllegalArgumentException if
-     * <code>categories</code> is <code>null</code>.
+     * <code>categories</code> is <code>null</code>, or if
+     * one of the categories is not an allowed service type.
      */
     public ServiceRegistry(Iterator<Class<?>> categories) {
         if (categories == null) {
@@ -118,6 +135,7 @@
         }
         while (categories.hasNext()) {
             Class<?> category = categories.next();
+            checkClassAllowed(category);
             SubRegistry reg = new SubRegistry(this, category);
             categoryMap.put(category, reg);
         }
@@ -127,6 +145,10 @@
      * Searches for implementations of a particular service class
      * using the given class loader.
      *
+     * <p>The service class must be one of the service types listed
+     * in the class specification. If it is not, {@code IllegalArgumentException}
+     * will be thrown.
+     *
      * <p> This method transforms the name of the given service class
      * into a provider-configuration filename as described in the
      * class comment and then uses the <code>getResources</code>
@@ -157,7 +179,8 @@
      * cannot be found and instantiated.
      *
      * @exception IllegalArgumentException if
-     * <code>providerClass</code> is <code>null</code>.
+     * <code>providerClass</code> is <code>null</code>, or if it is
+     * not one of the allowed service types.
      */
     public static <T> Iterator<T> lookupProviders(Class<T> providerClass,
                                                   ClassLoader loader)
@@ -165,6 +188,7 @@
         if (providerClass == null) {
             throw new IllegalArgumentException("providerClass == null!");
         }
+        checkClassAllowed(providerClass);
         return ServiceLoader.load(providerClass, loader).iterator();
     }
 
@@ -178,6 +202,10 @@
      *   return Service.providers(service, cl);
      * </pre>
      *
+     * <p>The service class must be one of the service types listed
+     * in the class specification. If it is not, {@code IllegalArgumentException}
+     * will be thrown.
+     *
      * @param providerClass a <code>Class</code>object indicating the
      * class or interface of the service providers being detected.
      *
@@ -190,12 +218,14 @@
      * cannot be found and instantiated.
      *
      * @exception IllegalArgumentException if
-     * <code>providerClass</code> is <code>null</code>.
+     * <code>providerClass</code> is <code>null</code>, or if it is
+     * not one of the allowed service types.
      */
     public static <T> Iterator<T> lookupProviders(Class<T> providerClass) {
         if (providerClass == null) {
             throw new IllegalArgumentException("providerClass == null!");
         }
+        checkClassAllowed(providerClass);
         return ServiceLoader.load(providerClass).iterator();
     }
 
@@ -681,6 +711,28 @@
         deregisterAll();
         super.finalize();
     }
+
+    /**
+     * Checks whether the provided class is one of the allowed
+     * ImageIO service provider classes. If it is, returns normally.
+     * If it is not, throws IllegalArgumentException.
+     *
+     * @param clazz
+     * @throws IllegalArgumentException if clazz is null or is not one of the allowed set
+     */
+    private static void checkClassAllowed(Class<?> clazz) {
+        if (clazz == null) {
+            throw new IllegalArgumentException("class must not be null");
+        }
+
+        if (   clazz != ImageInputStreamSpi.class
+            && clazz != ImageOutputStreamSpi.class
+            && clazz != ImageReaderSpi.class
+            && clazz != ImageTranscoderSpi.class
+            && clazz != ImageWriterSpi.class) {
+            throw new IllegalArgumentException(clazz.getName() + " is not an ImageIO SPI class");
+        }
+    }
 }
 
 
--- a/jdk/src/java.desktop/share/classes/javax/imageio/spi/package.html	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/imageio/spi/package.html	Tue Aug 25 12:19:46 2015 -0700
@@ -39,8 +39,8 @@
 
 The <code>javax.imageio.spi</code> package contains service
 provider interfaces for reading, writing, and transcoding images, and
-obtaining input and output streams, as well as a run-time registry
-that discovers installed service provider instances and allows new
+obtaining image input and output streams, as well as a run-time registry
+that discovers installed instances of Image I/O service providers and allows new
 instances to be registered dynamically.
 
 @since 1.4
--- a/jdk/src/java.desktop/share/classes/javax/print/attribute/AttributeSet.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/AttributeSet.java	Tue Aug 25 12:19:46 2015 -0700
@@ -111,7 +111,7 @@
 
     /**
      * Returns the attribute value which this attribute set contains in the
-     * given attribute category. Returns <tt>null</tt> if this attribute set
+     * given attribute category. Returns {@code null} if this attribute set
      * does not contain any attribute value in the given attribute category.
      *
      * @param  category  Attribute category whose associated attribute value
@@ -121,14 +121,14 @@
      *                   Attribute}.
      *
      * @return  The attribute value in the given attribute category contained
-     *          in this attribute set, or <tt>null</tt> if this attribute set
+     *          in this attribute set, or {@code null} if this attribute set
      *          does not contain any attribute value in the given attribute
      *          category.
      *
      * @throws  NullPointerException
-     *     (unchecked exception) Thrown if the <CODE>category</CODE> is null.
+     *     (unchecked exception) Thrown if the {@code category} is null.
      * @throws  ClassCastException
-     *     (unchecked exception) Thrown if the <CODE>category</CODE> is not a
+     *     (unchecked exception) Thrown if the {@code category} is not a
      *     {@link java.lang.Class Class} that implements interface {@link
      *     Attribute Attribute}.
      */
@@ -141,74 +141,74 @@
      *
      * @param  attribute  Attribute value to be added to this attribute set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of the
+     * @return  {@code true} if this attribute set changed as a result of the
      *          call, i.e., the given attribute value was not already a member
      *          of this attribute set.
      *
      * @throws  NullPointerException
-     *     (unchecked exception) Thrown if the <CODE>attribute</CODE> is null.
+     *     (unchecked exception) Thrown if the {@code attribute} is null.
      * @throws  UnmodifiableSetException
      *     (unchecked exception) Thrown if this attribute set does not support
-     *     the <CODE>add()</CODE> operation.
+     *     the {@code add()} operation.
      */
     public boolean add(Attribute attribute);
 
 
     /**
      * Removes any attribute for this category from this attribute set if
-     * present. If <CODE>category</CODE> is null, then
-     * <CODE>remove()</CODE> does nothing and returns <tt>false</tt>.
+     * present. If {@code category} is null, then
+     * {@code remove()} does nothing and returns {@code false}.
      *
      * @param  category Attribute category to be removed from this
      *                  attribute set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of the
+     * @return  {@code true} if this attribute set changed as a result of the
      *         call, i.e., the given attribute value had been a member of this
      *          attribute set.
      *
      * @throws  UnmodifiableSetException
      *     (unchecked exception) Thrown if this attribute set does not support
-     *     the <CODE>remove()</CODE> operation.
+     *     the {@code remove()} operation.
      */
     public boolean remove(Class<?> category);
 
     /**
      * Removes the specified attribute from this attribute set if
-     * present. If <CODE>attribute</CODE> is null, then
-     * <CODE>remove()</CODE> does nothing and returns <tt>false</tt>.
+     * present. If {@code attribute} is null, then
+     * {@code remove()} does nothing and returns {@code false}.
      *
      * @param  attribute Attribute value to be removed from this attribute set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of the
+     * @return  {@code true} if this attribute set changed as a result of the
      *         call, i.e., the given attribute value had been a member of this
      *          attribute set.
      *
      * @throws  UnmodifiableSetException
      *     (unchecked exception) Thrown if this attribute set does not support
-     *     the <CODE>remove()</CODE> operation.
+     *     the {@code remove()} operation.
      */
     public boolean remove(Attribute attribute);
 
     /**
-     * Returns <tt>true</tt> if this attribute set contains an
+     * Returns {@code true} if this attribute set contains an
      * attribute for the specified category.
      *
      * @param  category whose presence in this attribute set is
      *            to be tested.
      *
-     * @return  <tt>true</tt> if this attribute set contains an attribute
+     * @return  {@code true} if this attribute set contains an attribute
      *         value for the specified category.
      */
     public boolean containsKey(Class<?> category);
 
     /**
-     * Returns <tt>true</tt> if this attribute set contains the given
+     * Returns {@code true} if this attribute set contains the given
      * attribute value.
      *
      * @param  attribute  Attribute value whose presence in this
      * attribute set is to be tested.
      *
-     * @return  <tt>true</tt> if this attribute set contains the given
+     * @return  {@code true} if this attribute set contains the given
      *      attribute  value.
      */
     public boolean containsValue(Attribute attribute);
@@ -219,11 +219,11 @@
      * {@link #add(Attribute) add(Attribute)}
      * operation had been applied to this attribute set successively with each
      * element from the specified set.
-     * The behavior of the <CODE>addAll(AttributeSet)</CODE>
+     * The behavior of the {@code addAll(AttributeSet)}
      * operation is unspecified if the specified set is modified while
      * the operation is in progress.
      * <P>
-     * If the <CODE>addAll(AttributeSet)</CODE> operation throws an exception,
+     * If the {@code addAll(AttributeSet)} operation throws an exception,
      * the effect on this attribute set's state is implementation dependent;
      * elements from the specified set before the point of the exception may
      * or may not have been added to this attribute set.
@@ -231,12 +231,12 @@
      * @param  attributes  whose elements are to be added to this attribute
      *            set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of the
+     * @return  {@code true} if this attribute set changed as a result of the
      *          call.
      *
      * @throws  UnmodifiableSetException
      *     (Unchecked exception) Thrown if this attribute set does not support
-     *     the <tt>addAll(AttributeSet)</tt> method.
+     *     the {@code addAll(AttributeSet)} method.
      * @throws  NullPointerException
      *     (Unchecked exception) Thrown if some element in the specified
      *     set is null.
@@ -247,8 +247,8 @@
 
     /**
      * Returns the number of attributes in this attribute set. If this
-     * attribute set contains more than <tt>Integer.MAX_VALUE</tt> elements,
-     * returns  <tt>Integer.MAX_VALUE</tt>.
+     * attribute set contains more than {@code Integer.MAX_VALUE} elements,
+     * returns  {@code Integer.MAX_VALUE}.
      *
      * @return  The number of attributes in this attribute set.
      */
@@ -267,7 +267,7 @@
      *
      * @throws  UnmodifiableSetException
      *   (unchecked exception) Thrown if this attribute set does not support
-     *     the <CODE>clear()</CODE> operation.
+     *     the {@code clear()} operation.
      */
     public void clear();
 
@@ -280,15 +280,15 @@
 
     /**
      * Compares the specified object with this attribute set for equality.
-     * Returns <tt>true</tt> if the given object is also an attribute set and
+     * Returns {@code true} if the given object is also an attribute set and
      * the two attribute sets contain the same attribute category-attribute
      * value mappings. This ensures that the
-     * <tt>equals()</tt> method works properly across different
+     * {@code equals()} method works properly across different
      * implementations of the AttributeSet interface.
      *
      * @param  object to be compared for equality with this attribute set.
      *
-     * @return  <tt>true</tt> if the specified object is equal to this
+     * @return  {@code true} if the specified object is equal to this
      *       attribute   set.
      */
     public boolean equals(Object object);
@@ -297,9 +297,9 @@
      * Returns the hash code value for this attribute set. The hash code of an
      * attribute set is defined to be the sum of the hash codes of each entry
      * in the AttributeSet.
-     * This ensures that <tt>t1.equals(t2)</tt> implies that
-     * <tt>t1.hashCode()==t2.hashCode()</tt> for any two attribute sets
-     * <tt>t1</tt> and <tt>t2</tt>, as required by the general contract of
+     * This ensures that {@code t1.equals(t2)} implies that
+     * {@code t1.hashCode()==t2.hashCode()} for any two attribute sets
+     * {@code t1} and {@code t2}, as required by the general contract of
      * {@link java.lang.Object#hashCode() Object.hashCode()}.
      *
      * @return  The hash code value for this attribute set.
--- a/jdk/src/java.desktop/share/classes/javax/print/attribute/DocAttributeSet.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/DocAttributeSet.java	Tue Aug 25 12:19:46 2015 -0700
@@ -54,19 +54,19 @@
      *
      * @param  attribute  Attribute value to be added to this attribute set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of
+     * @return  {@code true} if this attribute set changed as a result of
      *          the call, i.e., the given attribute value was not already a
      *          member of this attribute set.
      *
      * @throws  UnmodifiableSetException
      *     (unchecked exception) Thrown if this attribute set does not
-     *     support the <CODE>add()</CODE> operation.
+     *     support the {@code add()} operation.
      * @throws  ClassCastException
-     *     (unchecked exception) Thrown if the <CODE>attribute</CODE> is
+     *     (unchecked exception) Thrown if the {@code attribute} is
      *     not an instance of interface
      *     {@link DocAttribute DocAttribute}.
      * @throws  NullPointerException
-     *    (unchecked exception) Thrown if the <CODE>attribute</CODE> is null.
+     *    (unchecked exception) Thrown if the {@code attribute} is null.
      */
     public boolean add(Attribute attribute);
 
@@ -77,13 +77,13 @@
      * operation had been applied to this attribute set successively with
      * each element from the specified set. If none of the categories in the
      * specified set  are the same as any categories in this attribute set,
-     * the <tt>addAll()</tt> operation effectively modifies this attribute
+     * the {@code addAll()} operation effectively modifies this attribute
      * set so that its value is the <i>union</i> of the two sets.
      * <P>
-     * The behavior of the <CODE>addAll()</CODE> operation is unspecified if
+     * The behavior of the {@code addAll()} operation is unspecified if
      * the specified set is modified while the operation is in progress.
      * <P>
-     * If the <CODE>addAll()</CODE> operation throws an exception, the effect
+     * If the {@code addAll()} operation throws an exception, the effect
      * on this attribute set's state is implementation dependent; elements
      * from the specified set before the point of the exception may or
      * may not have been added to this attribute set.
@@ -91,12 +91,12 @@
      * @param  attributes  whose elements are to be added to this attribute
      *            set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of
+     * @return  {@code true} if this attribute set changed as a result of
      *          the call.
      *
      * @throws  UnmodifiableSetException
      *     (Unchecked exception) Thrown if this attribute set does not
-     *     support the <tt>addAll()</tt> method.
+     *     support the {@code addAll()} method.
      * @throws  ClassCastException
      *     (Unchecked exception) Thrown if some element in the specified
      *     set is not an instance of interface {@link DocAttribute
--- a/jdk/src/java.desktop/share/classes/javax/print/attribute/HashAttributeSet.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/HashAttributeSet.java	Tue Aug 25 12:19:46 2015 -0700
@@ -32,7 +32,7 @@
 import java.util.HashMap;
 
 /**
- * Class HashAttributeSet provides an <code>AttributeSet</code>
+ * Class HashAttributeSet provides an {@code AttributeSet}
  * implementation with characteristics of a hash map.
  *
  * @author  Alan Kaminsky
@@ -104,7 +104,7 @@
      * @param  attribute  Attribute value to add to the set.
      *
      * @exception  NullPointerException
-     *     (unchecked exception) Thrown if <CODE>attribute</CODE> is null.
+     *     (unchecked exception) Thrown if {@code attribute} is null.
      */
     public HashAttributeSet(Attribute attribute) {
         this (attribute, Attribute.class);
@@ -114,7 +114,7 @@
      * Construct a new attribute set,
      * initially populated with the values from the
      * given array. The new attribute set is populated by
-     * adding the elements of <CODE>attributes</CODE> array to the set in
+     * adding the elements of {@code attributes} array to the set in
      * sequence, starting at index 0. Thus, later array elements may replace
      * earlier array elements if the array contains duplicate attribute
      * values or attribute categories.
@@ -124,7 +124,7 @@
      *
      * @exception  NullPointerException
      *     (unchecked exception) Thrown if any element of
-     *     <CODE>attributes</CODE> is null.
+     *     {@code attributes} is null.
      */
     public HashAttributeSet(Attribute[] attributes) {
         this (attributes, Attribute.class);
@@ -171,11 +171,11 @@
      *                    subinterface thereof.
      *
      * @exception  NullPointerException
-     *     (unchecked exception) Thrown if <CODE>attribute</CODE> is null.
+     *     (unchecked exception) Thrown if {@code attribute} is null.
      * @exception NullPointerException if interfaceName is null.
      * @exception  ClassCastException
-     *     (unchecked exception) Thrown if <CODE>attribute</CODE> is not an
-     *     instance of <CODE>interfaceName</CODE>.
+     *     (unchecked exception) Thrown if {@code attribute} is not an
+     *     instance of {@code interfaceName}.
      */
     protected HashAttributeSet(Attribute attribute, Class<?> interfaceName) {
         if (interfaceName == null) {
@@ -189,7 +189,7 @@
      * Construct a new attribute set, where the members of the attribute
      * set are restricted to the given interface.
      * The new attribute set is populated
-     * by adding the elements of <CODE>attributes</CODE> array to the set in
+     * by adding the elements of {@code attributes} array to the set in
      * sequence, starting at index 0. Thus, later array elements may replace
      * earlier array elements if the array contains duplicate attribute
      * values or attribute categories.
@@ -203,12 +203,12 @@
      *
      * @exception  NullPointerException
      *     (unchecked exception) Thrown if any element of
-     * <CODE>attributes</CODE> is null.
+     * {@code attributes} is null.
      * @exception NullPointerException if interfaceName is null.
      * @exception  ClassCastException
      *     (unchecked exception) Thrown if any element of
-     * <CODE>attributes</CODE> is not an instance of
-     * <CODE>interfaceName</CODE>.
+     * {@code attributes} is not an instance of
+     * {@code interfaceName}.
      */
     protected HashAttributeSet(Attribute[] attributes, Class<?> interfaceName) {
         if (interfaceName == null) {
@@ -235,8 +235,8 @@
      *
      * @exception  ClassCastException
      *     (unchecked exception) Thrown if any element of
-     * <CODE>attributes</CODE> is not an instance of
-     * <CODE>interfaceName</CODE>.
+     * {@code attributes} is not an instance of
+     * {@code interfaceName}.
      */
     protected HashAttributeSet(AttributeSet attributes, Class<?> interfaceName) {
       myInterface = interfaceName;
@@ -251,7 +251,7 @@
 
     /**
      * Returns the attribute value which this attribute set contains in the
-     * given attribute category. Returns <tt>null</tt> if this attribute set
+     * given attribute category. Returns {@code null} if this attribute set
      * does not contain any attribute value in the given attribute category.
      *
      * @param  category  Attribute category whose associated attribute value
@@ -261,14 +261,14 @@
      *                   Attribute}.
      *
      * @return  The attribute value in the given attribute category contained
-     *          in this attribute set, or <tt>null</tt> if this attribute set
+     *          in this attribute set, or {@code null} if this attribute set
      *          does not contain any attribute value in the given attribute
      *          category.
      *
      * @throws  NullPointerException
-     *     (unchecked exception) Thrown if the <CODE>category</CODE> is null.
+     *     (unchecked exception) Thrown if the {@code category} is null.
      * @throws  ClassCastException
-     *     (unchecked exception) Thrown if the <CODE>category</CODE> is not a
+     *     (unchecked exception) Thrown if the {@code category} is not a
      *     {@link java.lang.Class Class} that implements interface {@link
      *     Attribute Attribute}.
      */
@@ -285,15 +285,15 @@
      *
      * @param  attribute  Attribute value to be added to this attribute set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of the
+     * @return  {@code true} if this attribute set changed as a result of the
      *          call, i.e., the given attribute value was not already a
      *          member of this attribute set.
      *
      * @throws  NullPointerException
-     *    (unchecked exception) Thrown if the <CODE>attribute</CODE> is null.
+     *    (unchecked exception) Thrown if the {@code attribute} is null.
      * @throws  UnmodifiableSetException
      *    (unchecked exception) Thrown if this attribute set does not support
-     *     the <CODE>add()</CODE> operation.
+     *     the {@code add()} operation.
      */
     public boolean add(Attribute attribute) {
         Object oldAttribute =
@@ -305,19 +305,19 @@
 
     /**
      * Removes any attribute for this category from this attribute set if
-     * present. If <CODE>category</CODE> is null, then
-     * <CODE>remove()</CODE> does nothing and returns <tt>false</tt>.
+     * present. If {@code category} is null, then
+     * {@code remove()} does nothing and returns {@code false}.
      *
      * @param  category Attribute category to be removed from this
      *                  attribute set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of the
+     * @return  {@code true} if this attribute set changed as a result of the
      *         call, i.e., the given attribute category had been a member of
      *         this attribute set.
      *
      * @throws  UnmodifiableSetException
      *     (unchecked exception) Thrown if this attribute set does not
-     *     support the <CODE>remove()</CODE> operation.
+     *     support the {@code remove()} operation.
      */
     public boolean remove(Class<?> category) {
         return
@@ -329,18 +329,18 @@
 
     /**
      * Removes the specified attribute from this attribute set if
-     * present. If <CODE>attribute</CODE> is null, then
-     * <CODE>remove()</CODE> does nothing and returns <tt>false</tt>.
+     * present. If {@code attribute} is null, then
+     * {@code remove()} does nothing and returns {@code false}.
      *
      * @param attribute Attribute value to be removed from this attribute set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of the
+     * @return  {@code true} if this attribute set changed as a result of the
      *         call, i.e., the given attribute value had been a member of
      *         this attribute set.
      *
      * @throws  UnmodifiableSetException
      *     (unchecked exception) Thrown if this attribute set does not
-     *     support the <CODE>remove()</CODE> operation.
+     *     support the {@code remove()} operation.
      */
     public boolean remove(Attribute attribute) {
         return
@@ -349,13 +349,13 @@
     }
 
     /**
-     * Returns <tt>true</tt> if this attribute set contains an
+     * Returns {@code true} if this attribute set contains an
      * attribute for the specified category.
      *
      * @param  category whose presence in this attribute set is
      *            to be tested.
      *
-     * @return  <tt>true</tt> if this attribute set contains an attribute
+     * @return  {@code true} if this attribute set contains an attribute
      *         value for the specified category.
      */
     public boolean containsKey(Class<?> category) {
@@ -367,13 +367,13 @@
     }
 
     /**
-     * Returns <tt>true</tt> if this attribute set contains the given
+     * Returns {@code true} if this attribute set contains the given
      * attribute.
      *
      * @param  attribute  value whose presence in this attribute set is
      *            to be tested.
      *
-     * @return  <tt>true</tt> if this attribute set contains the given
+     * @return  {@code true} if this attribute set contains the given
      *      attribute    value.
      */
     public boolean containsValue(Attribute attribute) {
@@ -389,11 +389,11 @@
      * {@link #add(Attribute) add(Attribute)}
      * operation had been applied to this attribute set successively with
      * each element from the specified set.
-     * The behavior of the <CODE>addAll(AttributeSet)</CODE>
+     * The behavior of the {@code addAll(AttributeSet)}
      * operation is unspecified if the specified set is modified while
      * the operation is in progress.
      * <P>
-     * If the <CODE>addAll(AttributeSet)</CODE> operation throws an exception,
+     * If the {@code addAll(AttributeSet)} operation throws an exception,
      * the effect on this attribute set's state is implementation dependent;
      * elements from the specified set before the point of the exception may
      * or may not have been added to this attribute set.
@@ -401,12 +401,12 @@
      * @param  attributes  whose elements are to be added to this attribute
      *            set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of the
+     * @return  {@code true} if this attribute set changed as a result of the
      *          call.
      *
      * @throws  UnmodifiableSetException
      *    (Unchecked exception) Thrown if this attribute set does not
-     *     support the <tt>addAll(AttributeSet)</tt> method.
+     *     support the {@code addAll(AttributeSet)} method.
      * @throws  NullPointerException
      *     (Unchecked exception) Thrown if some element in the specified
      *     set is null, or the set is null.
@@ -429,8 +429,8 @@
 
     /**
      * Returns the number of attributes in this attribute set. If this
-     * attribute set contains more than <tt>Integer.MAX_VALUE</tt> elements,
-     * returns  <tt>Integer.MAX_VALUE</tt>.
+     * attribute set contains more than {@code Integer.MAX_VALUE} elements,
+     * returns  {@code Integer.MAX_VALUE}.
      *
      * @return  The number of attributes in this attribute set.
      */
@@ -455,7 +455,7 @@
      *
      * @throws  UnmodifiableSetException
      *   (unchecked exception) Thrown if this attribute set does not support
-     *     the <CODE>clear()</CODE> operation.
+     *     the {@code clear()} operation.
      */
     public void clear() {
         attrMap.clear();
@@ -472,15 +472,15 @@
 
     /**
      * Compares the specified object with this attribute set for equality.
-     * Returns <tt>true</tt> if the given object is also an attribute set and
+     * Returns {@code true} if the given object is also an attribute set and
      * the two attribute sets contain the same attribute category-attribute
      * value mappings. This ensures that the
-     * <tt>equals()</tt> method works properly across different
+     * {@code equals()} method works properly across different
      * implementations of the AttributeSet interface.
      *
      * @param  object to be compared for equality with this attribute set.
      *
-     * @return  <tt>true</tt> if the specified object is equal to this
+     * @return  {@code true} if the specified object is equal to this
      *       attribute   set.
      */
 
@@ -507,9 +507,9 @@
      * Returns the hash code value for this attribute set.
      * The hash code of an attribute set is defined to be the sum
      * of the hash codes of each entry in the AttributeSet.
-     * This ensures that <tt>t1.equals(t2)</tt> implies that
-     * <tt>t1.hashCode()==t2.hashCode()</tt> for any two attribute sets
-     * <tt>t1</tt> and <tt>t2</tt>, as required by the general contract of
+     * This ensures that {@code t1.equals(t2)} implies that
+     * {@code t1.hashCode()==t2.hashCode()} for any two attribute sets
+     * {@code t1} and {@code t2}, as required by the general contract of
      * {@link java.lang.Object#hashCode() Object.hashCode()}.
      *
      * @return  The hash code value for this attribute set.
--- a/jdk/src/java.desktop/share/classes/javax/print/attribute/PrintJobAttributeSet.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/PrintJobAttributeSet.java	Tue Aug 25 12:19:46 2015 -0700
@@ -52,19 +52,19 @@
      *
      * @param  attribute  Attribute value to be added to this attribute set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of
+     * @return  {@code true} if this attribute set changed as a result of
      *          the call, i.e., the given attribute value was not already a
      *          member of this attribute set.
      *
      * @throws  UnmodifiableSetException
      *     (unchecked exception) Thrown if this attribute set does not
-     *     support the <CODE>add()</CODE> operation.
+     *     support the {@code add()} operation.
      * @throws  ClassCastException
-     *     (unchecked exception) Thrown if the <CODE>attribute</CODE> is
+     *     (unchecked exception) Thrown if the {@code attribute} is
      *     not an instance of interface
      *     {@link PrintJobAttribute PrintJobAttribute}.
      * @throws  NullPointerException
-     *    (unchecked exception) Thrown if the <CODE>attribute</CODE> is null.
+     *    (unchecked exception) Thrown if the {@code attribute} is null.
      */
     public boolean add(Attribute attribute);
 
@@ -75,13 +75,13 @@
      * operation had been applied to this attribute set successively with
      * each element from the specified set. If none of the categories in the
      * specified set  are the same as any categories in this attribute set,
-     * the <tt>addAll()</tt> operation effectively modifies this attribute
+     * the {@code addAll()} operation effectively modifies this attribute
      * set so that its value is the <i>union</i> of the two sets.
      * <P>
-     * The behavior of the <CODE>addAll()</CODE> operation is unspecified if
+     * The behavior of the {@code addAll()} operation is unspecified if
      * the specified set is modified while the operation is in progress.
      * <P>
-     * If the <CODE>addAll()</CODE> operation throws an exception, the effect
+     * If the {@code addAll()} operation throws an exception, the effect
      * on this attribute set's state is implementation dependent; elements
      * from the specified set before the point of the exception may or
      * may not have been added to this attribute set.
@@ -89,12 +89,12 @@
      * @param  attributes  whose elements are to be added to this attribute
      *            set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of
+     * @return  {@code true} if this attribute set changed as a result of
      *          the call.
      *
      * @throws  UnmodifiableSetException
      *     (Unchecked exception) Thrown if this attribute set does not
-     *     support the <tt>addAll()</tt> method.
+     *     support the {@code addAll()} method.
      * @throws  ClassCastException
      *     (Unchecked exception) Thrown if some element in the specified
      *     set is not an instance of interface {@link PrintJobAttribute
--- a/jdk/src/java.desktop/share/classes/javax/print/attribute/PrintRequestAttributeSet.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/PrintRequestAttributeSet.java	Tue Aug 25 12:19:46 2015 -0700
@@ -53,19 +53,19 @@
      *
      * @param  attribute  Attribute value to be added to this attribute set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of
+     * @return  {@code true} if this attribute set changed as a result of
      *          the call, i.e., the given attribute value was not already a
      *          member of this attribute set.
      *
      * @throws  UnmodifiableSetException
      *     (unchecked exception) Thrown if this attribute set does not
-     *     support the <CODE>add()</CODE> operation.
+     *     support the {@code add()} operation.
      * @throws  ClassCastException
-     *     (unchecked exception) Thrown if the <CODE>attribute</CODE> is
+     *     (unchecked exception) Thrown if the {@code attribute} is
      *     not an instance of interface
      *     {@link PrintRequestAttribute PrintRequestAttribute}.
      * @throws  NullPointerException
-     *     (unchecked exception) Thrown if the <CODE>attribute</CODE> is null.
+     *     (unchecked exception) Thrown if the {@code attribute} is null.
      */
     public boolean add(Attribute attribute);
 
@@ -76,13 +76,13 @@
      * operation had been applied to this attribute set successively with
      * each element from the specified set. If none of the categories in the
      * specified set  are the same as any categories in this attribute set,
-     * the <tt>addAll()</tt> operation effectively modifies this attribute
+     * the {@code addAll()} operation effectively modifies this attribute
      * set so that its value is the <i>union</i> of the two sets.
      * <P>
-     * The behavior of the <CODE>addAll()</CODE> operation is unspecified if
+     * The behavior of the {@code addAll()} operation is unspecified if
      * the specified set is modified while the operation is in progress.
      * <P>
-     * If the <CODE>addAll()</CODE> operation throws an exception, the effect
+     * If the {@code addAll()} operation throws an exception, the effect
      * on this attribute set's state is implementation dependent; elements
      * from the specified set before the point of the exception may or
      * may not have been added to this attribute set.
@@ -90,12 +90,12 @@
      * @param  attributes  whose elements are to be added to this attribute
      *            set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of
+     * @return  {@code true} if this attribute set changed as a result of
      *          the call.
      *
      * @throws  UnmodifiableSetException
      *     (Unchecked exception) Thrown if this attribute set does not
-     *     support the <tt>addAll()</tt> method.
+     *     support the {@code addAll()} method.
      * @throws  ClassCastException
      *     (Unchecked exception) Thrown if some element in the specified
      *     set is not an instance of interface {@link PrintRequestAttribute
--- a/jdk/src/java.desktop/share/classes/javax/print/attribute/PrintServiceAttributeSet.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/PrintServiceAttributeSet.java	Tue Aug 25 12:19:46 2015 -0700
@@ -57,19 +57,19 @@
      *
      * @param  attribute  Attribute value to be added to this attribute set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of
+     * @return  {@code true} if this attribute set changed as a result of
      *          the call, i.e., the given attribute value was not already a
      *          member of this attribute set.
      *
      * @throws  UnmodifiableSetException
      *     (unchecked exception) Thrown if this attribute set does not
-     *     support the <CODE>add()</CODE> operation.
+     *     support the {@code add()} operation.
      * @throws  ClassCastException
-     *     (unchecked exception) Thrown if the <CODE>attribute</CODE> is
+     *     (unchecked exception) Thrown if the {@code attribute} is
      *     not an instance of interface
      *     {@link PrintServiceAttribute PrintServiceAttribute}.
      * @throws  NullPointerException
-     *    (unchecked exception) Thrown if the <CODE>attribute</CODE> is null.
+     *    (unchecked exception) Thrown if the {@code attribute} is null.
      */
     public boolean add(Attribute attribute);
 
@@ -80,13 +80,13 @@
      * operation had been applied to this attribute set successively with
      * each element from the specified set. If none of the categories in the
      * specified set  are the same as any categories in this attribute set,
-     * the <tt>addAll()</tt> operation effectively modifies this attribute
+     * the {@code addAll()} operation effectively modifies this attribute
      * set so that its value is the <i>union</i> of the two sets.
      * <P>
-     * The behavior of the <CODE>addAll()</CODE> operation is unspecified if
+     * The behavior of the {@code addAll()} operation is unspecified if
      * the specified set is modified while the operation is in progress.
      * <P>
-     * If the <CODE>addAll()</CODE> operation throws an exception, the effect
+     * If the {@code addAll()} operation throws an exception, the effect
      * on this attribute set's state is implementation dependent; elements
      * from the specified set before the point of the exception may or
      * may not have been added to this attribute set.
@@ -94,12 +94,12 @@
      * @param  attributes  whose elements are to be added to this attribute
      *            set.
      *
-     * @return  <tt>true</tt> if this attribute set changed as a result of
+     * @return  {@code true} if this attribute set changed as a result of
      *          the call.
      *
      * @throws  UnmodifiableSetException
      *     (Unchecked exception) Thrown if this attribute set does not
-     *     support the <tt>addAll()</tt> method.
+     *     support the {@code addAll()} method.
      * @throws  ClassCastException
      *     (Unchecked exception) Thrown if some element in the specified
      *     set is not an instance of interface {@link PrintServiceAttribute
--- a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/JobStateReasons.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/JobStateReasons.java	Tue Aug 25 12:19:46 2015 -0700
@@ -59,8 +59,8 @@
  * java.util.Collections}).
  * <P>
  * <B>IPP Compatibility:</B> The string value returned by each individual {@link
- * JobStateReason JobStateReason} object's <CODE>toString()</CODE> method gives
- * the IPP keyword value. The category name returned by <CODE>getName()</CODE>
+ * JobStateReason JobStateReason} object's {@code toString()} method gives
+ * the IPP keyword value. The category name returned by {@code getName()}
  * gives the IPP attribute name.
  *
  * @author  Alan Kaminsky
@@ -114,11 +114,11 @@
      * @param  collection  Collection to copy.
      *
      * @exception  NullPointerException
-     *     (unchecked exception) Thrown if <CODE>collection</CODE> is null or
-     *     if any element in <CODE>collection</CODE> is null.
+     *     (unchecked exception) Thrown if {@code collection} is null or
+     *     if any element in {@code collection} is null.
      * @throws  ClassCastException
      *     (unchecked exception) Thrown if any element in
-     *     <CODE>collection</CODE> is not an instance of class {@link
+     *     {@code collection} is not an instance of class {@link
      *     JobStateReason JobStateReason}.
      */
    public JobStateReasons(Collection<JobStateReason> collection) {
@@ -130,11 +130,11 @@
      * not already present. The element to be added must be an instance of class
      * {@link JobStateReason JobStateReason}. If this job state reasons
      * attribute already contains the specified element, the call leaves this
-     * job state reasons attribute unchanged and returns <tt>false</tt>.
+     * job state reasons attribute unchanged and returns {@code false}.
      *
      * @param  o  Element to be added to this job state reasons attribute.
      *
-     * @return  <tt>true</tt> if this job state reasons attribute did not
+     * @return  {@code true} if this job state reasons attribute did not
      *          already contain the specified element.
      *
      * @throws  NullPointerException
@@ -169,7 +169,7 @@
      * instance.
      * <P>
      * For class JobStateReasons, the category
-     * name is <CODE>"job-state-reasons"</CODE>.
+     * name is {@code "job-state-reasons"}.
      *
      * @return  Attribute category name.
      */
--- a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/PrinterStateReasons.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/PrinterStateReasons.java	Tue Aug 25 12:19:46 2015 -0700
@@ -72,10 +72,10 @@
  * <P>
  * <B>IPP Compatibility:</B> The string values returned by each individual
  * {@link PrinterStateReason PrinterStateReason} object's and the associated
- * {@link Severity Severity} object's <CODE>toString()</CODE> methods,
+ * {@link Severity Severity} object's {@code toString()} methods,
  * concatenated
- * together with a hyphen (<CODE>"-"</CODE>) in between, gives the IPP keyword
- * value. The category name returned by <CODE>getName()</CODE> gives the IPP
+ * together with a hyphen ({@code "-"}) in between, gives the IPP keyword
+ * value. The category name returned by {@code getName()} gives the IPP
  * attribute name.
  *
  * @author  Alan Kaminsky
@@ -133,12 +133,12 @@
      * @param  map  Map to copy.
      *
      * @exception  NullPointerException
-     *     (unchecked exception) Thrown if <CODE>map</CODE> is null or if any
-     *     key or value in <CODE>map</CODE> is null.
+     *     (unchecked exception) Thrown if {@code map} is null or if any
+     *     key or value in {@code map} is null.
      * @throws  ClassCastException
-     *     (unchecked exception) Thrown if any key in <CODE>map</CODE> is not
+     *     (unchecked exception) Thrown if any key in {@code map} is not
      *   an instance of class {@link PrinterStateReason PrinterStateReason} or
-     *     if any value in <CODE>map</CODE> is not an instance of class
+     *     if any value in {@code map} is not an instance of class
      *     {@link Severity Severity}.
      */
     public PrinterStateReasons(Map<PrinterStateReason,Severity> map) {
@@ -159,16 +159,16 @@
      *                      an instance of class {@link Severity Severity}.
      *
      * @return  Previous severity associated with the given printer state
-     *          reason, or <tt>null</tt> if the given printer state reason was
+     *          reason, or {@code null} if the given printer state reason was
      *          not present.
      *
      * @throws  NullPointerException
-     *     (unchecked exception) Thrown if <CODE>reason</CODE> is null or
-     *     <CODE>severity</CODE> is null.
+     *     (unchecked exception) Thrown if {@code reason} is null or
+     *     {@code severity} is null.
      * @throws  ClassCastException
-     *     (unchecked exception) Thrown if <CODE>reason</CODE> is not an
+     *     (unchecked exception) Thrown if {@code reason} is not an
      *   instance of class {@link PrinterStateReason PrinterStateReason} or if
-     *     <CODE>severity</CODE> is not an instance of class {@link Severity
+     *     {@code severity} is not an instance of class {@link Severity
      *     Severity}.
      * @since 1.5
      */
@@ -201,7 +201,7 @@
      * instance.
      * <P>
      * For class PrinterStateReasons, the
-     * category name is <CODE>"printer-state-reasons"</CODE>.
+     * category name is {@code "printer-state-reasons"}.
      *
      * @return  Attribute category name.
      */
@@ -228,7 +228,7 @@
      *          Severity} level.
      *
      * @exception  NullPointerException
-     *     (unchecked exception) Thrown if <CODE>severity</CODE> is null.
+     *     (unchecked exception) Thrown if {@code severity} is null.
      */
     public Set<PrinterStateReason> printerStateReasonSet(Severity severity) {
         if (severity == null) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/BoxLayout.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/BoxLayout.java	Tue Aug 25 12:19:46 2015 -0700
@@ -54,28 +54,28 @@
  * <p> The BoxLayout manager is constructed with an axis parameter that
  * specifies the type of layout that will be done. There are four choices:
  *
- * <blockquote><b><tt>X_AXIS</tt></b> - Components are laid out horizontally
+ * <blockquote><b>{@code X_AXIS}</b> - Components are laid out horizontally
  * from left to right.</blockquote>
  *
- * <blockquote><b><tt>Y_AXIS</tt></b> - Components are laid out vertically
+ * <blockquote><b>{@code Y_AXIS}</b> - Components are laid out vertically
  * from top to bottom.</blockquote>
  *
- * <blockquote><b><tt>LINE_AXIS</tt></b> - Components are laid out the way
+ * <blockquote><b>{@code LINE_AXIS}</b> - Components are laid out the way
  * words are laid out in a line, based on the container's
- * <tt>ComponentOrientation</tt> property. If the container's
- * <tt>ComponentOrientation</tt> is horizontal then components are laid out
+ * {@code ComponentOrientation} property. If the container's
+ * {@code ComponentOrientation} is horizontal then components are laid out
  * horizontally, otherwise they are laid out vertically.  For horizontal
- * orientations, if the container's <tt>ComponentOrientation</tt> is left to
+ * orientations, if the container's {@code ComponentOrientation} is left to
  * right then components are laid out left to right, otherwise they are laid
  * out right to left. For vertical orientations components are always laid out
  * from top to bottom.</blockquote>
  *
- * <blockquote><b><tt>PAGE_AXIS</tt></b> - Components are laid out the way
+ * <blockquote><b>{@code PAGE_AXIS}</b> - Components are laid out the way
  * text lines are laid out on a page, based on the container's
- * <tt>ComponentOrientation</tt> property. If the container's
- * <tt>ComponentOrientation</tt> is horizontal then components are laid out
+ * {@code ComponentOrientation} property. If the container's
+ * {@code ComponentOrientation} is horizontal then components are laid out
  * vertically, otherwise they are laid out horizontally.  For horizontal
- * orientations, if the container's <tt>ComponentOrientation</tt> is left to
+ * orientations, if the container's {@code ComponentOrientation} is left to
  * right then components are laid out left to right, otherwise they are laid
  * out right to left.&nbsp; For vertical orientations components are always
  * laid out from top to bottom.</blockquote>
@@ -102,10 +102,10 @@
  * BoxLayout attempts to make all components in the column
  * as wide as the widest component.
  * If that fails, it aligns them horizontally
- * according to their X alignments.  For <code>PAGE_AXIS</code> layout,
+ * according to their X alignments.  For {@code PAGE_AXIS} layout,
  * horizontal alignment is done based on the leading edge of the component.
  * In other words, an X alignment value of 0.0 means the left edge of a
- * component if the container's <code>ComponentOrientation</code> is left to
+ * component if the container's {@code ComponentOrientation} is left to
  * right and it means the right edge of the component otherwise.
  * <p>
  * Instead of using BoxLayout directly, many programs use the Box class.
@@ -125,7 +125,7 @@
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
  * of all JavaBeans&trade;
- * has been added to the <code>java.beans</code> package.
+ * has been added to the {@code java.beans} package.
  * Please see {@link java.beans.XMLEncoder}.
  *
  * @see Box
@@ -152,14 +152,14 @@
     /**
      * Specifies that components should be laid out in the direction of
      * a line of text as determined by the target container's
-     * <code>ComponentOrientation</code> property.
+     * {@code ComponentOrientation} property.
      */
     public static final int LINE_AXIS = 2;
 
     /**
      * Specifies that components should be laid out in the direction that
      * lines flow across a page as determined by the target container's
-     * <code>ComponentOrientation</code> property.
+     * {@code ComponentOrientation} property.
      */
     public static final int PAGE_AXIS = 3;
 
@@ -169,12 +169,10 @@
      *
      * @param target  the container that needs to be laid out
      * @param axis  the axis to lay out components along. Can be one of:
-     *              <code>BoxLayout.X_AXIS</code>,
-     *              <code>BoxLayout.Y_AXIS</code>,
-     *              <code>BoxLayout.LINE_AXIS</code> or
-     *              <code>BoxLayout.PAGE_AXIS</code>
+     *              {@code BoxLayout.X_AXIS, BoxLayout.Y_AXIS,
+     *              BoxLayout.LINE_AXIS} or {@code BoxLayout.PAGE_AXIS}
      *
-     * @exception AWTError  if the value of <code>axis</code> is invalid
+     * @exception AWTError  if the value of {@code axis} is invalid
      */
     @ConstructorProperties({"target", "axis"})
     public BoxLayout(Container target, int axis) {
@@ -192,10 +190,8 @@
      *
      * @param target  the container that needs to be laid out
      * @param axis  the axis to lay out components along. Can be one of:
-     *              <code>BoxLayout.X_AXIS</code>,
-     *              <code>BoxLayout.Y_AXIS</code>,
-     *              <code>BoxLayout.LINE_AXIS</code> or
-     *              <code>BoxLayout.PAGE_AXIS</code>
+     *              {@code BoxLayout.X_AXIS, BoxLayout.Y_AXIS,
+     *              BoxLayout.LINE_AXIS} or {@code BoxLayout.PAGE_AXIS}
      *
      * @param dbg  the stream to which debugging messages should be sent,
      *   null if none
@@ -219,10 +215,8 @@
     /**
      * Returns the axis that was used to lay out components.
      * Returns one of:
-     * <code>BoxLayout.X_AXIS</code>,
-     * <code>BoxLayout.Y_AXIS</code>,
-     * <code>BoxLayout.LINE_AXIS</code> or
-     * <code>BoxLayout.PAGE_AXIS</code>
+     * {@code BoxLayout.X_AXIS, BoxLayout.Y_AXIS,
+     * BoxLayout.LINE_AXIS} or {@code BoxLayout.PAGE_AXIS}
      *
      * @return the axis that was used to lay out components
      *
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/MutableAttributeSet.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/MutableAttributeSet.java	Tue Aug 25 12:19:46 2015 -0700
@@ -30,8 +30,8 @@
  * A generic interface for a mutable collection of unique attributes.
  *
  * Implementations will probably want to provide a constructor of the
- * form:<tt>
- * public XXXAttributeSet(ConstAttributeSet source);</tt>
+ * form: <pre>{@code
+ * public XXXAttributeSet(ConstAttributeSet source);}</pre>
  *
  */
 public interface MutableAttributeSet extends AttributeSet {
@@ -55,21 +55,21 @@
     public void addAttributes(AttributeSet attributes);
 
     /**
-     * Removes an attribute with the given <code>name</code>.
+     * Removes an attribute with the given {@code name}.
      *
      * @param name the attribute name
      */
     public void removeAttribute(Object name);
 
     /**
-     * Removes an attribute set with the given <code>names</code>.
+     * Removes an attribute set with the given {@code names}.
      *
      * @param names the set of names
      */
     public void removeAttributes(Enumeration<?> names);
 
     /**
-     * Removes a set of attributes with the given <code>name</code>.
+     * Removes a set of attributes with the given {@code name}.
      *
      * @param attributes the set of attributes
      */
--- a/jdk/src/java.desktop/share/classes/sun/awt/DebugSettings.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/sun/awt/DebugSettings.java	Tue Aug 25 12:19:46 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, 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
@@ -71,7 +71,7 @@
  * are read the same way as described above (as before
  * the fix for 4638447).
  */
-final class DebugSettings {
+public final class DebugSettings {
     private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.debug.DebugSettings");
 
     /* standard debug property key names */
@@ -87,28 +87,21 @@
     };
 
     /* global instance of the settings object */
-    private static DebugSettings instance = null;
+    private static final DebugSettings instance = new DebugSettings();
 
-    private Properties props = new Properties();
+    private final Properties props = new Properties();
 
-    static void init() {
-        if (instance != null) {
+    static synchronized void init() {
+        if (!instance.props.isEmpty()) {
             return;
         }
-
         NativeLibLoader.loadLibraries();
-        instance = new DebugSettings();
+        instance.loadProperties();
         instance.loadNativeSettings();
     }
 
-    private DebugSettings() {
-        java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
-                public Void run() {
-                    loadProperties();
-                    return null;
-                }
-            });
+    public static DebugSettings getInstance() {
+        return instance;
     }
 
     /*
--- a/jdk/src/java.desktop/share/classes/sun/awt/util/IdentityArrayList.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/sun/awt/util/IdentityArrayList.java	Tue Aug 25 12:19:46 2015 -0700
@@ -33,33 +33,33 @@
 import java.util.RandomAccess;
 
 /**
- * Resizable-array implementation of the <tt>List</tt> interface.  Implements
+ * Resizable-array implementation of the {@code List} interface.  Implements
  * all optional list operations, and permits all elements, including
- * <tt>null</tt>.  In addition to implementing the <tt>List</tt> interface,
+ * {@code null}.  In addition to implementing the {@code List} interface,
  * this class provides methods to manipulate the size of the array that is
  * used internally to store the list.  (This class is roughly equivalent to
- * <tt>Vector</tt>, except that it is unsynchronized.)<p>
+ * {@code Vector}, except that it is unsynchronized.)<p>
  *
- * The <tt>size</tt>, <tt>isEmpty</tt>, <tt>get</tt>, <tt>set</tt>,
- * <tt>iterator</tt>, and <tt>listIterator</tt> operations run in constant
- * time.  The <tt>add</tt> operation runs in <i>amortized constant time</i>,
+ * The {@code size}, {@code isEmpty}, {@code get}, {@code set},
+ * {@code iterator}, and {@code listIterator} operations run in constant
+ * time.  The {@code add} operation runs in <i>amortized constant time</i>,
  * that is, adding n elements requires O(n) time.  All of the other operations
  * run in linear time (roughly speaking).  The constant factor is low compared
- * to that for the <tt>LinkedList</tt> implementation.<p>
+ * to that for the {@code LinkedList} implementation.<p>
  *
- * Each <tt>IdentityArrayList</tt> instance has a <i>capacity</i>.  The capacity is
+ * Each {@code IdentityArrayList} instance has a <i>capacity</i>.  The capacity is
  * the size of the array used to store the elements in the list.  It is always
  * at least as large as the list size.  As elements are added to an IdentityArrayList,
  * its capacity grows automatically.  The details of the growth policy are not
  * specified beyond the fact that adding an element has constant amortized
  * time cost.<p>
  *
- * An application can increase the capacity of an <tt>IdentityArrayList</tt> instance
- * before adding a large number of elements using the <tt>ensureCapacity</tt>
+ * An application can increase the capacity of an {@code IdentityArrayList} instance
+ * before adding a large number of elements using the {@code ensureCapacity}
  * operation.  This may reduce the amount of incremental reallocation.
  *
  * <p><strong>Note that this implementation is not synchronized.</strong>
- * If multiple threads access an <tt>IdentityArrayList</tt> instance concurrently,
+ * If multiple threads access an {@code IdentityArrayList} instance concurrently,
  * and at least one of the threads modifies the list structurally, it
  * <i>must</i> be synchronized externally.  (A structural modification is
  * any operation that adds or deletes one or more elements, or explicitly
@@ -73,10 +73,10 @@
  * unsynchronized access to the list:<pre>
  *   List list = Collections.synchronizedList(new IdentityArrayList(...));</pre>
  *
- * <p>The iterators returned by this class's <tt>iterator</tt> and
- * <tt>listIterator</tt> methods are <i>fail-fast</i>: if the list is
+ * <p>The iterators returned by this class's {@code iterator} and
+ * {@code listIterator} methods are <i>fail-fast</i>: if the list is
  * structurally modified at any time after the iterator is created, in any way
- * except through the iterator's own <tt>remove</tt> or <tt>add</tt> methods,
+ * except through the iterator's own {@code remove} or {@code add} methods,
  * the iterator will throw a {@link ConcurrentModificationException}.  Thus, in
  * the face of concurrent modification, the iterator fails quickly and cleanly,
  * rather than risking arbitrary, non-deterministic behavior at an undetermined
@@ -85,7 +85,7 @@
  * Note that the fail-fast behavior of an iterator cannot be guaranteed
  * as it is, generally speaking, impossible to make any hard guarantees in the
  * presence of unsynchronized concurrent modification.  Fail-fast iterators
- * throw <tt>ConcurrentModificationException</tt> on a best-effort basis.
+ * throw {@code ConcurrentModificationException} on a best-effort basis.
  * Therefore, it would be wrong to write a program that depended on this
  * exception for its correctness: <i>the fail-fast behavior of iterators
  * should be used only to detect bugs.</i><p>
@@ -149,9 +149,9 @@
     }
 
     /**
-     * Trims the capacity of this <tt>IdentityArrayList</tt> instance to be the
+     * Trims the capacity of this {@code IdentityArrayList} instance to be the
      * list's current size.  An application can use this operation to minimize
-     * the storage of an <tt>IdentityArrayList</tt> instance.
+     * the storage of an {@code IdentityArrayList} instance.
      */
     public void trimToSize() {
         modCount++;
@@ -162,7 +162,7 @@
     }
 
     /**
-     * Increases the capacity of this <tt>IdentityArrayList</tt> instance, if
+     * Increases the capacity of this {@code IdentityArrayList} instance, if
      * necessary, to ensure that it can hold at least the number of elements
      * specified by the minimum capacity argument.
      *
@@ -191,22 +191,22 @@
     }
 
     /**
-     * Returns <tt>true</tt> if this list contains no elements.
+     * Returns {@code true} if this list contains no elements.
      *
-     * @return <tt>true</tt> if this list contains no elements
+     * @return {@code true} if this list contains no elements
      */
     public boolean isEmpty() {
         return size == 0;
     }
 
     /**
-     * Returns <tt>true</tt> if this list contains the specified element.
-     * More formally, returns <tt>true</tt> if and only if this list contains
-     * at least one element <tt>e</tt> such that
-     * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o == e)</tt>.
+     * Returns {@code true} if this list contains the specified element.
+     * More formally, returns {@code true} if and only if this list contains
+     * at least one element {@code e} such that
+     * {@code Objects.equals(o, e)}.
      *
      * @param o element whose presence in this list is to be tested
-     * @return <tt>true</tt> if this list contains the specified element
+     * @return {@code true} if this list contains the specified element
      */
     public boolean contains(Object o) {
         return indexOf(o) >= 0;
@@ -215,8 +215,8 @@
     /**
      * Returns the index of the first occurrence of the specified element
      * in this list, or -1 if this list does not contain the element.
-     * More formally, returns the lowest index <tt>i</tt> such that
-     * <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o == get(i))</tt>,
+     * More formally, returns the lowest index {@code i} such that
+     * {@code Objects.equals(o, get(i))},
      * or -1 if there is no such index.
      */
     public int indexOf(Object o) {
@@ -231,8 +231,8 @@
     /**
      * Returns the index of the last occurrence of the specified element
      * in this list, or -1 if this list does not contain the element.
-     * More formally, returns the highest index <tt>i</tt> such that
-     * <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o == get(i))</tt>,
+     * More formally, returns the highest index {@code i} such that
+     * {@code Objects.equals(o, get(i))},
      * or -1 if there is no such index.
      */
     public int lastIndexOf(Object o) {
@@ -273,7 +273,7 @@
      * <p>If the list fits in the specified array with room to spare
      * (i.e., the array has more elements than the list), the element in
      * the array immediately following the end of the collection is set to
-     * <tt>null</tt>.  (This is useful in determining the length of the
+     * {@code null}.  (This is useful in determining the length of the
      * list <i>only</i> if the caller knows that the list does not contain
      * any null elements.)
      *
@@ -336,7 +336,7 @@
      * Appends the specified element to the end of this list.
      *
      * @param e element to be appended to this list
-     * @return <tt>true</tt> (as specified by {@link Collection#add})
+     * @return {@code true} (as specified by {@link Collection#add})
      */
     public boolean add(E e) {
         ensureCapacity(size + 1);  // Increments modCount!!
@@ -392,14 +392,13 @@
      * Removes the first occurrence of the specified element from this list,
      * if it is present.  If the list does not contain the element, it is
      * unchanged.  More formally, removes the element with the lowest index
-     * <tt>i</tt> such that
-     * <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o == get(i))</tt>
-     * (if such an element exists).  Returns <tt>true</tt> if this list
+     * {@code i} such that {@code Objects.equals(o, get(i))}
+     * (if such an element exists).  Returns {@code true} if this list
      * contained the specified element (or equivalently, if this list
      * changed as a result of the call).
      *
      * @param o element to be removed from this list, if present
-     * @return <tt>true</tt> if this list contained the specified element
+     * @return {@code true} if this list contained the specified element
      */
     public boolean remove(Object o) {
         for (int index = 0; index < size; index++) {
@@ -448,7 +447,7 @@
      * list is nonempty.)
      *
      * @param c collection containing elements to be added to this list
-     * @return <tt>true</tt> if this list changed as a result of the call
+     * @return {@code true} if this list changed as a result of the call
      * @throws NullPointerException if the specified collection is null
      */
     public boolean addAll(Collection<? extends E> c) {
@@ -471,7 +470,7 @@
      * @param index index at which to insert the first element from the
      *              specified collection
      * @param c collection containing elements to be added to this list
-     * @return <tt>true</tt> if this list changed as a result of the call
+     * @return {@code true} if this list changed as a result of the call
      * @throws IndexOutOfBoundsException {@inheritDoc}
      * @throws NullPointerException if the specified collection is null
      */
@@ -494,10 +493,10 @@
 
     /**
      * Removes from this list all of the elements whose index is between
-     * <tt>fromIndex</tt>, inclusive, and <tt>toIndex</tt>, exclusive.
+     * {@code fromIndex}, inclusive, and {@code toIndex}, exclusive.
      * Shifts any succeeding elements to the left (reduces their index).
-     * This call shortens the list by <tt>(toIndex - fromIndex)</tt> elements.
-     * (If <tt>toIndex==fromIndex</tt>, this operation has no effect.)
+     * This call shortens the list by {@code (toIndex - fromIndex)} elements.
+     * (If {@code toIndex==fromIndex}, this operation has no effect.)
      *
      * @param fromIndex index of first element to be removed
      * @param toIndex index after last element to be removed
--- a/jdk/src/java.desktop/share/classes/sun/awt/util/IdentityLinkedList.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/sun/awt/util/IdentityLinkedList.java	Tue Aug 25 12:19:46 2015 -0700
@@ -35,18 +35,18 @@
 import java.util.NoSuchElementException;
 
 /**
- * Linked list implementation of the <tt>List</tt> interface.  Implements all
+ * Linked list implementation of the {@code List} interface.  Implements all
  * optional list operations, and permits all elements (including
- * <tt>null</tt>).  In addition to implementing the <tt>List</tt> interface,
- * the <tt>IdentityLinkedList</tt> class provides uniformly named methods to
- * <tt>get</tt>, <tt>remove</tt> and <tt>insert</tt> an element at the
+ * {@code null}).  In addition to implementing the {@code List} interface,
+ * the {@code IdentityLinkedList} class provides uniformly named methods to
+ * {@code get}, {@code remove} and {@code insert} an element at the
  * beginning and end of the list.  These operations allow linked lists to be
  * used as a stack, {@linkplain java.util.Queue queue}, or {@linkplain Deque
  * double-ended queue}. <p>
  *
- * The class implements the <tt>Deque</tt> interface, providing
- * first-in-first-out queue operations for <tt>add</tt>,
- * <tt>poll</tt>, along with other stack and deque operations.<p>
+ * The class implements the {@code Deque} interface, providing
+ * first-in-first-out queue operations for {@code add},
+ * {@code poll}, along with other stack and deque operations.<p>
  *
  * All of the operations perform as could be expected for a doubly-linked
  * list.  Operations that index into the list will traverse the list from
@@ -67,11 +67,11 @@
  * unsynchronized access to the list:<pre>
  *   List list = Collections.synchronizedList(new IdentityLinkedList(...));</pre>
  *
- * <p>The iterators returned by this class's <tt>iterator</tt> and
- * <tt>listIterator</tt> methods are <i>fail-fast</i>: if the list is
+ * <p>The iterators returned by this class's {@code iterator} and
+ * {@code listIterator} methods are <i>fail-fast</i>: if the list is
  * structurally modified at any time after the iterator is created, in
- * any way except through the Iterator's own <tt>remove</tt> or
- * <tt>add</tt> methods, the iterator will throw a {@link
+ * any way except through the Iterator's own {@code remove} or
+ * {@code add} methods, the iterator will throw a {@link
  * ConcurrentModificationException}.  Thus, in the face of concurrent
  * modification, the iterator fails quickly and cleanly, rather than
  * risking arbitrary, non-deterministic behavior at an undetermined
@@ -80,7 +80,7 @@
  * <p>Note that the fail-fast behavior of an iterator cannot be guaranteed
  * as it is, generally speaking, impossible to make any hard guarantees in the
  * presence of unsynchronized concurrent modification.  Fail-fast iterators
- * throw <tt>ConcurrentModificationException</tt> on a best-effort basis.
+ * throw {@code ConcurrentModificationException} on a best-effort basis.
  * Therefore, it would be wrong to write a program that depended on this
  * exception for its correctness:   <i>the fail-fast behavior of iterators
  * should be used only to detect bugs.</i>
@@ -180,13 +180,13 @@
     }
 
     /**
-     * Returns <tt>true</tt> if this list contains the specified element.
-     * More formally, returns <tt>true</tt> if and only if this list contains
-     * at least one element <tt>e</tt> such that
-     * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o == e)</tt>.
+     * Returns {@code true} if this list contains the specified element.
+     * More formally, returns {@code true} if and only if this list contains
+     * at least one element {@code e} such that
+     * {@code Objects.equals(o, e)}.
      *
      * @param o element whose presence in this list is to be tested
-     * @return <tt>true</tt> if this list contains the specified element
+     * @return {@code true} if this list contains the specified element
      */
     public boolean contains(Object o) {
         return indexOf(o) != -1;
@@ -207,7 +207,7 @@
      * <p>This method is equivalent to {@link #addLast}.
      *
      * @param e element to be appended to this list
-     * @return <tt>true</tt> (as specified by {@link Collection#add})
+     * @return {@code true} (as specified by {@link Collection#add})
      */
     public boolean add(E e) {
         addBefore(e, header);
@@ -218,13 +218,13 @@
      * Removes the first occurrence of the specified element from this list,
      * if it is present.  If this list does not contain the element, it is
      * unchanged.  More formally, removes the element with the lowest index
-     * <tt>i</tt> such that <tt>get(i)==o</tt>
-     * (if such an element exists).  Returns <tt>true</tt> if this list
+     * {@code i} such that {@code get(i)==o}
+     * (if such an element exists).  Returns {@code true} if this list
      * contained the specified element (or equivalently, if this list
      * changed as a result of the call).
      *
      * @param o element to be removed from this list, if present
-     * @return <tt>true</tt> if this list contained the specified element
+     * @return {@code true} if this list contained the specified element
      */
     public boolean remove(Object o) {
         for (Entry<E> e = header.next; e != header; e = e.next) {
@@ -245,7 +245,7 @@
      * this list, and it's nonempty.)
      *
      * @param c collection containing elements to be added to this list
-     * @return <tt>true</tt> if this list changed as a result of the call
+     * @return {@code true} if this list changed as a result of the call
      * @throws NullPointerException if the specified collection is null
      */
     public boolean addAll(Collection<? extends E> c) {
@@ -263,7 +263,7 @@
      * @param index index at which to insert the first element
      *              from the specified collection
      * @param c collection containing elements to be added to this list
-     * @return <tt>true</tt> if this list changed as a result of the call
+     * @return {@code true} if this list changed as a result of the call
      * @throws IndexOutOfBoundsException {@inheritDoc}
      * @throws NullPointerException if the specified collection is null
      */
@@ -388,8 +388,8 @@
     /**
      * Returns the index of the first occurrence of the specified element
      * in this list, or -1 if this list does not contain the element.
-     * More formally, returns the lowest index <tt>i</tt> such that
-     * <tt>get(i)==o</tt>,
+     * More formally, returns the lowest index {@code i} such that
+     * {@code get(i)==o},
      * or -1 if there is no such index.
      *
      * @param o element to search for
@@ -410,8 +410,8 @@
     /**
      * Returns the index of the last occurrence of the specified element
      * in this list, or -1 if this list does not contain the element.
-     * More formally, returns the highest index <tt>i</tt> such that
-     * <tt>get(i)==o</tt>,
+     * More formally, returns the highest index {@code i} such that
+     * {@code get(i)==o},
      * or -1 if there is no such index.
      *
      * @param o element to search for
@@ -433,7 +433,7 @@
 
     /**
      * Retrieves, but does not remove, the head (first element) of this list.
-     * @return the head of this list, or <tt>null</tt> if this list is empty
+     * @return the head of this list, or {@code null} if this list is empty
      * @since 1.5
      */
     public E peek() {
@@ -454,7 +454,7 @@
 
     /**
      * Retrieves and removes the head (first element) of this list
-     * @return the head of this list, or <tt>null</tt> if this list is empty
+     * @return the head of this list, or {@code null} if this list is empty
      * @since 1.5
      */
     public E poll() {
@@ -478,7 +478,7 @@
      * Adds the specified element as the tail (last element) of this list.
      *
      * @param e the element to add
-     * @return <tt>true</tt> (as specified by {@link java.util.Queue#offer})
+     * @return {@code true} (as specified by {@link java.util.Queue#offer})
      * @since 1.5
      */
     public boolean offer(E e) {
@@ -490,7 +490,7 @@
      * Inserts the specified element at the front of this list.
      *
      * @param e the element to insert
-     * @return <tt>true</tt> (as specified by {@link Deque#offerFirst})
+     * @return {@code true} (as specified by {@link Deque#offerFirst})
      * @since 1.6
      */
     public boolean offerFirst(E e) {
@@ -502,7 +502,7 @@
      * Inserts the specified element at the end of this list.
      *
      * @param e the element to insert
-     * @return <tt>true</tt> (as specified by {@link Deque#offerLast})
+     * @return {@code true} (as specified by {@link Deque#offerLast})
      * @since 1.6
      */
     public boolean offerLast(E e) {
@@ -512,9 +512,9 @@
 
     /**
      * Retrieves, but does not remove, the first element of this list,
-     * or returns <tt>null</tt> if this list is empty.
+     * or returns {@code null} if this list is empty.
      *
-     * @return the first element of this list, or <tt>null</tt>
+     * @return the first element of this list, or {@code null}
      *         if this list is empty
      * @since 1.6
      */
@@ -526,9 +526,9 @@
 
     /**
      * Retrieves, but does not remove, the last element of this list,
-     * or returns <tt>null</tt> if this list is empty.
+     * or returns {@code null} if this list is empty.
      *
-     * @return the last element of this list, or <tt>null</tt>
+     * @return the last element of this list, or {@code null}
      *         if this list is empty
      * @since 1.6
      */
@@ -540,9 +540,9 @@
 
     /**
      * Retrieves and removes the first element of this list,
-     * or returns <tt>null</tt> if this list is empty.
+     * or returns {@code null} if this list is empty.
      *
-     * @return the first element of this list, or <tt>null</tt> if
+     * @return the first element of this list, or {@code null} if
      *     this list is empty
      * @since 1.6
      */
@@ -554,9 +554,9 @@
 
     /**
      * Retrieves and removes the last element of this list,
-     * or returns <tt>null</tt> if this list is empty.
+     * or returns {@code null} if this list is empty.
      *
-     * @return the last element of this list, or <tt>null</tt> if
+     * @return the last element of this list, or {@code null} if
      *     this list is empty
      * @since 1.6
      */
@@ -600,7 +600,7 @@
      * does not contain the element, it is unchanged.
      *
      * @param o element to be removed from this list, if present
-     * @return <tt>true</tt> if the list contained the specified element
+     * @return {@code true} if the list contained the specified element
      * @since 1.6
      */
     public boolean removeFirstOccurrence(Object o) {
@@ -613,7 +613,7 @@
      * does not contain the element, it is unchanged.
      *
      * @param o element to be removed from this list, if present
-     * @return <tt>true</tt> if the list contained the specified element
+     * @return {@code true} if the list contained the specified element
      * @since 1.6
      */
     public boolean removeLastOccurrence(Object o) {
@@ -629,19 +629,19 @@
     /**
      * Returns a list-iterator of the elements in this list (in proper
      * sequence), starting at the specified position in the list.
-     * Obeys the general contract of <tt>List.listIterator(int)</tt>.<p>
+     * Obeys the general contract of {@code List.listIterator(int)}.<p>
      *
      * The list-iterator is <i>fail-fast</i>: if the list is structurally
      * modified at any time after the Iterator is created, in any way except
-     * through the list-iterator's own <tt>remove</tt> or <tt>add</tt>
+     * through the list-iterator's own {@code remove} or {@code add}
      * methods, the list-iterator will throw a
-     * <tt>ConcurrentModificationException</tt>.  Thus, in the face of
+     * {@code ConcurrentModificationException}.  Thus, in the face of
      * concurrent modification, the iterator fails quickly and cleanly, rather
      * than risking arbitrary, non-deterministic behavior at an undetermined
      * time in the future.
      *
      * @param index index of the first element to be returned from the
-     *              list-iterator (by a call to <tt>next</tt>)
+     *              list-iterator (by a call to {@code next})
      * @return a ListIterator of the elements in this list (in proper
      *         sequence), starting at the specified position in the list
      * @throws IndexOutOfBoundsException {@inheritDoc}
@@ -834,7 +834,7 @@
      *
      * <p>If the list fits in the specified array with room to spare (i.e.,
      * the array has more elements than the list), the element in the array
-     * immediately following the end of the list is set to <tt>null</tt>.
+     * immediately following the end of the list is set to {@code null}.
      * (This is useful in determining the length of the list <i>only</i> if
      * the caller knows that the list does not contain any null elements.)
      *
@@ -843,15 +843,15 @@
      * precise control over the runtime type of the output array, and may,
      * under certain circumstances, be used to save allocation costs.
      *
-     * <p>Suppose <tt>x</tt> is a list known to contain only strings.
+     * <p>Suppose {@code x} is a list known to contain only strings.
      * The following code can be used to dump the list into a newly
-     * allocated array of <tt>String</tt>:
+     * allocated array of {@code String}:
      *
      * <pre>
      *     String[] y = x.toArray(new String[0]);</pre>
      *
-     * Note that <tt>toArray(new Object[0])</tt> is identical in function to
-     * <tt>toArray()</tt>.
+     * Note that {@code toArray(new Object[0])} is identical in function to
+     * {@code toArray()}.
      *
      * @param a the array into which the elements of the list are to
      *          be stored, if it is big enough; otherwise, a new array of the
--- a/jdk/src/java.desktop/share/classes/sun/font/CompositeFont.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/sun/font/CompositeFont.java	Tue Aug 25 12:19:46 2015 -0700
@@ -71,6 +71,13 @@
         } else {
             numSlots = componentNames.length;
         }
+        /* We will limit the number of slots to 254.
+         * We store the slot for a glyph id in a byte and we may use one slot
+         * for an EUDC font, and we may also create a composite
+         * using this composite as a backup for a physical font.
+         * So we want to leave space for the two additional slots.
+         */
+         numSlots = (numSlots <= 254) ? numSlots : 254;
 
         /* Only the first "numMetricsSlots" slots are used for font metrics.
          * the rest are considered "fallback" slots".
--- a/jdk/src/java.desktop/share/classes/sun/font/FileFontStrike.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/sun/font/FileFontStrike.java	Tue Aug 25 12:19:46 2015 -0700
@@ -420,14 +420,13 @@
 
     /* The following method is called from CompositeStrike as a special case.
      */
-    private static final int SLOTZEROMAX = 0xffffff;
     int getSlot0GlyphImagePtrs(int[] glyphCodes, long[] images, int len) {
 
         int convertedCnt = 0;
 
         for (int i=0; i<len; i++) {
             int glyphCode = glyphCodes[i];
-            if (glyphCode >= SLOTZEROMAX) {
+            if (glyphCode >>> 24 != 0) {
                 return convertedCnt;
             } else {
                 convertedCnt++;
--- a/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java	Tue Aug 25 12:19:46 2015 -0700
@@ -72,7 +72,7 @@
  */
 public class SwingUtilities2 {
     /**
-     * The <code>AppContext</code> key for our one <code>LAFState</code>
+     * The {@code AppContext} key for our one {@code LAFState}
      * instance.
      */
     public static final Object LAF_STATE_KEY =
@@ -180,7 +180,7 @@
 
     /**
      * Key used in client properties used to indicate that the
-     * <code>ComponentUI</code> of the JComponent instance should be returned.
+     * {@code ComponentUI} of the JComponent instance should be returned.
      */
     public static final Object COMPONENT_UI_PROPERTY_KEY =
                             new StringBuffer("ComponentUIPropertyKey");
@@ -221,8 +221,8 @@
      * @param text characters to be tested
      * @param start start
      * @param limit limit
-     * @return <tt>true</tt>  if TextLayout is required
-     *         <tt>false</tt> if TextLayout is not required
+     * @return {@code true}  if TextLayout is required
+     *         {@code false} if TextLayout is not required
      */
     public static final boolean isComplexLayout(char[] text, int start, int limit) {
         return FontUtilities.isComplexText(text, start, limit);
@@ -374,7 +374,7 @@
 
     /**
      * Returns the width of the passed in String.
-     * If the passed String is <code>null</code>, returns zero.
+     * If the passed String is {@code null}, returns zero.
      *
      * @param c JComponent that will display the string, may be null
      * @param fm FontMetrics used to measure the String width
@@ -761,7 +761,7 @@
 
     /**
      * Request focus on the given component if it doesn't already have it
-     * and <code>isRequestFocusEnabled()</code> returns true.
+     * and {@code isRequestFocusEnabled()} returns true.
      */
     public static void adjustFocus(JComponent c) {
         if (!c.hasFocus() && c.isRequestFocusEnabled()) {
@@ -1200,9 +1200,9 @@
 
     /**
      * LSBCacheEntry is used to cache the left side bearing (lsb) for
-     * a particular <code>Font</code> and <code>FontRenderContext</code>.
+     * a particular {@code Font} and {@code FontRenderContext}.
      * This only caches characters that fall in the range
-     * <code>MIN_CHAR_INDEX</code> to <code>MAX_CHAR_INDEX</code>.
+     * {@code MIN_CHAR_INDEX} to {@code MAX_CHAR_INDEX}.
      */
     private static class LSBCacheEntry {
         // Used to indicate a particular entry in lsb has not been set.
@@ -1472,20 +1472,20 @@
     }
 
     /**
-     * Utility method that creates a <code>UIDefaults.LazyValue</code> that
-     * creates an <code>ImageIcon</code> <code>UIResource</code> for the
+     * Utility method that creates a {@code UIDefaults.LazyValue} that
+     * creates an {@code ImageIcon} {@code UIResource} for the
      * specified image file name. The image is loaded using
-     * <code>getResourceAsStream</code>, starting with a call to that method
+     * {@code getResourceAsStream}, starting with a call to that method
      * on the base class parameter. If it cannot be found, searching will
      * continue through the base class' inheritance hierarchy, up to and
-     * including <code>rootClass</code>.
+     * including {@code rootClass}.
      *
      * @param baseClass the first class to use in searching for the resource
-     * @param rootClass an ancestor of <code>baseClass</code> to finish the
+     * @param rootClass an ancestor of {@code baseClass} to finish the
      *                  search at
      * @param imageFile the name of the file to be found
-     * @return a lazy value that creates the <code>ImageIcon</code>
-     *         <code>UIResource</code> for the image,
+     * @return a lazy value that creates the {@code ImageIcon}
+     *         {@code UIResource} for the image,
      *         or null if it cannot be found
      */
     public static Object makeIcon(final Class<?> baseClass,
@@ -1495,22 +1495,22 @@
     }
 
     /**
-     * Utility method that creates a <code>UIDefaults.LazyValue</code> that
-     * creates an <code>ImageIcon</code> <code>UIResource</code> for the
+     * Utility method that creates a {@code UIDefaults.LazyValue} that
+     * creates an {@code ImageIcon} {@code UIResource} for the
      * specified image file name. The image is loaded using
-     * <code>getResourceAsStream</code>, starting with a call to that method
+     * {@code getResourceAsStream}, starting with a call to that method
      * on the base class parameter. If it cannot be found, searching will
      * continue through the base class' inheritance hierarchy, up to and
-     * including <code>rootClass</code>.
+     * including {@code rootClass}.
      *
      * Finds an image with a given name without privileges enabled.
      *
      * @param baseClass the first class to use in searching for the resource
-     * @param rootClass an ancestor of <code>baseClass</code> to finish the
+     * @param rootClass an ancestor of {@code baseClass} to finish the
      *                  search at
      * @param imageFile the name of the file to be found
-     * @return a lazy value that creates the <code>ImageIcon</code>
-     *         <code>UIResource</code> for the image,
+     * @return a lazy value that creates the {@code ImageIcon}
+     *         {@code UIResource} for the image,
      *         or null if it cannot be found
      */
     public static Object makeIcon_Unprivileged(final Class<?> baseClass,
@@ -1604,11 +1604,11 @@
     }
 
     /**
-     * Returns an integer from the defaults table. If <code>key</code> does
-     * not map to a valid <code>Integer</code>, or can not be convered from
-     * a <code>String</code> to an integer, the value 0 is returned.
+     * Returns an integer from the defaults table. If {@code key} does
+     * not map to a valid {@code Integer}, or can not be convered from
+     * a {@code String} to an integer, the value 0 is returned.
      *
-     * @param key  an <code>Object</code> specifying the int.
+     * @param key  an {@code Object} specifying the int.
      * @return the int
      */
     public static int getUIDefaultsInt(Object key) {
@@ -1617,13 +1617,13 @@
 
     /**
      * Returns an integer from the defaults table that is appropriate
-     * for the given locale. If <code>key</code> does not map to a valid
-     * <code>Integer</code>, or can not be convered from a <code>String</code>
+     * for the given locale. If {@code key} does not map to a valid
+     * {@code Integer}, or can not be convered from a {@code String}
      * to an integer, the value 0 is returned.
      *
-     * @param key  an <code>Object</code> specifying the int. Returned value
-     *             is 0 if <code>key</code> is not available,
-     * @param l the <code>Locale</code> for which the int is desired
+     * @param key  an {@code Object} specifying the int. Returned value
+     *             is 0 if {@code key} is not available,
+     * @param l the {@code Locale} for which the int is desired
      * @return the int
      */
     public static int getUIDefaultsInt(Object key, Locale l) {
@@ -1631,14 +1631,14 @@
     }
 
     /**
-     * Returns an integer from the defaults table. If <code>key</code> does
-     * not map to a valid <code>Integer</code>, or can not be convered from
-     * a <code>String</code> to an integer, <code>default</code> is
+     * Returns an integer from the defaults table. If {@code key} does
+     * not map to a valid {@code Integer}, or can not be convered from
+     * a {@code String} to an integer, {@code default} is
      * returned.
      *
-     * @param key  an <code>Object</code> specifying the int. Returned value
-     *             is 0 if <code>key</code> is not available,
-     * @param defaultValue Returned value if <code>key</code> is not available,
+     * @param key  an {@code Object} specifying the int. Returned value
+     *             is 0 if {@code key} is not available,
+     * @param defaultValue Returned value if {@code key} is not available,
      *                     or is not an Integer
      * @return the int
      */
@@ -1648,14 +1648,14 @@
 
     /**
      * Returns an integer from the defaults table that is appropriate
-     * for the given locale. If <code>key</code> does not map to a valid
-     * <code>Integer</code>, or can not be convered from a <code>String</code>
-     * to an integer, <code>default</code> is returned.
+     * for the given locale. If {@code key} does not map to a valid
+     * {@code Integer}, or can not be convered from a {@code String}
+     * to an integer, {@code default} is returned.
      *
-     * @param key  an <code>Object</code> specifying the int. Returned value
-     *             is 0 if <code>key</code> is not available,
-     * @param l the <code>Locale</code> for which the int is desired
-     * @param defaultValue Returned value if <code>key</code> is not available,
+     * @param key  an {@code Object} specifying the int. Returned value
+     *             is 0 if {@code key} is not available,
+     * @param l the {@code Locale} for which the int is desired
+     * @param defaultValue Returned value if {@code key} is not available,
      *                     or is not an Integer
      * @return the int
      */
@@ -1749,7 +1749,7 @@
      * @param task the task to submit
      * @param result the result to return upon successful completion
      * @return a Future representing pending completion of the task,
-     *         and whose <tt>get()</tt> method will return the given
+     *         and whose {@code get()} method will return the given
      *         result value upon completion
      * @throws NullPointerException if the task is null
      */
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java	Tue Aug 25 12:19:46 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -25,15 +25,16 @@
 package sun.awt.X11;
 
 import java.awt.*;
-import java.awt.event.InputEvent;
 import java.awt.peer.*;
 
 import sun.awt.AWTAccessor;
 import sun.awt.SunToolkit;
+import sun.awt.UNIXToolkit;
 import sun.awt.X11GraphicsConfig;
 
 class XRobotPeer implements RobotPeer {
 
+    private static volatile boolean isGtkSupported;
     private X11GraphicsConfig   xgc = null;
     /*
      * native implementation uses some static shared data (pipes, processes)
@@ -44,46 +45,65 @@
     XRobotPeer(GraphicsConfiguration gc) {
         this.xgc = (X11GraphicsConfig)gc;
         SunToolkit tk = (SunToolkit)Toolkit.getDefaultToolkit();
-        setup(tk.getNumberOfButtons(), AWTAccessor.getInputEventAccessor().getButtonDownMasks());
+        setup(tk.getNumberOfButtons(),
+                AWTAccessor.getInputEventAccessor().getButtonDownMasks());
+
+        Toolkit toolkit = Toolkit.getDefaultToolkit();
+        if (!isGtkSupported) {
+            if (toolkit instanceof UNIXToolkit
+                    && ((UNIXToolkit) toolkit).loadGTK()) {
+                isGtkSupported = true;
+            }
+        }
     }
 
+    @Override
     public void dispose() {
         // does nothing
     }
 
+    @Override
     public void mouseMove(int x, int y) {
         mouseMoveImpl(xgc, x, y);
     }
 
+    @Override
     public void mousePress(int buttons) {
         mousePressImpl(buttons);
     }
 
+    @Override
     public void mouseRelease(int buttons) {
         mouseReleaseImpl(buttons);
     }
 
+    @Override
     public void mouseWheel(int wheelAmt) {
-    mouseWheelImpl(wheelAmt);
+        mouseWheelImpl(wheelAmt);
     }
 
+    @Override
     public void keyPress(int keycode) {
         keyPressImpl(keycode);
     }
 
+    @Override
     public void keyRelease(int keycode) {
         keyReleaseImpl(keycode);
     }
 
+    @Override
     public int getRGBPixel(int x, int y) {
         int pixelArray[] = new int[1];
-        getRGBPixelsImpl(xgc, x, y, 1, 1, pixelArray);
+        getRGBPixelsImpl(xgc, x, y, 1, 1, pixelArray, isGtkSupported);
         return pixelArray[0];
     }
 
+    @Override
     public int [] getRGBPixels(Rectangle bounds) {
         int pixelArray[] = new int[bounds.width*bounds.height];
-        getRGBPixelsImpl(xgc, bounds.x, bounds.y, bounds.width, bounds.height, pixelArray);
+        getRGBPixelsImpl(xgc, bounds.x, bounds.y, bounds.width, bounds.height,
+                            pixelArray, isGtkSupported);
         return pixelArray;
     }
 
@@ -97,5 +117,6 @@
     private static native synchronized void keyPressImpl(int keycode);
     private static native synchronized void keyReleaseImpl(int keycode);
 
-    private static native synchronized void getRGBPixelsImpl(X11GraphicsConfig xgc, int x, int y, int width, int height, int pixelArray[]);
+    private static native synchronized void getRGBPixelsImpl(X11GraphicsConfig xgc,
+            int x, int y, int width, int height, int pixelArray[], boolean isGtkSupported);
 }
--- a/jdk/src/java.desktop/unix/native/common/awt/fontpath.c	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/unix/native/common/awt/fontpath.c	Tue Aug 25 12:19:46 2015 -0700
@@ -1219,10 +1219,11 @@
                 minGlyphs = val;
             }
         }
+        FcCharSet *unionCharset = NULL;
         for (j=0; j<nfonts; j++) {
             FcPattern *fontPattern = fontset->fonts[j];
             FcChar8 *fontformat;
-            FcCharSet *unionCharset = NULL, *charset;
+            FcCharSet *charset = NULL;
 
             fontformat = NULL;
             (*FcPatternGetString)(fontPattern, FC_FONTFORMAT, 0, &fontformat);
@@ -1280,6 +1281,9 @@
             if (!includeFallbacks) {
                 break;
             }
+            if (fontCount == 254) {
+                break; // CompositeFont will only use up to 254 slots from here.
+            }
         }
 
         /* Once we get here 'fontCount' is the number of returned fonts
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c	Tue Aug 25 12:19:46 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, 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
@@ -45,6 +45,8 @@
 #include "wsutils.h"
 #include "list.h"
 #include "multiVis.h"
+#include "gtk2_interface.h"
+
 #if defined(__linux__) || defined(MACOSX)
 #include <sys/socket.h>
 #endif
@@ -204,63 +206,139 @@
 Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl( JNIEnv *env,
                              jclass cls,
                              jobject xgc,
-                             jint x,
-                             jint y,
-                             jint width,
-                             jint height,
-                             jintArray pixelArray) {
-
+                             jint jx,
+                             jint jy,
+                             jint jwidth,
+                             jint jheight,
+                             jintArray pixelArray,
+                             jboolean isGtkSupported) {
     XImage *image;
     jint *ary;               /* Array of jints for sending pixel values back
                               * to parent process.
                               */
     Window rootWindow;
+    XWindowAttributes attr;
     AwtGraphicsConfigDataPtr adata;
 
-    DTRACE_PRINTLN6("RobotPeer: getRGBPixelsImpl(%lx, %d, %d, %d, %d, %x)", xgc, x, y, width, height, pixelArray);
-
-    AWT_LOCK();
+    DTRACE_PRINTLN6("RobotPeer: getRGBPixelsImpl(%lx, %d, %d, %d, %d, %x)", xgc, jx, jy, jwidth, jheight, pixelArray);
 
-    /* avoid a lot of work for empty rectangles */
-    if ((width * height) == 0) {
-        AWT_UNLOCK();
+    if (jwidth <= 0 || jheight <= 0) {
         return;
     }
-    DASSERT(width * height > 0); /* only allow positive size */
 
     adata = (AwtGraphicsConfigDataPtr) JNU_GetLongFieldAsPtr(env, xgc, x11GraphicsConfigIDs.aData);
     DASSERT(adata != NULL);
 
+    AWT_LOCK();
+
     rootWindow = XRootWindow(awt_display, adata->awt_visInfo.screen);
-    image = getWindowImage(awt_display, rootWindow, x, y, width, height);
 
-    /* Array to use to crunch around the pixel values */
-    if (!IS_SAFE_SIZE_MUL(width, height) ||
-        !(ary = (jint *) SAFE_SIZE_ARRAY_ALLOC(malloc, width * height, sizeof (jint))))
-    {
-        JNU_ThrowOutOfMemoryError(env, "OutOfMemoryError");
-        XDestroyImage(image);
+    if (!XGetWindowAttributes(awt_display, rootWindow, &attr)
+            || jx + jwidth <= attr.x
+            || attr.x + attr.width <= jx
+            || jy + jheight <= attr.y
+            || attr.y + attr.height <= jy) {
+
         AWT_UNLOCK();
-        return;
+        return; // Does not intersect with root window
     }
-    /* convert to Java ARGB pixels */
-    for (y = 0; y < height; y++) {
-        for (x = 0; x < width; x++) {
-            jint pixel = (jint) XGetPixel(image, x, y); /* Note ignore upper
-                                                         * 32-bits on 64-bit
-                                                         * OSes.
-                                                         */
+
+    gboolean gtk_failed = TRUE;
+    jint _x, _y;
+
+    jint x = MAX(jx, attr.x);
+    jint y = MAX(jy, attr.y);
+    jint width = MIN(jx + jwidth, attr.x + attr.width) - x;
+    jint height = MIN(jy + jheight, attr.y + attr.height) - y;
+
+
+    int dx = attr.x > jx ? attr.x - jx : 0;
+    int dy = attr.y > jy ? attr.y - jy : 0;
+
+    int index;
+
+    if (isGtkSupported) {
+        GdkPixbuf *pixbuf;
+        (*fp_gdk_threads_enter)();
+        GdkWindow *root = (*fp_gdk_get_default_root_window)();
+
+        pixbuf = (*fp_gdk_pixbuf_get_from_drawable)(NULL, root, NULL,
+                                                    x, y, 0, 0, width, height);
+
+        if (pixbuf) {
+            int nchan = (*fp_gdk_pixbuf_get_n_channels)(pixbuf);
+            int stride = (*fp_gdk_pixbuf_get_rowstride)(pixbuf);
+
+            if ((*fp_gdk_pixbuf_get_width)(pixbuf) == width
+                    && (*fp_gdk_pixbuf_get_height)(pixbuf) == height
+                    && (*fp_gdk_pixbuf_get_bits_per_sample)(pixbuf) == 8
+                    && (*fp_gdk_pixbuf_get_colorspace)(pixbuf) == GDK_COLORSPACE_RGB
+                    && nchan >= 3
+                    ) {
+                guchar *p, *pix = (*fp_gdk_pixbuf_get_pixels)(pixbuf);
+
+                ary = (*env)->GetPrimitiveArrayCritical(env, pixelArray, NULL);
+                if (!ary) {
+                    (*fp_g_object_unref)(pixbuf);
+                    (*fp_gdk_threads_leave)();
+                    AWT_UNLOCK();
+                    return;
+                }
+
+                for (_y = 0; _y < height; _y++) {
+                    for (_x = 0; _x < width; _x++) {
+                        p = pix + _y * stride + _x * nchan;
 
-            pixel |= 0xff000000; /* alpha - full opacity */
+                        index = (_y + dy) * jwidth + (_x + dx);
+                        ary[index] = 0xff000000
+                                        | (p[0] << 16)
+                                        | (p[1] << 8)
+                                        | (p[2]);
 
-            ary[(y * width) + x] = pixel;
+                    }
+                }
+                (*env)->ReleasePrimitiveArrayCritical(env, pixelArray, ary, 0);
+                if ((*env)->ExceptionCheck(env)) {
+                    (*fp_g_object_unref)(pixbuf);
+                    (*fp_gdk_threads_leave)();
+                    AWT_UNLOCK();
+                    return;
+                }
+                gtk_failed = FALSE;
+            }
+            (*fp_g_object_unref)(pixbuf);
         }
+        (*fp_gdk_threads_leave)();
     }
-    (*env)->SetIntArrayRegion(env, pixelArray, 0, height * width, ary);
-    free(ary);
+
+    if (gtk_failed) {
+        image = getWindowImage(awt_display, rootWindow, x, y, width, height);
+
+        ary = (*env)->GetPrimitiveArrayCritical(env, pixelArray, NULL);
+
+        if (!ary) {
+            XDestroyImage(image);
+            AWT_UNLOCK();
+            return;
+        }
 
-    XDestroyImage(image);
+        /* convert to Java ARGB pixels */
+        for (_y = 0; _y < height; _y++) {
+            for (_x = 0; _x < width; _x++) {
+                jint pixel = (jint) XGetPixel(image, _x, _y); /* Note ignore upper
+                                                               * 32-bits on 64-bit
+                                                               * OSes.
+                                                               */
+                pixel |= 0xff000000; /* alpha - full opacity */
 
+                index = (_y + dy) * jwidth + (_x + dx);
+                ary[index] = pixel;
+            }
+        }
+
+        XDestroyImage(image);
+        (*env)->ReleasePrimitiveArrayCritical(env, pixelArray, ary, 0);
+    }
     AWT_UNLOCK();
 }
 
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c	Tue Aug 25 12:19:46 2015 -0700
@@ -203,9 +203,6 @@
         gint, gint, gint, gint);
 static GdkPixbuf *(*fp_gdk_pixbuf_new)(GdkColorspace colorspace,
         gboolean has_alpha, int bits_per_sample, int width, int height);
-static GdkPixbuf *(*fp_gdk_pixbuf_get_from_drawable)(GdkPixbuf *dest,
-        GdkDrawable *src, GdkColormap *cmap, int src_x, int src_y,
-        int dest_x, int dest_y, int width, int height);
 static void (*fp_gdk_drawable_get_size)(GdkDrawable *drawable,
         gint* width, gint* height);
 
@@ -646,6 +643,8 @@
         fp_g_object_set = dl_symbol("g_object_set");
 
         /* GDK */
+        fp_gdk_get_default_root_window =
+            dl_symbol("gdk_get_default_root_window");
         fp_gdk_pixmap_new = dl_symbol("gdk_pixmap_new");
         fp_gdk_pixbuf_get_from_drawable =
             dl_symbol("gdk_pixbuf_get_from_drawable");
@@ -670,6 +669,8 @@
                 dl_symbol("gdk_pixbuf_get_bits_per_sample");
         fp_gdk_pixbuf_get_n_channels =
                 dl_symbol("gdk_pixbuf_get_n_channels");
+        fp_gdk_pixbuf_get_colorspace =
+                dl_symbol("gdk_pixbuf_get_colorspace");
 
         /* GTK painting */
         fp_gtk_init_check = dl_symbol("gtk_init_check");
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.h	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.h	Tue Aug 25 12:19:46 2015 -0700
@@ -772,6 +772,8 @@
 
 void (*fp_g_free)(gpointer mem);
 void (*fp_g_object_unref)(gpointer object);
+GdkWindow *(*fp_gdk_get_default_root_window) (void);
+
 int (*fp_gdk_pixbuf_get_bits_per_sample)(const GdkPixbuf *pixbuf);
 guchar *(*fp_gdk_pixbuf_get_pixels)(const GdkPixbuf *pixbuf);
 gboolean (*fp_gdk_pixbuf_get_has_alpha)(const GdkPixbuf *pixbuf);
@@ -780,6 +782,13 @@
 int (*fp_gdk_pixbuf_get_rowstride)(const GdkPixbuf *pixbuf);
 int (*fp_gdk_pixbuf_get_width)(const GdkPixbuf *pixbuf);
 GdkPixbuf *(*fp_gdk_pixbuf_new_from_file)(const char *filename, GError **error);
+GdkColorspace (*fp_gdk_pixbuf_get_colorspace)(const GdkPixbuf *pixbuf);
+
+GdkPixbuf *(*fp_gdk_pixbuf_get_from_drawable)(GdkPixbuf *dest,
+        GdkDrawable *src, GdkColormap *cmap, int src_x, int src_y,
+        int dest_x, int dest_y, int width, int height);
+
+
 void (*fp_gtk_widget_destroy)(GtkWidget *widget);
 void (*fp_gtk_window_present)(GtkWindow *window);
 void (*fp_gtk_window_move)(GtkWindow *window, gint x, gint y);
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp	Tue Aug 25 12:19:46 2015 -0700
@@ -4954,6 +4954,10 @@
         return;
     }
     jobject target = GetTarget(env);
+    DWORD curMousePos = ::GetMessagePos();
+    int xAbs = GET_X_LPARAM(curMousePos);
+    int yAbs = GET_Y_LPARAM(curMousePos);
+
     DTRACE_PRINTLN("creating MWE in JNI");
 
     jobject mouseWheelEvent = env->NewObject(mouseWheelEventCls,
@@ -4961,7 +4965,7 @@
                                              target,
                                              id, when, modifiers,
                                              x+insets.left, y+insets.top,
-                                             0, 0,
+                                             xAbs, yAbs,
                                              clickCount, popupTrigger,
                                              scrollType, scrollAmount,
                                              roundedWheelRotation, preciseWheelRotation);
--- a/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/Translator.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/Translator.java	Tue Aug 25 12:19:46 2015 -0700
@@ -78,8 +78,8 @@
             return null;
         }
         try {
-            t = Class.forName("com.sun.java.accessibility.util."
-                              + c.getName()
+            t = Class.forName("com.sun.java.accessibility.util.internal"
+                              + c.getSimpleName()
                               + "Translator");
             return t;
         } catch (Exception e) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/internal/ButtonTranslator.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2002, 2015, 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.java.accessibility.util.internal;
+
+import java.lang.*;
+import java.util.*;
+import java.awt.*;
+import java.awt.image.*;
+import javax.accessibility.*;
+import com.sun.java.accessibility.util.*;
+
+/**
+ * <p>The Translator class provides a translation to interface Accessible
+ * for objects that do not implement interface Accessible.  Assistive
+ * technologies can use the 'getAccessible' class method of Translator to
+ * obtain an object that implements interface Accessible.  If the object
+ * passed in already implements interface Accessible, getAccessible merely
+ * returns the object.
+ *
+ * <p>An example of how an assistive technology might use the Translator
+ * class is as follows:
+ *
+ * <PRE>
+ *    Accessible accessible = Translator.getAccessible(someObj);
+ *    // obtain information from the 'accessible' object.
+ * </PRE>
+ *
+ * <P>This class extends the Translator class to provide specific support
+ * for the Button class.  Translator.getAccessible() will automatically
+ * load this class when an assistive technology asks for an accessible
+ * translator for Button.
+ *
+ */
+public class ButtonTranslator extends Translator {
+
+    /**
+     * Get the name of this object.
+     * @return the name of the object -- can be null if this object does
+     * not have a name
+     */
+    public String getAccessibleName() {
+        return ((Button) source).getLabel();
+    }
+
+    /**
+     * Set the name of this object.
+     */
+    public void setAccessibleName(String s) {
+        ((Button) source).setLabel(s);
+    }
+
+    public AccessibleRole getAccessibleRole() {
+        return AccessibleRole.PUSH_BUTTON;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/internal/CheckboxTranslator.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2002, 2015, 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.java.accessibility.util.internal;
+
+import java.lang.*;
+import java.util.*;
+import java.awt.*;
+import java.awt.image.*;
+import javax.accessibility.*;
+import com.sun.java.accessibility.util.*;
+
+/**
+ * <p>The Translator class provides a translation to interface Accessible
+ * for objects that do not implement interface Accessible.  Assistive
+ * technologies can use the 'getAccessible' class method of Translator to
+ * obtain an object that implements interface Accessible.  If the object
+ * passed in already implements interface Accessible, getAccessible merely
+ * returns the object.
+ *
+ * <p>An example of how an assistive technology might use the Translator
+ * class is as follows:
+ *
+ * <PRE>
+ *    Accessible accessible = Translator.getAccessible(someObj);
+ *    // obtain information from the 'accessible' object.
+ * </PRE>
+ *
+ * <P>This class extends the Translator class to provide specific support
+ * for the Checkbox class.  Translator.getAccessible() will automatically
+ * load this class when an assistive technology asks for an accessible
+ * translator for Checkbox.
+ *
+ */
+public class CheckboxTranslator extends Translator {
+
+    /**
+     * Get the state of this object.
+     * @return an instance of AccessibleState containing the current state of the object
+     * @see AccessibleState
+     */
+    public AccessibleStateSet getAccessibleStateSet() {
+        AccessibleStateSet states = super.getAccessibleStateSet();
+        if (((Checkbox) source).getState()) {
+            states.add(AccessibleState.CHECKED);
+        }
+        return states;
+    }
+
+    /**
+     * Get the name of this object.
+     * @return the name of the object -- can be null if this object does
+     * not have a name
+     */
+    public String getAccessibleName() {
+        return ((Checkbox) source).getLabel();
+    }
+
+    /**
+     * Set the name of this object.
+     */
+    public void setAccessibleName(String s) {
+        ((Checkbox) source).setLabel(s);
+    }
+
+    public AccessibleRole getAccessibleRole() {
+        return AccessibleRole.CHECK_BOX;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/internal/LabelTranslator.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2002, 2015, 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.java.accessibility.util.internal;
+
+import java.lang.*;
+import java.util.*;
+import java.awt.*;
+import java.awt.image.*;
+import javax.accessibility.*;
+import com.sun.java.accessibility.util.*;
+
+/**
+ * <p>The Translator class provides a translation to interface Accessible
+ * for objects that do not implement interface Accessible.  Assistive
+ * technologies can use the 'getAccessible' class method of Translator to
+ * obtain an object that implements interface Accessible.  If the object
+ * passed in already implements interface Accessible, getAccessible merely
+ * returns the object.
+ *
+ * <p>An example of how an assistive technology might use the Translator
+ * class is as follows:
+ *
+ * <PRE>
+ *    Accessible accessible = Translator.getAccessible(someObj);
+ *    // obtain information from the 'accessible' object.
+ * </PRE>
+ *
+ * <P>This class extends the Translator class to provide specific support
+ * for the Label class.  Translator.getAccessible() will automatically
+ * load this class when an assistive technology asks for an accessible
+ * translator for Label.
+ *
+ */
+public class LabelTranslator extends Translator {
+
+    public String getAccessibleName() {
+        return ((Label) source).getText();
+    }
+
+    /**
+     * Set the name of this object.
+     */
+    public void setAccessibleName(String s) {
+        ((Label) source).setText(s);
+    }
+
+    public AccessibleRole getAccessibleRole() {
+        return AccessibleRole.LABEL;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/internal/ListTranslator.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2002, 2015, 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.java.accessibility.util.internal;
+
+import java.lang.*;
+import java.util.*;
+import java.awt.*;
+import java.awt.image.*;
+import javax.accessibility.*;
+import com.sun.java.accessibility.util.*;
+
+/**
+ * <p>The Translator class provides a translation to interface Accessible
+ * for objects that do not implement interface Accessible.  Assistive
+ * technologies can use the 'getAccessible' class method of Translator to
+ * obtain an object that implements interface Accessible.  If the object
+ * passed in already implements interface Accessible, getAccessible merely
+ * returns the object.
+ *
+ * <p>An example of how an assistive technology might use the Translator
+ * class is as follows:
+ *
+ * <PRE>
+ *    Accessible accessible = Translator.getAccessible(someObj);
+ *    // obtain information from the 'accessible' object.
+ * </PRE>
+ *
+ * <P>This class extends the Translator class to provide specific support
+ * for the List class.  Translator.getAccessible() will automatically
+ * load this class when an assistive technology asks for an accessible
+ * translator for List.
+ *
+ */
+public class ListTranslator extends Translator {
+
+    /**
+     * Get the state of this object.
+     * @return an instance of AccessibleState containing the current state of the object
+     * @see AccessibleState
+     */
+    public AccessibleStateSet getAccessibleStateSet() {
+        AccessibleStateSet states = super.getAccessibleStateSet();
+        if (((java.awt.List) source).isMultipleMode()) {
+            states.add(AccessibleState.MULTISELECTABLE);
+        }
+        if (((java.awt.List) source).getSelectedItems().length > 0) {
+            states.add(AccessibleState.SELECTED);
+        }
+        return states;
+    }
+
+    public AccessibleRole getAccessibleRole() {
+        return AccessibleRole.LIST;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/internal/TextComponentTranslator.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2002, 2015, 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.java.accessibility.util.internal;
+
+import java.lang.*;
+import java.util.*;
+import java.awt.*;
+import java.awt.image.*;
+import javax.accessibility.*;
+import com.sun.java.accessibility.util.*;
+
+/**
+ * <p>The Translator class provides a translation to interface Accessible
+ * for objects that do not implement interface Accessible.  Assistive
+ * technologies can use the 'getAccessible' class method of Translator to
+ * obtain an object that implements interface Accessible.  If the object
+ * passed in already implements interface Accessible, getAccessible merely
+ * returns the object.
+ *
+ * <p>An example of how an assistive technology might use the Translator
+ * class is as follows:
+ *
+ * <PRE>
+ *    Accessible accessible = Translator.getAccessible(someObj);
+ *    // obtain information from the 'accessible' object.
+ * </PRE>
+ *
+ * <P>This class extends the Translator class to provide specific support
+ * for the TextComponent class.  Translator.getAccessible() will automatically
+ * load this class when an assistive technology asks for an accessible
+ * translator for TextComponent.
+ *
+ */
+public class TextComponentTranslator extends Translator {
+
+    public AccessibleRole getAccessibleRole() {
+        return AccessibleRole.TEXT;
+    }
+}
--- a/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/java/awt/ButtonTranslator.java	Tue Aug 25 13:40:07 2015 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2002, 2015, 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.java.accessibility.util.java.awt;
-
-import java.lang.*;
-import java.util.*;
-import java.awt.*;
-import java.awt.image.*;
-import javax.accessibility.*;
-import com.sun.java.accessibility.util.*;
-
-/**
- * <p>The Translator class provides a translation to interface Accessible
- * for objects that do not implement interface Accessible.  Assistive
- * technologies can use the 'getAccessible' class method of Translator to
- * obtain an object that implements interface Accessible.  If the object
- * passed in already implements interface Accessible, getAccessible merely
- * returns the object.
- *
- * <p>An example of how an assistive technology might use the Translator
- * class is as follows:
- *
- * <PRE>
- *    Accessible accessible = Translator.getAccessible(someObj);
- *    // obtain information from the 'accessible' object.
- * </PRE>
- *
- * <P>This class extends the Translator class to provide specific support
- * for the Button class.  Translator.getAccessible() will automatically
- * load this class when an assistive technology asks for an accessible
- * translator for Button.
- *
- */
-public class ButtonTranslator extends Translator {
-
-    /**
-     * Get the name of this object.
-     * @return the name of the object -- can be null if this object does
-     * not have a name
-     */
-    public String getAccessibleName() {
-        return ((Button) source).getLabel();
-    }
-
-    /**
-     * Set the name of this object.
-     */
-    public void setAccessibleName(String s) {
-        ((Button) source).setLabel(s);
-    }
-
-    public AccessibleRole getAccessibleRole() {
-        return AccessibleRole.PUSH_BUTTON;
-    }
-}
--- a/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/java/awt/CheckboxTranslator.java	Tue Aug 25 13:40:07 2015 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2002, 2015, 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.java.accessibility.util.java.awt;
-
-import java.lang.*;
-import java.util.*;
-import java.awt.*;
-import java.awt.image.*;
-import javax.accessibility.*;
-import com.sun.java.accessibility.util.*;
-
-/**
- * <p>The Translator class provides a translation to interface Accessible
- * for objects that do not implement interface Accessible.  Assistive
- * technologies can use the 'getAccessible' class method of Translator to
- * obtain an object that implements interface Accessible.  If the object
- * passed in already implements interface Accessible, getAccessible merely
- * returns the object.
- *
- * <p>An example of how an assistive technology might use the Translator
- * class is as follows:
- *
- * <PRE>
- *    Accessible accessible = Translator.getAccessible(someObj);
- *    // obtain information from the 'accessible' object.
- * </PRE>
- *
- * <P>This class extends the Translator class to provide specific support
- * for the Checkbox class.  Translator.getAccessible() will automatically
- * load this class when an assistive technology asks for an accessible
- * translator for Checkbox.
- *
- */
-public class CheckboxTranslator extends Translator {
-
-    /**
-     * Get the state of this object.
-     * @return an instance of AccessibleState containing the current state of the object
-     * @see AccessibleState
-     */
-    public AccessibleStateSet getAccessibleStateSet() {
-        AccessibleStateSet states = super.getAccessibleStateSet();
-        if (((Checkbox) source).getState()) {
-            states.add(AccessibleState.CHECKED);
-        }
-        return states;
-    }
-
-    /**
-     * Get the name of this object.
-     * @return the name of the object -- can be null if this object does
-     * not have a name
-     */
-    public String getAccessibleName() {
-        return ((Checkbox) source).getLabel();
-    }
-
-    /**
-     * Set the name of this object.
-     */
-    public void setAccessibleName(String s) {
-        ((Checkbox) source).setLabel(s);
-    }
-
-    public AccessibleRole getAccessibleRole() {
-        return AccessibleRole.CHECK_BOX;
-    }
-}
--- a/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/java/awt/LabelTranslator.java	Tue Aug 25 13:40:07 2015 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2002, 2015, 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.java.accessibility.util.java.awt;
-
-import java.lang.*;
-import java.util.*;
-import java.awt.*;
-import java.awt.image.*;
-import javax.accessibility.*;
-import com.sun.java.accessibility.util.*;
-
-/**
- * <p>The Translator class provides a translation to interface Accessible
- * for objects that do not implement interface Accessible.  Assistive
- * technologies can use the 'getAccessible' class method of Translator to
- * obtain an object that implements interface Accessible.  If the object
- * passed in already implements interface Accessible, getAccessible merely
- * returns the object.
- *
- * <p>An example of how an assistive technology might use the Translator
- * class is as follows:
- *
- * <PRE>
- *    Accessible accessible = Translator.getAccessible(someObj);
- *    // obtain information from the 'accessible' object.
- * </PRE>
- *
- * <P>This class extends the Translator class to provide specific support
- * for the Label class.  Translator.getAccessible() will automatically
- * load this class when an assistive technology asks for an accessible
- * translator for Label.
- *
- */
-public class LabelTranslator extends Translator {
-
-    public String getAccessibleName() {
-        return ((Label) source).getText();
-    }
-
-    /**
-     * Set the name of this object.
-     */
-    public void setAccessibleName(String s) {
-        ((Label) source).setText(s);
-    }
-
-    public AccessibleRole getAccessibleRole() {
-        return AccessibleRole.LABEL;
-    }
-}
--- a/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/java/awt/ListTranslator.java	Tue Aug 25 13:40:07 2015 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2002, 2015, 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.java.accessibility.util.java.awt;
-
-import java.lang.*;
-import java.util.*;
-import java.awt.*;
-import java.awt.image.*;
-import javax.accessibility.*;
-import com.sun.java.accessibility.util.*;
-
-/**
- * <p>The Translator class provides a translation to interface Accessible
- * for objects that do not implement interface Accessible.  Assistive
- * technologies can use the 'getAccessible' class method of Translator to
- * obtain an object that implements interface Accessible.  If the object
- * passed in already implements interface Accessible, getAccessible merely
- * returns the object.
- *
- * <p>An example of how an assistive technology might use the Translator
- * class is as follows:
- *
- * <PRE>
- *    Accessible accessible = Translator.getAccessible(someObj);
- *    // obtain information from the 'accessible' object.
- * </PRE>
- *
- * <P>This class extends the Translator class to provide specific support
- * for the List class.  Translator.getAccessible() will automatically
- * load this class when an assistive technology asks for an accessible
- * translator for List.
- *
- */
-public class ListTranslator extends Translator {
-
-    /**
-     * Get the state of this object.
-     * @return an instance of AccessibleState containing the current state of the object
-     * @see AccessibleState
-     */
-    public AccessibleStateSet getAccessibleStateSet() {
-        AccessibleStateSet states = super.getAccessibleStateSet();
-        if (((java.awt.List) source).isMultipleMode()) {
-            states.add(AccessibleState.MULTISELECTABLE);
-        }
-        if (((java.awt.List) source).getSelectedItems().length > 0) {
-            states.add(AccessibleState.SELECTED);
-        }
-        return states;
-    }
-
-    public AccessibleRole getAccessibleRole() {
-        return AccessibleRole.LIST;
-    }
-}
--- a/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/java/awt/TextComponentTranslator.java	Tue Aug 25 13:40:07 2015 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2002, 2015, 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.java.accessibility.util.java.awt;
-
-import java.lang.*;
-import java.util.*;
-import java.awt.*;
-import java.awt.image.*;
-import javax.accessibility.*;
-import com.sun.java.accessibility.util.*;
-
-/**
- * <p>The Translator class provides a translation to interface Accessible
- * for objects that do not implement interface Accessible.  Assistive
- * technologies can use the 'getAccessible' class method of Translator to
- * obtain an object that implements interface Accessible.  If the object
- * passed in already implements interface Accessible, getAccessible merely
- * returns the object.
- *
- * <p>An example of how an assistive technology might use the Translator
- * class is as follows:
- *
- * <PRE>
- *    Accessible accessible = Translator.getAccessible(someObj);
- *    // obtain information from the 'accessible' object.
- * </PRE>
- *
- * <P>This class extends the Translator class to provide specific support
- * for the TextComponent class.  Translator.getAccessible() will automatically
- * load this class when an assistive technology asks for an accessible
- * translator for TextComponent.
- *
- */
-public class TextComponentTranslator extends Translator {
-
-    public AccessibleRole getAccessibleRole() {
-        return AccessibleRole.TEXT;
-    }
-}
--- a/jdk/src/jdk.accessibility/windows/classes/META-INF/services/javax.accessibility.AccessibilityProvider	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/jdk.accessibility/windows/classes/META-INF/services/javax.accessibility.AccessibilityProvider	Tue Aug 25 12:19:46 2015 -0700
@@ -22,5 +22,5 @@
 # questions.
 
 
-com.sun.java.accessibility.ProviderImpl
+com.sun.java.accessibility.internal.ProviderImpl
 
--- a/jdk/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/AccessBridge.java	Tue Aug 25 13:40:07 2015 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7170 +0,0 @@
-/*
- * Copyright (c) 2005, 2015, 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.java.accessibility;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
-import java.lang.*;
-import java.lang.reflect.*;
-
-import java.beans.*;
-import javax.swing.*;
-import javax.swing.event.*;
-import javax.swing.text.*;
-import javax.swing.tree.*;
-import javax.swing.table.*;
-import javax.swing.plaf.TreeUI;
-
-import javax.accessibility.*;
-import com.sun.java.accessibility.util.*;
-import sun.awt.AWTAccessor;
-import sun.awt.AppContext;
-import sun.awt.SunToolkit;
-
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CountDownLatch;
-
-/*
- * Note: This class has to be public.  It's loaded from the VM like this:
- *       Class.forName(atName).newInstance();
- */
-@jdk.Exported(false)
-final public class AccessBridge {
-
-    private static AccessBridge theAccessBridge;
-    private ObjectReferences references;
-    private EventHandler eventHandler;
-
-    // Maps AccessibleRoles strings to AccessibleRoles.
-    private ConcurrentHashMap<String,AccessibleRole> accessibleRoleMap = new ConcurrentHashMap<>();
-
-    /**
-       If the object's role is in the following array getVirtualAccessibleName
-       will use the extended search algorithm.
-    */
-    private ArrayList<AccessibleRole> extendedVirtualNameSearchRoles = new ArrayList<>();
-    /**
-       If the role of the object's parent is in the following array
-       getVirtualAccessibleName will NOT use the extended search
-       algorithm even if the object's role is in the
-       extendedVirtualNameSearchRoles array.
-    */
-    private ArrayList<AccessibleRole> noExtendedVirtualNameSearchParentRoles = new ArrayList<>();
-
-    private static native boolean isSysWow();
-
-
-    /**
-     * Load DLLs
-     */
-    static {
-        // Load the appropriate DLLs
-        boolean is32on64 = false;
-        if (System.getProperty("os.arch").equals("x86")) {
-            // 32 bit JRE
-            // Load jabsysinfo.dll so can determine Win bitness
-            java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<Void>() {
-                    public Void run() {
-                        System.loadLibrary("jabsysinfo");
-                        return null;
-                    }
-                }, null, new java.lang.RuntimePermission("loadLibrary.jabsysinfo")
-            );
-            if (isSysWow()) {
-                // 32 bit JRE on 64 bit OS
-                is32on64 = true;
-                java.security.AccessController.doPrivileged(
-                    new java.security.PrivilegedAction<Void>() {
-                        public Void run() {
-                            System.loadLibrary("javaaccessbridge-32");
-                            return null;
-                        }
-                    }, null, new java.lang.RuntimePermission("loadLibrary.javaaccessbridge-32")
-                );
-            }
-        }
-        if (!is32on64) {
-            // 32 bit JRE on 32 bit OS or 64 bit JRE on 64 bit OS
-            java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<Void>() {
-                    public Void run() {
-                        System.loadLibrary("javaaccessbridge");
-                        return null;
-                    }
-                }, null, new java.lang.RuntimePermission("loadLibrary.javaaccessbridge")
-            );
-        }
-    }
-
-    /**
-     * AccessBridge constructor
-     *
-     * Note: This constructor has to be public.  It's called from the VM like this:
-     *       Class.forName(atName).newInstance();
-     */
-    public AccessBridge() {
-        theAccessBridge = this;
-        references = new ObjectReferences();
-
-        // initialize shutdown hook
-        Runtime runTime = Runtime.getRuntime();
-        shutdownHook hook = new shutdownHook();
-        runTime.addShutdownHook(new Thread(hook));
-
-        // initialize AccessibleRole map
-        initAccessibleRoleMap();
-
-        // determine which version of the JDK is running
-        String version = getJavaVersionProperty();
-        debugString("JDK version = "+version);
-
-        // initialize the methods that map HWNDs and Java top-level
-        // windows
-        initHWNDcalls();
-
-        // is this a JVM we can use?
-        // install JDK 1.2 and later Swing ToolKit listener
-        EventQueueMonitor.isGUIInitialized();
-
-        // start the Java event handler
-        eventHandler = new EventHandler(this);
-
-        // register for menu selection events
-        MenuSelectionManager.defaultManager().addChangeListener(eventHandler);
-
-        // register as a NativeWindowHandler
-        addNativeWindowHandler(new DefaultNativeWindowHandler());
-
-        // start in a new thread
-        Thread abthread = new Thread(new dllRunner());
-        abthread.setDaemon(true);
-        abthread.start();
-        debugString("AccessBridge started");
-    }
-
-    /*
-     * adaptor to run the AccessBridge DLL
-     */
-    private class dllRunner implements Runnable {
-        public void run() {
-            runDLL();
-        }
-    }
-
-    /*
-     * shutdown hook
-     */
-    private class shutdownHook implements Runnable {
-
-        public void run() {
-            debugString("***** shutdownHook: shutting down...");
-            javaShutdown();
-        }
-    }
-
-
-    /*
-     * Initialize the hashtable that maps Strings to AccessibleRoles.
-     */
-    private void initAccessibleRoleMap() {
-        /*
-         * Initialize the AccessibleRoles map. This code uses methods in
-         * java.lang.reflect.* to build the map.
-         */
-        try {
-            Class<?> clAccessibleRole = Class.forName ("javax.accessibility.AccessibleRole");
-            if (null != clAccessibleRole) {
-                AccessibleRole roleUnknown = AccessibleRole.UNKNOWN;
-                Field [] fields = clAccessibleRole.getFields ();
-                int i = 0;
-                for (i = 0; i < fields.length; i ++) {
-                    Field f = fields [i];
-                    if (javax.accessibility.AccessibleRole.class == f.getType ()) {
-                        AccessibleRole nextRole = (AccessibleRole) (f.get (roleUnknown));
-                        String nextRoleString = nextRole.toDisplayString (Locale.US);
-                        accessibleRoleMap.put (nextRoleString, nextRole);
-                    }
-                }
-            }
-        } catch (Exception e) {}
-
-    /*
-      Build the extendedVirtualNameSearchRoles array list.  I chose this method
-      because some of the Accessible Roles that need to be added to it are not
-      available in all versions of the J2SE that we want to support.
-    */
-    extendedVirtualNameSearchRoles.add (AccessibleRole.COMBO_BOX);
-    try {
-        /*
-          Added in J2SE 1.4
-        */
-        extendedVirtualNameSearchRoles.add (AccessibleRole.DATE_EDITOR);
-    } catch (NoSuchFieldError e) {}
-    extendedVirtualNameSearchRoles.add (AccessibleRole.LIST);
-    extendedVirtualNameSearchRoles.add (AccessibleRole.PASSWORD_TEXT);
-    extendedVirtualNameSearchRoles.add (AccessibleRole.SLIDER);
-    try {
-        /*
-          Added in J2SE 1.3
-        */
-        extendedVirtualNameSearchRoles.add (AccessibleRole.SPIN_BOX);
-    } catch (NoSuchFieldError e) {}
-    extendedVirtualNameSearchRoles.add (AccessibleRole.TABLE);
-    extendedVirtualNameSearchRoles.add (AccessibleRole.TEXT);
-    extendedVirtualNameSearchRoles.add (AccessibleRole.UNKNOWN);
-
-    noExtendedVirtualNameSearchParentRoles.add (AccessibleRole.TABLE);
-    noExtendedVirtualNameSearchParentRoles.add (AccessibleRole.TOOL_BAR);
-    }
-
-    /**
-     * start the AccessBridge DLL running in its own thread
-     */
-    private native void runDLL();
-
-    /**
-     * debugging output (goes to OutputDebugStr())
-     */
-    private native void sendDebugString(String debugStr);
-
-    /**
-     * debugging output (goes to OutputDebugStr())
-     */
-    private void debugString(String debugStr) {
-    sendDebugString(debugStr);
-    }
-
-    /* ===== utility methods ===== */
-
-    /**
-     * decrement the reference to the object (called by native code)
-     */
-    private void decrementReference(Object o) {
-    references.decrement(o);
-    }
-
-    /**
-     * get the java.version property from the JVM
-     */
-    private String getJavaVersionProperty() {
-        String s = System.getProperty("java.version");
-        if (s != null) {
-            references.increment(s);
-            return s;
-        }
-        return null;
-    }
-
-    /* ===== HWND/Java window mapping methods ===== */
-
-    // Java toolkit methods for mapping HWNDs to Java components
-    private Method javaGetComponentFromNativeWindowHandleMethod;
-    private Method javaGetNativeWindowHandleFromComponentMethod;
-
-    // native jawt methods for mapping HWNDs to Java components
-    private native int jawtGetNativeWindowHandleFromComponent(Component comp);
-
-    private native Component jawtGetComponentFromNativeWindowHandle(int handle);
-
-    Toolkit toolkit;
-
-    /**
-     * map an HWND to an AWT Component
-     */
-    private void initHWNDcalls() {
-        Class<?> integerParemter[] = new Class<?>[1];
-        integerParemter[0] = Integer.TYPE;
-        Class<?> componentParemter[] = new Class<?>[1];
-        try {
-            componentParemter[0] = Class.forName("java.awt.Component");
-        } catch (ClassNotFoundException e) {
-            debugString("Exception: " + e.toString());
-        }
-        toolkit = Toolkit.getDefaultToolkit();
-        return;
-    }
-
-    // native window handler interface
-    private interface NativeWindowHandler {
-        public Accessible getAccessibleFromNativeWindowHandle(int nativeHandle);
-    }
-
-    // hash table of native window handle to AccessibleContext mappings
-    static private ConcurrentHashMap<Integer,AccessibleContext> windowHandleToContextMap = new ConcurrentHashMap<>();
-
-    // hash table of AccessibleContext to native window handle mappings
-    static private ConcurrentHashMap<AccessibleContext,Integer> contextToWindowHandleMap = new ConcurrentHashMap<>();
-
-    /*
-     * adds a virtual window handler to our hash tables
-     */
-    static private void registerVirtualFrame(final Accessible a,
-                                             Integer nativeWindowHandle ) {
-        if (a != null) {
-            AccessibleContext ac = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-                @Override
-                public AccessibleContext call() throws Exception {
-                    return a.getAccessibleContext();
-                }
-            }, a);
-            windowHandleToContextMap.put(nativeWindowHandle, ac);
-            contextToWindowHandleMap.put(ac, nativeWindowHandle);
-        }
-    }
-
-    /*
-     * removes a virtual window handler to our hash tables
-     */
-    static private void revokeVirtualFrame(final Accessible a,
-                                           Integer nativeWindowHandle ) {
-        AccessibleContext ac = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-            @Override
-            public AccessibleContext call() throws Exception {
-                return a.getAccessibleContext();
-            }
-        }, a);
-        windowHandleToContextMap.remove(nativeWindowHandle);
-        contextToWindowHandleMap.remove(ac);
-    }
-
-    // vector of native window handlers
-    private static Vector<NativeWindowHandler> nativeWindowHandlers = new Vector<>();
-
-    /*
-    * adds a native window handler to our list
-    */
-    private static void addNativeWindowHandler(NativeWindowHandler handler) {
-        if (handler == null) {
-            throw new IllegalArgumentException();
-        }
-        nativeWindowHandlers.addElement(handler);
-    }
-
-    /*
-     * removes a native window handler to our list
-     */
-    private static boolean removeNativeWindowHandler(NativeWindowHandler handler) {
-        if (handler == null) {
-            throw new IllegalArgumentException();
-        }
-        return nativeWindowHandlers.removeElement(handler);
-    }
-
-    /**
-     * verifies that a native window handle is a Java window
-     */
-    private boolean isJavaWindow(int nativeHandle) {
-        AccessibleContext ac = getContextFromNativeWindowHandle(nativeHandle);
-        if (ac != null) {
-            saveContextToWindowHandleMapping(ac, nativeHandle);
-            return true;
-        }
-        return false;
-    }
-
-    /*
-     * saves the mapping between an AccessibleContext and a window handle
-     */
-    private void saveContextToWindowHandleMapping(AccessibleContext ac,
-                                                  int nativeHandle) {
-        debugString("saveContextToWindowHandleMapping...");
-        if (ac == null) {
-            return;
-        }
-        if (! contextToWindowHandleMap.containsKey(ac)) {
-            debugString("saveContextToWindowHandleMapping: ac = "+ac+"; handle = "+nativeHandle);
-            contextToWindowHandleMap.put(ac, nativeHandle);
-        }
-    }
-
-    /**
-     * maps a native window handle to an Accessible Context
-     */
-    private AccessibleContext getContextFromNativeWindowHandle(int nativeHandle) {
-        // First, look for the Accessible in our hash table of
-        // virtual window handles.
-        AccessibleContext ac = windowHandleToContextMap.get(nativeHandle);
-        if(ac!=null) {
-            saveContextToWindowHandleMapping(ac, nativeHandle);
-            return ac;
-        }
-
-        // Next, look for the native window handle in our vector
-        // of native window handles.
-        int numHandlers = nativeWindowHandlers.size();
-        for (int i = 0; i < numHandlers; i++) {
-            NativeWindowHandler nextHandler = nativeWindowHandlers.elementAt(i);
-            final Accessible a = nextHandler.getAccessibleFromNativeWindowHandle(nativeHandle);
-            if (a != null) {
-                ac = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-                    @Override
-                    public AccessibleContext call() throws Exception {
-                        return a.getAccessibleContext();
-                    }
-                }, a);
-                saveContextToWindowHandleMapping(ac, nativeHandle);
-                return ac;
-            }
-        }
-        // Not found.
-        return null;
-    }
-
-    /**
-     * maps an AccessibleContext to a native window handle
-     *     returns 0 on error
-     */
-    private int getNativeWindowHandleFromContext(AccessibleContext ac) {
-    debugString("getNativeWindowHandleFromContext: ac = "+ac);
-        try {
-            return contextToWindowHandleMap.get(ac);
-        } catch (Exception ex) {
-            return 0;
-        }
-    }
-
-    private class DefaultNativeWindowHandler implements NativeWindowHandler {
-        /*
-        * returns the Accessible associated with a native window
-        */
-        public Accessible getAccessibleFromNativeWindowHandle(int nativeHandle) {
-            final Component c = jawtGetComponentFromNativeWindowHandle(nativeHandle);
-            if (c instanceof Accessible) {
-                AccessibleContext ac = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-                    @Override
-                    public AccessibleContext call() throws Exception {
-                        return c.getAccessibleContext();
-                    }
-                }, c);
-                saveContextToWindowHandleMapping(ac, nativeHandle);
-                return (Accessible)c;
-            } else {
-                return null;
-            }
-        }
-    }
-
-    /* ===== AccessibleContext methods =====*/
-
-    /*
-     * returns the inner-most AccessibleContext in parent at Point(x, y)
-     */
-    private AccessibleContext getAccessibleContextAt(int x, int y,
-                                                    AccessibleContext parent) {
-        if (parent == null) {
-            return null;
-        }
-        if (windowHandleToContextMap != null &&
-            windowHandleToContextMap.containsValue(getRootAccessibleContext(parent))) {
-            // Path for applications that register their top-level
-            // windows with the AccessBridge (e.g., StarOffice 6.1)
-            return getAccessibleContextAt_1(x, y, parent);
-        } else {
-            // Path for applications that do not register
-            // their top-level windows with the AccessBridge
-            // (e.g., Swing/AWT applications)
-            return getAccessibleContextAt_2(x, y, parent);
-        }
-    }
-
-    /*
-     * returns the root accessible context
-     */
-    private AccessibleContext getRootAccessibleContext(final AccessibleContext ac) {
-        if (ac == null) {
-            return null;
-        }
-        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-            @Override
-            public AccessibleContext call() throws Exception {
-                Accessible parent = ac.getAccessibleParent();
-                if (parent == null) {
-                    return ac;
-                }
-                Accessible tmp = parent.getAccessibleContext().getAccessibleParent();
-                while (tmp != null) {
-                    parent = tmp;
-                    tmp = parent.getAccessibleContext().getAccessibleParent();
-                }
-                return parent.getAccessibleContext();
-            }
-        }, ac);
-    }
-
-    /*
-     * StarOffice version that does not use the EventQueueMonitor
-     */
-    private AccessibleContext getAccessibleContextAt_1(final int x, final int y,
-                                                      final AccessibleContext parent) {
-        debugString(" : getAccessibleContextAt_1 called");
-        debugString("   -> x = " + x + " y = " + y + " parent = " + parent);
-
-        if (parent == null) return null;
-            final AccessibleComponent acmp = InvocationUtils.invokeAndWait(new Callable<AccessibleComponent>() {
-                @Override
-                public AccessibleComponent call() throws Exception {
-                    return parent.getAccessibleComponent();
-                }
-            }, parent);
-        if (acmp!=null) {
-            final Point loc = InvocationUtils.invokeAndWait(new Callable<Point>() {
-                @Override
-                public Point call() throws Exception {
-                    return acmp.getLocation();
-                }
-            }, parent);
-            final Accessible a = InvocationUtils.invokeAndWait(new Callable<Accessible>() {
-                @Override
-                public Accessible call() throws Exception {
-                    return acmp.getAccessibleAt(new Point(x - loc.x, y - loc.y));
-                }
-            }, parent);
-            if (a != null) {
-                AccessibleContext foundAC = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-                    @Override
-                    public AccessibleContext call() throws Exception {
-                        return a.getAccessibleContext();
-                    }
-                }, parent);
-                if (foundAC != null) {
-                    if (foundAC != parent) {
-                        // recurse down into the child
-                        return getAccessibleContextAt_1(x - loc.x, y - loc.y,
-                                                        foundAC);
-                    } else
-                        return foundAC;
-                }
-            }
-        }
-        return parent;
-    }
-
-    /*
-     * AWT/Swing version
-     */
-    private AccessibleContext getAccessibleContextAt_2(final int x, final int y,
-                                                      AccessibleContext parent) {
-        debugString("getAccessibleContextAt_2 called");
-        debugString("   -> x = " + x + " y = " + y + " parent = " + parent);
-
-        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-            @Override
-            public AccessibleContext call() throws Exception {
-                Accessible a = EventQueueMonitor.getAccessibleAt(new Point(x, y));
-                if (a != null) {
-                    AccessibleContext childAC = a.getAccessibleContext();
-                    if (childAC != null) {
-                        debugString("   returning childAC = " + childAC);
-                        return childAC;
-                    }
-                }
-                return null;
-            }
-        }, parent);
-    }
-
-    /**
-     * returns the Accessible that has focus
-     */
-    private AccessibleContext getAccessibleContextWithFocus() {
-        Component c = AWTEventMonitor.getComponentWithFocus();
-        if (c != null) {
-            final Accessible a = Translator.getAccessible(c);
-            if (a != null) {
-                AccessibleContext ac = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-                    @Override
-                    public AccessibleContext call() throws Exception {
-                        return a.getAccessibleContext();
-                    }
-                }, c);
-                if (ac != null) {
-                    return ac;
-                }
-            }
-        }
-        return null;
-    }
-
-    /**
-     * returns the AccessibleName from an AccessibleContext
-     */
-    private String getAccessibleNameFromContext(final AccessibleContext ac) {
-        debugString("***** ac = "+ac.getClass());
-        if (ac != null) {
-            String s = InvocationUtils.invokeAndWait(new Callable<String>() {
-                @Override
-                public String call() throws Exception {
-                    return ac.getAccessibleName();
-                }
-            }, ac);
-            if (s != null) {
-                references.increment(s);
-                debugString("Returning AccessibleName from Context: " + s);
-                return s;
-            } else {
-                return null;
-            }
-        } else {
-            debugString("getAccessibleNameFromContext; ac = null!");
-            return null;
-        }
-    }
-
-    /**
-     * Returns an AccessibleName for a component using an algorithm optimized
-     * for the JAWS screen reader.  This method is only intended for JAWS. All
-     * other uses are entirely optional.
-     */
-    private String getVirtualAccessibleNameFromContext(final AccessibleContext ac) {
-        if (null != ac) {
-            /*
-            Step 1:
-            =======
-            Determine if we can obtain the Virtual Accessible Name from the
-            Accessible Name or Accessible Description of the object.
-            */
-            String nameString = InvocationUtils.invokeAndWait(new Callable<String>() {
-                @Override
-                public String call() throws Exception {
-                    return ac.getAccessibleName();
-                }
-            }, ac);
-            if ( ( null != nameString ) && ( 0 != nameString.length () ) ) {
-                debugString ("bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleName.");
-                references.increment (nameString);
-                return nameString;
-            }
-            String descriptionString = InvocationUtils.invokeAndWait(new Callable<String>() {
-                @Override
-                public String call() throws Exception {
-                    return ac.getAccessibleDescription();
-                }
-            }, ac);
-            if ( ( null != descriptionString ) && ( 0 != descriptionString.length () ) ) {
-                debugString ("bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleDescription.");
-                references.increment (descriptionString);
-                return descriptionString;
-            }
-
-            debugString ("The Virtual Accessible Name was not found using AccessibleContext::getAccessibleDescription. or getAccessibleName");
-            /*
-            Step 2:
-            =======
-            Decide whether the extended name search algorithm should be
-            used for this object.
-            */
-            boolean bExtendedSearch = false;
-            AccessibleRole role = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
-                @Override
-                public AccessibleRole call() throws Exception {
-                    return ac.getAccessibleRole();
-                }
-            }, ac);
-            AccessibleContext parentContext = null;
-            AccessibleRole parentRole = AccessibleRole.UNKNOWN;
-
-            if ( extendedVirtualNameSearchRoles.contains (role) ) {
-                parentContext = getAccessibleParentFromContext (ac);
-                if ( null != parentContext ) {
-                    final AccessibleContext parentContextInnerTemp = parentContext;
-                    parentRole = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
-                        @Override
-                        public AccessibleRole call() throws Exception {
-                            return parentContextInnerTemp.getAccessibleRole();
-                        }
-                    }, ac);
-                    if ( AccessibleRole.UNKNOWN != parentRole ) {
-                        bExtendedSearch = true;
-                        if ( noExtendedVirtualNameSearchParentRoles.contains (parentRole) ) {
-                            bExtendedSearch = false;
-                        }
-                    }
-                }
-            }
-
-            if (false == bExtendedSearch) {
-                debugString ("bk -- getVirtualAccessibleNameFromContext will not use the extended name search algorithm.  role = " + role.toDisplayString (Locale.US) );
-                /*
-                Step 3:
-                =======
-                We have determined that we should not use the extended name
-                search algorithm for this object (we must obtain the name of
-                the object from the object itself and not from neighboring
-                objects).  However the object name cannot be obtained from
-                the Accessible Name or Accessible Description of the object.
-
-                Handle several special cases here that might yield a value for
-                the Virtual Accessible Name.  Return null if the object does
-                not match the criteria for any of these special cases.
-                */
-                if (AccessibleRole.LABEL == role) {
-                    /*
-                    Does the label support the Accessible Text Interface?
-                    */
-                    final AccessibleText at = InvocationUtils.invokeAndWait(new Callable<AccessibleText>() {
-                        @Override
-                        public AccessibleText call() throws Exception {
-                            return ac.getAccessibleText();
-                        }
-                    }, ac);
-                    if (null != at) {
-                        int charCount = InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                            @Override
-                            public Integer call() throws Exception {
-                                return at.getCharCount();
-                            }
-                        }, ac);
-                        String text = getAccessibleTextRangeFromContext (ac, 0, charCount);
-                        if (null != text) {
-                            debugString ("bk -- The Virtual Accessible Name was obtained from the Accessible Text of the LABEL object.");
-                            references.increment (text);
-                            return text;
-                        }
-                    }
-                    /*
-                    Does the label support the Accessible Icon Interface?
-                    */
-                    debugString ("bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information.");
-                    final AccessibleIcon [] ai = InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() {
-                        @Override
-                        public AccessibleIcon[] call() throws Exception {
-                            return ac.getAccessibleIcon();
-                        }
-                    }, ac);
-                    if ( (null != ai) && (ai.length > 0) ) {
-                        String iconDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
-                            @Override
-                            public String call() throws Exception {
-                                return ai[0].getAccessibleIconDescription();
-                            }
-                        }, ac);
-                        if (iconDescription != null){
-                            debugString ("bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the LABEL object.");
-                            references.increment (iconDescription);
-                            return iconDescription;
-                        }
-                    } else {
-                        parentContext = getAccessibleParentFromContext (ac);
-                        if ( null != parentContext ) {
-                            final AccessibleContext parentContextInnerTemp = parentContext;
-                            parentRole = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
-                                @Override
-                                public AccessibleRole call() throws Exception {
-                                    return parentContextInnerTemp.getAccessibleRole();
-                                }
-                            }, ac);
-                            if ( AccessibleRole.TABLE == parentRole ) {
-                                int indexInParent = InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                                    @Override
-                                    public Integer call() throws Exception {
-                                        return ac.getAccessibleIndexInParent();
-                                    }
-                                }, ac);
-                                final AccessibleContext acTableCell = getAccessibleChildFromContext (parentContext, indexInParent);
-                                debugString ("bk -- Making a second attempt to obtain the Virtual Accessible Name from the Accessible Icon information for the Table Cell.");
-                                if (acTableCell != null) {
-                                    final AccessibleIcon [] aiRet =InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() {
-                                        @Override
-                                        public AccessibleIcon[] call() throws Exception {
-                                            return acTableCell.getAccessibleIcon();
-                                        }
-                                    }, ac);
-                                    if ( (null != aiRet) && (aiRet.length > 0) ) {
-                                        String iconDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
-                                            @Override
-                                            public String call() throws Exception {
-                                                return aiRet[0].getAccessibleIconDescription();
-                                            }
-                                        }, ac);
-                                        if (iconDescription != null){
-                                            debugString ("bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the Table Cell object.");
-                                            references.increment (iconDescription);
-                                            return iconDescription;
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                } else if ( (AccessibleRole.TOGGLE_BUTTON == role) ||
-                            (AccessibleRole.PUSH_BUTTON == role) ) {
-                    /*
-                    Does the button support the Accessible Icon Interface?
-                    */
-                    debugString ("bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information.");
-                    final AccessibleIcon [] ai = InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() {
-                        @Override
-                        public AccessibleIcon[] call() throws Exception {
-                            return ac.getAccessibleIcon();
-                        }
-                    }, ac);
-                    if ( (null != ai) && (ai.length > 0) ) {
-                        String iconDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
-                            @Override
-                            public String call() throws Exception {
-                                return ai[0].getAccessibleIconDescription();
-                            }
-                        }, ac);
-                        if (iconDescription != null){
-                            debugString ("bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the TOGGLE_BUTTON or PUSH_BUTTON object.");
-                            references.increment (iconDescription);
-                            return iconDescription;
-                        }
-                    }
-                } else if ( AccessibleRole.CHECK_BOX == role ) {
-                    /*
-                    NOTE: The only case I know of in which a check box does not
-                    have a name is when that check box is contained in a table.
-
-                    In this case it would be appropriate to use the display string
-                    of the check box object as the name (in US English the display
-                    string is typically either "true" or "false").
-
-                    I am using the AccessibleValue interface to obtain the display
-                    string of the check box.  If the Accessible Value is 1, I am
-                    returning Boolean.TRUE.toString (),  If the Accessible Value is
-                    0, I am returning Boolean.FALSE.toString ().  If the Accessible
-                    Value is some other number, I will return the display string of
-                    the current numerical value of the check box.
-                    */
-                    final AccessibleValue av = InvocationUtils.invokeAndWait(new Callable<AccessibleValue>() {
-                        @Override
-                        public AccessibleValue call() throws Exception {
-                            return ac.getAccessibleValue();
-                        }
-                    }, ac);
-                    if ( null != av ) {
-                        nameString = null;
-                        Number value = InvocationUtils.invokeAndWait(new Callable<Number>() {
-                            @Override
-                            public Number call() throws Exception {
-                                return av.getCurrentAccessibleValue();
-                            }
-                        }, ac);
-                        if ( null != value ) {
-                            if ( 1 == value.intValue () ) {
-                                nameString = Boolean.TRUE.toString ();
-                            } else if ( 0 == value.intValue () ) {
-                                nameString = Boolean.FALSE.toString ();
-                            } else {
-                                nameString = value.toString ();
-                            }
-                            if ( null != nameString ) {
-                                references.increment (nameString);
-                                return nameString;
-                            }
-                        }
-                    }
-                }
-                return null;
-            }
-
-            /*
-            +
-            Beginning of the extended name search
-            +
-            */
-            final AccessibleContext parentContextOuterTemp = parentContext;
-            String parentName = InvocationUtils.invokeAndWait(new Callable<String>() {
-                @Override
-                public String call() throws Exception {
-                    return parentContextOuterTemp.getAccessibleName();
-                }
-            }, ac);
-            String parentDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
-                @Override
-                public String call() throws Exception {
-                    return parentContextOuterTemp.getAccessibleDescription();
-                }
-            }, ac);
-
-            /*
-            Step 4:
-            =======
-            Special case for Slider Bar objects.
-            */
-            if ( (AccessibleRole.SLIDER == role) &&
-                 (AccessibleRole.PANEL == parentRole) &&
-                 (null != parentName) ) {
-                debugString ("bk -- The Virtual Accessible Name was obtained from the Accessible Name of the SLIDER object's parent object.");
-                references.increment (parentName);
-                return parentName;
-            }
-
-            boolean bIsEditCombo = false;
-
-            AccessibleContext testContext = ac;
-            /*
-            Step 5:
-            =======
-            Special case for Edit Combo Boxes
-            */
-            if ( (AccessibleRole.TEXT == role) &&
-                 (AccessibleRole.COMBO_BOX == parentRole) ) {
-                bIsEditCombo = true;
-                if (null != parentName) {
-                    debugString ("bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Name of the object's parent object.");
-                    references.increment (parentName);
-                    return parentName;
-                } else if (null != parentDescription) {
-                    debugString ("bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Description of the object's parent object.");
-                    references.increment (parentDescription);
-                    return parentDescription;
-                }
-                testContext = parentContext;
-                parentRole = AccessibleRole.UNKNOWN;
-                parentContext = getAccessibleParentFromContext (testContext);
-                if ( null != parentContext ) {
-                    final AccessibleContext parentContextInnerTemp = parentContext;
-                    parentRole = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
-                        @Override
-                        public AccessibleRole call() throws Exception {
-                            return parentContextInnerTemp.getAccessibleRole();
-                        }
-                    }, ac);
-                }
-            }
-
-            /*
-            Step 6:
-            =======
-            Attempt to get the Virtual Accessible Name of the object using the
-            Accessible Relation Set Info (the LABELED_BY Accessible Relation).
-            */
-            {
-                final AccessibleContext parentContextTempInner = parentContext;
-                AccessibleRelationSet ars = InvocationUtils.invokeAndWait(new Callable<AccessibleRelationSet>() {
-                    @Override
-                    public AccessibleRelationSet call() throws Exception {
-                        return parentContextTempInner.getAccessibleRelationSet();
-                    }
-                }, ac);
-                if ( ars != null && (ars.size () > 0) && (ars.contains (AccessibleRelation.LABELED_BY)) ) {
-                    AccessibleRelation labeledByRelation = ars.get (AccessibleRelation.LABELED_BY);
-                    if (labeledByRelation != null) {
-                        Object [] targets = labeledByRelation.getTarget ();
-                        Object o = targets [0];
-                        if (o instanceof Accessible) {
-                            AccessibleContext labelContext = ((Accessible)o).getAccessibleContext ();
-                            if (labelContext != null) {
-                                String labelName = labelContext.getAccessibleName ();
-                                String labelDescription = labelContext.getAccessibleDescription ();
-                                if (null != labelName) {
-                                    debugString ("bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Name Case.");
-                                    references.increment (labelName);
-                                    return labelName;
-                                } else if (null != labelDescription) {
-                                    debugString ("bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Description Case.");
-                                    references.increment (labelDescription);
-                                    return labelDescription;
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-
-            //Note: add AccessibleContext to use InvocationUtils.invokeAndWait
-            /*
-            Step 7:
-            =======
-            Search for a label object that is positioned either just to the left
-            or just above the object and get the Accessible Name of the Label
-            object.
-            */
-            int testIndexMax = 0;
-            int testX = 0;
-            int testY = 0;
-            int testWidth = 0;
-            int testHeight = 0;
-            int targetX = 0;
-            int targetY = 0;
-            final AccessibleContext tempContext = testContext;
-            int testIndex = InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                @Override
-                public Integer call() throws Exception {
-                    return tempContext.getAccessibleIndexInParent();
-                }
-            }, ac);
-            if ( null != parentContext ) {
-                final AccessibleContext parentContextInnerTemp = parentContext;
-                testIndexMax =  InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                    @Override
-                    public Integer call() throws Exception {
-                        return parentContextInnerTemp.getAccessibleChildrenCount() - 1;
-                    }
-                }, ac);
-            }
-            testX = getAccessibleXcoordFromContext (testContext);
-            testY = getAccessibleYcoordFromContext (testContext);
-            testWidth = getAccessibleWidthFromContext (testContext);
-            testHeight = getAccessibleHeightFromContext (testContext);
-            targetX = testX + 2;
-            targetY = testY + 2;
-
-            int childIndex = testIndex - 1;
-            /*Accessible child = null;
-            AccessibleContext childContext = null;
-            AccessibleRole childRole = AccessibleRole.UNKNOWN;*/
-            int childX = 0;
-            int childY = 0;
-            int childWidth = 0;
-            int childHeight = 0;
-            String childName = null;
-            String childDescription = null;
-            while (childIndex >= 0) {
-                final int childIndexTemp = childIndex;
-                final AccessibleContext parentContextInnerTemp = parentContext;
-                final Accessible child  =  InvocationUtils.invokeAndWait(new Callable<Accessible>() {
-                    @Override
-                    public Accessible call() throws Exception {
-                        return parentContextInnerTemp.getAccessibleChild(childIndexTemp);
-                    }
-                }, ac);
-                if ( null != child ) {
-                    final AccessibleContext childContext = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-                        @Override
-                        public AccessibleContext call() throws Exception {
-                            return child.getAccessibleContext();
-                        }
-                    }, ac);
-                    if ( null != childContext ) {
-                        AccessibleRole childRole = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
-                            @Override
-                            public AccessibleRole call() throws Exception {
-                                return childContext.getAccessibleRole();
-                            }
-                        }, ac);
-                        if ( AccessibleRole.LABEL == childRole ) {
-                            childX = getAccessibleXcoordFromContext (childContext);
-                            childY = getAccessibleYcoordFromContext (childContext);
-                            childWidth = getAccessibleWidthFromContext (childContext);
-                            childHeight = getAccessibleHeightFromContext (childContext);
-                            if ( (childX < testX) &&
-                                 ((childY <= targetY) && (targetY <= (childY + childHeight))) ) {
-                                childName = InvocationUtils.invokeAndWait(new Callable<String>() {
-                                    @Override
-                                    public String call() throws Exception {
-                                        return childContext.getAccessibleName();
-                                    }
-                                }, ac);
-                                if ( null != childName ) {
-                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object.");
-                                    references.increment (childName);
-                                    return childName;
-                                }
-                                childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
-                                    @Override
-                                    public String call() throws Exception {
-                                        return childContext.getAccessibleDescription();
-                                    }
-                                }, ac);
-                                if ( null != childDescription ) {
-                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object.");
-                                    references.increment (childDescription);
-                                    return childDescription;
-                                }
-                            } else if ( (childY < targetY) &&
-                                        ((childX <= targetX) && (targetX <= (childX + childWidth))) ) {
-                                childName = InvocationUtils.invokeAndWait(new Callable<String>() {
-                                    @Override
-                                    public String call() throws Exception {
-                                        return childContext.getAccessibleName();
-                                    }
-                                }, ac);
-                                if ( null != childName ) {
-                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object.");
-                                    references.increment (childName);
-                                    return childName;
-                                }
-                                childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
-                                    @Override
-                                    public String call() throws Exception {
-                                        return childContext.getAccessibleDescription();
-                                    }
-                                }, ac);
-                                if ( null != childDescription ) {
-                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object.");
-                                    references.increment (childDescription);
-                                    return childDescription;
-                                }
-                            }
-                        }
-                    }
-                }
-                childIndex --;
-            }
-            childIndex = testIndex + 1;
-            while (childIndex <= testIndexMax) {
-                final int childIndexTemp = childIndex;
-                final AccessibleContext parentContextInnerTemp = parentContext;
-                final Accessible child  =  InvocationUtils.invokeAndWait(new Callable<Accessible>() {
-                    @Override
-                    public Accessible call() throws Exception {
-                        return parentContextInnerTemp.getAccessibleChild(childIndexTemp);
-                    }
-                }, ac);
-                if ( null != child ) {
-                    final AccessibleContext childContext = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-                        @Override
-                        public AccessibleContext call() throws Exception {
-                            return child.getAccessibleContext();
-                        }
-                    }, ac);
-                    if ( null != childContext ) {
-                        AccessibleRole childRole = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
-                            @Override
-                            public AccessibleRole call() throws Exception {
-                                return childContext.getAccessibleRole();
-                            }
-                        }, ac);
-                        if ( AccessibleRole.LABEL == childRole ) {
-                            childX = getAccessibleXcoordFromContext (childContext);
-                            childY = getAccessibleYcoordFromContext (childContext);
-                            childWidth = getAccessibleWidthFromContext (childContext);
-                            childHeight = getAccessibleHeightFromContext (childContext);
-                            if ( (childX < testX) &&
-                                 ((childY <= targetY) && (targetY <= (childY + childHeight))) ) {
-                                childName = InvocationUtils.invokeAndWait(new Callable<String>() {
-                                    @Override
-                                    public String call() throws Exception {
-                                        return childContext.getAccessibleName();
-                                    }
-                                }, ac);
-                                if ( null != childName ) {
-                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object.");
-                                    references.increment (childName);
-                                    return childName;
-                                }
-                                childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
-                                    @Override
-                                    public String call() throws Exception {
-                                        return childContext.getAccessibleDescription();
-                                    }
-                                }, ac);
-                                if ( null != childDescription ) {
-                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object.");
-                                    references.increment (childDescription);
-                                    return childDescription;
-                                }
-                            } else if ( (childY < targetY) &&
-                                        ((childX <= targetX) && (targetX <= (childX + childWidth))) ) {
-                                childName = InvocationUtils.invokeAndWait(new Callable<String>() {
-                                    @Override
-                                    public String call() throws Exception {
-                                        return childContext.getAccessibleName();
-                                    }
-                                }, ac);
-                                if ( null != childName ) {
-                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object.");
-                                    references.increment (childName);
-                                    return childName;
-                                }
-                                childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
-                                    @Override
-                                    public String call() throws Exception {
-                                        return childContext.getAccessibleDescription();
-                                    }
-                                }, ac);
-                                if ( null != childDescription ) {
-                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object.");
-                                    references.increment (childDescription);
-                                    return childDescription;
-                                }
-                            }
-                        }
-                    }
-                }
-                childIndex ++;
-            }
-            /*
-            Step 8:
-            =======
-            Special case for combo boxes and text objects, based on a
-            similar special case I found in some of our internal JAWS code.
-
-            Search for a button object that is positioned either just to the left
-            or just above the object and get the Accessible Name of the button
-            object.
-            */
-            if ( (AccessibleRole.TEXT == role) ||
-                 (AccessibleRole.COMBO_BOX == role) ||
-                 (bIsEditCombo) ) {
-                childIndex = testIndex - 1;
-                while (childIndex >= 0) {
-                    final int childIndexTemp = childIndex;
-                    final AccessibleContext parentContextInnerTemp = parentContext;
-                    final Accessible child = InvocationUtils.invokeAndWait(new Callable<Accessible>() {
-                        @Override
-                        public Accessible call() throws Exception {
-                            return parentContextInnerTemp.getAccessibleChild(childIndexTemp);
-                        }
-                    }, ac);
-                    if ( null != child ) {
-                        final AccessibleContext childContext = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-                            @Override
-                            public AccessibleContext call() throws Exception {
-                                return child.getAccessibleContext();
-                            }
-                        }, ac);
-                        if ( null != childContext ) {
-                            AccessibleRole childRole = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
-                                @Override
-                                public AccessibleRole call() throws Exception {
-                                    return childContext.getAccessibleRole();
-                                }
-                            }, ac);
-                            if ( ( AccessibleRole.PUSH_BUTTON == childRole ) ||
-                                 ( AccessibleRole.TOGGLE_BUTTON == childRole )) {
-                                childX = getAccessibleXcoordFromContext (childContext);
-                                childY = getAccessibleYcoordFromContext (childContext);
-                                childWidth = getAccessibleWidthFromContext (childContext);
-                                childHeight = getAccessibleHeightFromContext (childContext);
-                                if ( (childX < testX) &&
-                                     ((childY <= targetY) && (targetY <= (childY + childHeight))) ) {
-                                    childName = InvocationUtils.invokeAndWait(new Callable<String>() {
-                                        @Override
-                                        public String call() throws Exception {
-                                            return childContext.getAccessibleName();
-                                        }
-                                    }, ac);
-                                    if ( null != childName ) {
-                                        debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
-                                        references.increment (childName);
-                                        return childName;
-                                    }
-                                    childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
-                                        @Override
-                                        public String call() throws Exception {
-                                            return childContext.getAccessibleDescription();
-                                        }
-                                    }, ac);
-                                    if ( null != childDescription ) {
-                                        debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
-                                        references.increment (childDescription);
-                                        return childDescription;
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    childIndex --;
-                }
-                childIndex = testIndex + 1;
-                while (childIndex <= testIndexMax) {
-                    final int childIndexTemp = childIndex;
-                    final AccessibleContext parentContextInnerTemp = parentContext;
-                    final Accessible child  =  InvocationUtils.invokeAndWait(new Callable<Accessible>() {
-                        @Override
-                        public Accessible call() throws Exception {
-                            return parentContextInnerTemp.getAccessibleChild(childIndexTemp);
-                        }
-                    }, ac);
-                    if ( null != child ) {
-                        final AccessibleContext childContext = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-                            @Override
-                            public AccessibleContext call() throws Exception {
-                                return child.getAccessibleContext();
-                            }
-                        }, ac);
-                        if ( null != childContext ) {
-                            AccessibleRole childRole = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
-                                @Override
-                                public AccessibleRole call() throws Exception {
-                                    return childContext.getAccessibleRole();
-                                }
-                            }, ac);
-                            if ( ( AccessibleRole.PUSH_BUTTON == childRole ) ||
-                                    ( AccessibleRole.TOGGLE_BUTTON == childRole ) ) {
-                                childX = getAccessibleXcoordFromContext (childContext);
-                                childY = getAccessibleYcoordFromContext (childContext);
-                                childWidth = getAccessibleWidthFromContext (childContext);
-                                childHeight = getAccessibleHeightFromContext (childContext);
-                                if ( (childX < testX) &&
-                                     ((childY <= targetY) && (targetY <= (childY + childHeight))) ) {
-                                    childName = InvocationUtils.invokeAndWait(new Callable<String>() {
-                                        @Override
-                                        public String call() throws Exception {
-                                            return childContext.getAccessibleName();
-                                        }
-                                    }, ac);
-                                    if ( null != childName ) {
-                                        debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
-                                        references.increment (childName);
-                                        return childName;
-                                    }
-                                    childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
-                                        @Override
-                                        public String call() throws Exception {
-                                            return childContext.getAccessibleDescription();
-                                        }
-                                    }, ac);
-                                    if ( null != childDescription ) {
-                                        debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
-                                        references.increment (childDescription);
-                                        return childDescription;
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    childIndex ++;
-                }
-            }
-            return null;
-        } else {
-            debugString ("AccessBridge::getVirtualAccessibleNameFromContext error - ac == null.");
-            return null;
-        }
-    }
-
-    /**
-     * returns the AccessibleDescription from an AccessibleContext
-     */
-    private String getAccessibleDescriptionFromContext(final AccessibleContext ac) {
-        if (ac != null) {
-            String s = InvocationUtils.invokeAndWait(new Callable<String>() {
-                @Override
-                public String call() throws Exception {
-                    return ac.getAccessibleDescription();
-                }
-            }, ac);
-            if (s != null) {
-                references.increment(s);
-                debugString("Returning AccessibleDescription from Context: " + s);
-                return s;
-            }
-        } else {
-            debugString("getAccessibleDescriptionFromContext; ac = null");
-        }
-        return null;
-    }
-
-    /**
-     * returns the AccessibleRole from an AccessibleContext
-     */
-    private String getAccessibleRoleStringFromContext(final AccessibleContext ac) {
-        if (ac != null) {
-            AccessibleRole role = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
-                @Override
-                public AccessibleRole call() throws Exception {
-                    return ac.getAccessibleRole();
-                }
-            }, ac);
-            if (role != null) {
-                String s = role.toDisplayString(Locale.US);
-                if (s != null) {
-                    references.increment(s);
-                    debugString("Returning AccessibleRole from Context: " + s);
-                    return s;
-                }
-            }
-        } else {
-            debugString("getAccessibleRoleStringFromContext; ac = null");
-        }
-        return null;
-    }
-
-    /**
-     * return the AccessibleRole from an AccessibleContext in the en_US locale
-     */
-    private String getAccessibleRoleStringFromContext_en_US(final AccessibleContext ac) {
-        return getAccessibleRoleStringFromContext(ac);
-    }
-
-    /**
-     * return the AccessibleStates from an AccessibleContext
-     */
-    private String getAccessibleStatesStringFromContext(final AccessibleContext ac) {
-        if (ac != null) {
-            AccessibleStateSet stateSet = InvocationUtils.invokeAndWait(new Callable<AccessibleStateSet>() {
-                @Override
-                public AccessibleStateSet call() throws Exception {
-                    return ac.getAccessibleStateSet();
-                }
-            }, ac);
-            if (stateSet != null) {
-                String s = stateSet.toString();
-                if (s != null &&
-                    s.indexOf(AccessibleState.MANAGES_DESCENDANTS.toDisplayString(Locale.US)) == -1) {
-                    // Indicate whether this component manages its own
-                    // children
-                    AccessibleRole role = ac.getAccessibleRole();
-                    if (role == AccessibleRole.LIST ||
-                        role == AccessibleRole.TABLE ||
-                        role == AccessibleRole.TREE) {
-                        s += ",";
-                        s += AccessibleState.MANAGES_DESCENDANTS.toDisplayString(Locale.US);
-                    }
-                    references.increment(s);
-                    debugString("Returning AccessibleStateSet from Context: " + s);
-                    return s;
-                }
-            }
-        } else {
-            debugString("getAccessibleStatesStringFromContext; ac = null");
-        }
-        return null;
-    }
-
-    /**
-     * returns the AccessibleStates from an AccessibleContext in the en_US locale
-     */
-    private String getAccessibleStatesStringFromContext_en_US(final AccessibleContext ac) {
-        if (ac != null) {
-            AccessibleStateSet stateSet = InvocationUtils.invokeAndWait(new Callable<AccessibleStateSet>() {
-                @Override
-                public AccessibleStateSet call() throws Exception {
-                    return ac.getAccessibleStateSet();
-                }
-            }, ac);
-            if (stateSet != null) {
-                String s = "";
-                AccessibleState[] states = stateSet.toArray();
-                if (states != null && states.length > 0) {
-                    s = states[0].toDisplayString(Locale.US);
-                    for (int i = 1; i < states.length; i++) {
-                        s = s + "," + states[i].toDisplayString(Locale.US);
-                    }
-                }
-                references.increment(s);
-                debugString("Returning AccessibleStateSet en_US from Context: " + s);
-                return s;
-            }
-        }
-        debugString("getAccessibleStatesStringFromContext; ac = null");
-        return null;
-    }
-
-    /**
-     * returns the AccessibleParent from an AccessibleContext
-     */
-    private AccessibleContext getAccessibleParentFromContext(final AccessibleContext ac) {
-        if (ac==null)
-            return null;
-        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-            @Override
-            public AccessibleContext call() throws Exception {
-                Accessible a = ac.getAccessibleParent();
-                if (a != null) {
-                    AccessibleContext apc = a.getAccessibleContext();
-                    if (apc != null) {
-                        return apc;
-                    }
-                }
-                return null;
-            }
-        }, ac);
-    }
-
-    /**
-     * returns the AccessibleIndexInParent from an AccessibleContext
-     */
-    private int getAccessibleIndexInParentFromContext(final AccessibleContext ac) {
-        if (ac==null)
-            return -1;
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                return ac.getAccessibleIndexInParent();
-            }
-        }, ac);
-    }
-
-    /**
-     * returns the AccessibleChild count from an AccessibleContext
-     */
-    private int getAccessibleChildrenCountFromContext(final AccessibleContext ac) {
-        if (ac==null)
-            return -1;
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                return ac.getAccessibleChildrenCount();
-            }
-        }, ac);
-    }
-
-    /**
-     * returns the AccessibleChild Context from an AccessibleContext
-     */
-    private AccessibleContext getAccessibleChildFromContext(final AccessibleContext ac, final int index) {
-
-        if (ac == null) {
-            return null;
-        }
-
-        final JTable table = InvocationUtils.invokeAndWait(new Callable<JTable>() {
-            @Override
-            public JTable call() throws Exception {
-                // work-around for AccessibleJTable.getCurrentAccessibleContext returning
-                // wrong renderer component when cell contains more than one component
-                Accessible parent = ac.getAccessibleParent();
-                if (parent != null) {
-                    int indexInParent = ac.getAccessibleIndexInParent();
-                    Accessible child =
-                            parent.getAccessibleContext().getAccessibleChild(indexInParent);
-                    if (child instanceof JTable) {
-                        return (JTable) child;
-                    }
-                }
-                return null;
-            }
-        }, ac);
-
-        if (table == null) {
-            return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-                @Override
-                public AccessibleContext call() throws Exception {
-                    Accessible a = ac.getAccessibleChild(index);
-                    if (a != null) {
-                        return a.getAccessibleContext();
-                    }
-                    return null;
-                }
-            }, ac);
-        }
-
-        final AccessibleTable at = getAccessibleTableFromContext(ac);
-
-        final int row = getAccessibleTableRow(at, index);
-        final int column = getAccessibleTableColumn(at, index);
-
-        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-            @Override
-            public AccessibleContext call() throws Exception {
-                TableCellRenderer renderer = table.getCellRenderer(row, column);
-                if (renderer == null) {
-                    Class<?> columnClass = table.getColumnClass(column);
-                    renderer = table.getDefaultRenderer(columnClass);
-                }
-                Component component =
-                        renderer.getTableCellRendererComponent(table, table.getValueAt(row, column),
-                                false, false, row, column);
-                if (component instanceof Accessible) {
-                    return component.getAccessibleContext();
-                }
-                return null;
-            }
-        }, ac);
-    }
-
-    /**
-     * returns the AccessibleComponent bounds on screen from an AccessibleContext
-     */
-    private Rectangle getAccessibleBoundsOnScreenFromContext(final AccessibleContext ac) {
-        if(ac==null)
-            return null;
-        return InvocationUtils.invokeAndWait(new Callable<Rectangle>() {
-            @Override
-            public Rectangle call() throws Exception {
-                AccessibleComponent acmp = ac.getAccessibleComponent();
-                if (acmp != null) {
-                    Rectangle r = acmp.getBounds();
-                    if (r != null) {
-                        try {
-                            Point p = acmp.getLocationOnScreen();
-                            if (p != null) {
-                                r.x = p.x;
-                                r.y = p.y;
-                                return r;
-                            }
-                        } catch (Exception e) {
-                            return null;
-                        }
-                    }
-                }
-                return null;
-            }
-        }, ac);
-    }
-
-    /**
-     * returns the AccessibleComponent x-coord from an AccessibleContext
-     */
-    private int getAccessibleXcoordFromContext(AccessibleContext ac) {
-        if (ac != null) {
-            Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
-            if (r != null) {
-                debugString(" - Returning Accessible x coord from Context: " + r.x);
-                return r.x;
-            }
-        } else {
-            debugString("getAccessibleXcoordFromContext ac = null");
-        }
-        return -1;
-    }
-
-    /**
-     * returns the AccessibleComponent y-coord from an AccessibleContext
-     */
-    private int getAccessibleYcoordFromContext(AccessibleContext ac) {
-        debugString("getAccessibleYcoordFromContext() called");
-        if (ac != null) {
-            Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
-            if (r != null) {
-                return r.y;
-            }
-        } else {
-        debugString("getAccessibleYcoordFromContext; ac = null");
-        }
-        return -1;
-    }
-
-    /**
-     * returns the AccessibleComponent height from an AccessibleContext
-     */
-    private int getAccessibleHeightFromContext(AccessibleContext ac) {
-        if (ac != null) {
-            Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
-            if (r != null) {
-                return r.height;
-            }
-        } else {
-            debugString("getAccessibleHeightFromContext; ac = null");
-        }
-        return -1;
-    }
-
-    /**
-     * returns the AccessibleComponent width from an AccessibleContext
-     */
-    private int getAccessibleWidthFromContext(AccessibleContext ac) {
-        if (ac != null) {
-            Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
-            if (r != null) {
-                return r.width;
-            }
-        } else {
-            debugString("getAccessibleWidthFromContext; ac = null");
-        }
-        return -1;
-    }
-
-
-    /**
-     * returns the AccessibleComponent from an AccessibleContext
-     */
-    private AccessibleComponent getAccessibleComponentFromContext(AccessibleContext ac) {
-        if (ac != null) {
-            AccessibleComponent acmp = ac.getAccessibleComponent();
-            if (acmp != null) {
-                debugString("Returning AccessibleComponent Context");
-                return acmp;
-            }
-        } else {
-            debugString("getAccessibleComponentFromContext; ac = null");
-        }
-        return null;
-    }
-
-    /**
-     * returns the AccessibleAction from an AccessibleContext
-     */
-    private AccessibleAction getAccessibleActionFromContext(final AccessibleContext ac) {
-        debugString("Returning AccessibleAction Context");
-        return ac == null ? null : InvocationUtils.invokeAndWait(new Callable<AccessibleAction>() {
-            @Override
-            public AccessibleAction call() throws Exception {
-                return ac.getAccessibleAction();
-            }
-        }, ac);
-    }
-
-    /**
-     * returns the AccessibleSelection from an AccessibleContext
-     */
-    private AccessibleSelection getAccessibleSelectionFromContext(final AccessibleContext ac) {
-        return ac == null ? null : InvocationUtils.invokeAndWait(new Callable<AccessibleSelection>() {
-            @Override
-            public AccessibleSelection call() throws Exception {
-                return ac.getAccessibleSelection();
-            }
-        }, ac);
-    }
-
-    /**
-     * return the AccessibleText from an AccessibleContext
-     */
-    private AccessibleText getAccessibleTextFromContext(final AccessibleContext ac) {
-        return ac == null ? null : InvocationUtils.invokeAndWait(new Callable<AccessibleText>() {
-            @Override
-            public AccessibleText call() throws Exception {
-                return ac.getAccessibleText();
-            }
-        }, ac);
-    }
-
-    /**
-     * return the AccessibleComponent from an AccessibleContext
-     */
-    private AccessibleValue getAccessibleValueFromContext(final AccessibleContext ac) {
-        return ac == null ? null : InvocationUtils.invokeAndWait(new Callable<AccessibleValue>() {
-            @Override
-            public AccessibleValue call() throws Exception {
-                return ac.getAccessibleValue();
-            }
-        }, ac);
-    }
-
-    /* ===== AccessibleText methods ===== */
-
-    /**
-     * returns the bounding rectangle for the text cursor
-     * XXX
-     */
-    private Rectangle getCaretLocation(final AccessibleContext ac) {
-    debugString("getCaretLocation");
-        if (ac==null)
-            return null;
-        return InvocationUtils.invokeAndWait(new Callable<Rectangle>() {
-            @Override
-            public Rectangle call() throws Exception {
-                // workaround for JAAPI not returning cursor bounding rectangle
-                Rectangle r = null;
-                Accessible parent = ac.getAccessibleParent();
-                if (parent instanceof Accessible) {
-                    int indexInParent = ac.getAccessibleIndexInParent();
-                    Accessible child =
-                            parent.getAccessibleContext().getAccessibleChild(indexInParent);
-
-                    if (child instanceof JTextComponent) {
-                        JTextComponent text = (JTextComponent) child;
-                        try {
-                            r = text.modelToView(text.getCaretPosition());
-                            if (r != null) {
-                                Point p = text.getLocationOnScreen();
-                                r.translate(p.x, p.y);
-                            }
-                        } catch (BadLocationException ble) {
-                        }
-                    }
-                }
-                return r;
-            }
-        }, ac);
-    }
-
-    /**
-     * returns the x-coordinate for the text cursor rectangle
-     */
-    private int getCaretLocationX(AccessibleContext ac) {
-        Rectangle r = getCaretLocation(ac);
-        if (r != null) {
-            return r.x;
-        } else {
-            return -1;
-        }
-    }
-
-    /**
-     * returns the y-coordinate for the text cursor rectangle
-     */
-    private int getCaretLocationY(AccessibleContext ac) {
-        Rectangle r = getCaretLocation(ac);
-        if (r != null) {
-            return r.y;
-        } else {
-            return -1;
-        }
-    }
-
-    /**
-     * returns the height for the text cursor rectangle
-     */
-    private int getCaretLocationHeight(AccessibleContext ac) {
-        Rectangle r = getCaretLocation(ac);
-        if (r != null) {
-            return r.height;
-        } else {
-            return -1;
-        }
-    }
-
-    /**
-     * returns the width for the text cursor rectangle
-     */
-    private int getCaretLocationWidth(AccessibleContext ac) {
-        Rectangle r = getCaretLocation(ac);
-        if (r != null) {
-            return r.width;
-        } else {
-            return -1;
-        }
-    }
-
-    /**
-     * returns the character count from an AccessibleContext
-     */
-    private int getAccessibleCharCountFromContext(final AccessibleContext ac) {
-        if (ac==null)
-            return -1;
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                AccessibleText at = ac.getAccessibleText();
-                if (at != null) {
-                    return at.getCharCount();
-                }
-                return -1;
-            }
-        }, ac);
-    }
-
-    /**
-     * returns the caret position from an AccessibleContext
-     */
-    private int getAccessibleCaretPositionFromContext(final AccessibleContext ac) {
-        if (ac==null)
-            return -1;
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                AccessibleText at = ac.getAccessibleText();
-                if (at != null) {
-                    return at.getCaretPosition();
-                }
-                return -1;
-            }
-        }, ac);
-    }
-
-    /**
-     * Return the index at a specific point from an AccessibleContext
-     * Point(x, y) is in screen coordinates.
-     */
-    private int getAccessibleIndexAtPointFromContext(final AccessibleContext ac,
-                                                    final int x, final int y) {
-        debugString("getAccessibleIndexAtPointFromContext: x = "+x+"; y = "+y);
-        if (ac==null)
-            return -1;
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                AccessibleText at = ac.getAccessibleText();
-                AccessibleComponent acomp = ac.getAccessibleComponent();
-                if (at != null && acomp != null) {
-                    // Convert x and y from screen coordinates to
-                    // local coordinates.
-                    try {
-                        Point p = acomp.getLocationOnScreen();
-                        int x1, y1;
-                        if (p != null) {
-                            x1 = x - p.x;
-                            if (x1 < 0) {
-                                x1 = 0;
-                            }
-                            y1 = y - p.y;
-                            if (y1 < 0) {
-                                y1 = 0;
-                            }
-
-                            Point newPoint = new Point(x1, y1);
-                            int indexAtPoint = at.getIndexAtPoint(new Point(x1, y1));
-                            return indexAtPoint;
-                        }
-                    } catch (Exception e) {
-                    }
-                }
-                return -1;
-            }
-        }, ac);
-    }
-
-    /**
-     * return the letter at a specific point from an AccessibleContext
-     */
-    private String getAccessibleLetterAtIndexFromContext(final AccessibleContext ac, final int index) {
-        if (ac != null) {
-            String s = InvocationUtils.invokeAndWait(new Callable<String>() {
-                @Override
-                public String call() throws Exception {
-                    AccessibleText at = ac.getAccessibleText();
-                    if (at == null) return null;
-                    return at.getAtIndex(AccessibleText.CHARACTER, index);
-                }
-            }, ac);
-            if (s != null) {
-                references.increment(s);
-                return s;
-            }
-        } else {
-            debugString("getAccessibleLetterAtIndexFromContext; ac = null");
-        }
-        return null;
-    }
-
-    /**
-     * return the word at a specific point from an AccessibleContext
-     */
-    private String getAccessibleWordAtIndexFromContext(final AccessibleContext ac, final int index) {
-        if (ac != null) {
-            String s = InvocationUtils.invokeAndWait(new Callable<String>() {
-                @Override
-                public String call() throws Exception {
-                    AccessibleText at = ac.getAccessibleText();
-                    if (at == null) return null;
-                    return at.getAtIndex(AccessibleText.WORD, index);
-                }
-            }, ac);
-            if (s != null) {
-                references.increment(s);
-                return s;
-            }
-        } else {
-            debugString("getAccessibleWordAtIndexFromContext; ac = null");
-        }
-        return null;
-    }
-
-    /**
-     * return the sentence at a specific point from an AccessibleContext
-     */
-    private String getAccessibleSentenceAtIndexFromContext(final AccessibleContext ac, final int index) {
-        if (ac != null) {
-            String s = InvocationUtils.invokeAndWait(new Callable<String>() {
-                @Override
-                public String call() throws Exception {
-                    AccessibleText at = ac.getAccessibleText();
-                    if (at == null) return null;
-                    return at.getAtIndex(AccessibleText.SENTENCE, index);
-                }
-            }, ac);
-            if (s != null) {
-                references.increment(s);
-                return s;
-            }
-        } else {
-            debugString("getAccessibleSentenceAtIndexFromContext; ac = null");
-        }
-        return null;
-    }
-
-    /**
-     * return the text selection start from an AccessibleContext
-     */
-    private int getAccessibleTextSelectionStartFromContext(final AccessibleContext ac) {
-        if (ac == null) return -1;
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                AccessibleText at = ac.getAccessibleText();
-                if (at != null) {
-                    return at.getSelectionStart();
-                }
-                return -1;
-            }
-        }, ac);
-    }
-
-    /**
-     * return the text selection end from an AccessibleContext
-     */
-    private int getAccessibleTextSelectionEndFromContext(final AccessibleContext ac) {
-        if (ac == null)
-            return -1;
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                AccessibleText at = ac.getAccessibleText();
-                if (at != null) {
-                    return at.getSelectionEnd();
-                }
-                return -1;
-            }
-        }, ac);
-    }
-
-    /**
-     * return the selected text from an AccessibleContext
-     */
-    private String getAccessibleTextSelectedTextFromContext(final AccessibleContext ac) {
-        if (ac != null) {
-            String s = InvocationUtils.invokeAndWait(new Callable<String>() {
-                @Override
-                public String call() throws Exception {
-                    AccessibleText at = ac.getAccessibleText();
-                    if (at == null) return null;
-                    return at.getSelectedText();
-                }
-            }, ac);
-            if (s != null) {
-                references.increment(s);
-                return s;
-            }
-        } else {
-            debugString("getAccessibleTextSelectedTextFromContext; ac = null");
-        }
-        return null;
-    }
-
-    /**
-     * return the attribute string at a given index from an AccessibleContext
-     */
-    private String getAccessibleAttributesAtIndexFromContext(final AccessibleContext ac,
-                                                             final int index) {
-        if (ac == null)
-            return null;
-        AttributeSet as = InvocationUtils.invokeAndWait(new Callable<AttributeSet>() {
-            @Override
-            public AttributeSet call() throws Exception {
-                AccessibleText at = ac.getAccessibleText();
-                if (at != null) {
-                    return at.getCharacterAttribute(index);
-                }
-                return null;
-            }
-        }, ac);
-        String s = expandStyleConstants(as);
-        if (s != null) {
-            references.increment(s);
-            return s;
-        }
-        return null;
-    }
-
-    /**
-     * Get line info: left index of line
-     *
-     * algorithm:  cast back, doubling each time,
-     *             'till find line boundaries
-     *
-     * return -1 if we can't get the info (e.g. index or at passed in
-     * is bogus; etc.)
-     */
-    private int getAccessibleTextLineLeftBoundsFromContext(final AccessibleContext ac,
-                                                          final int index) {
-        if (ac == null)
-            return -1;
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                AccessibleText at = ac.getAccessibleText();
-                if (at != null) {
-                    int lineStart;
-                    int offset;
-                    Rectangle charRect;
-                    Rectangle indexRect = at.getCharacterBounds(index);
-                    int textLen = at.getCharCount();
-                    if (indexRect == null) {
-                        return -1;
-                    }
-                    // find the start of the line
-                    //
-                    offset = 1;
-                    lineStart = index - offset < 0 ? 0 : index - offset;
-                    charRect = at.getCharacterBounds(lineStart);
-                    // slouch behind beginning of line
-                    while (charRect != null
-                            && charRect.y >= indexRect.y
-                            && lineStart > 0) {
-                        offset = offset << 1;
-                        lineStart = index - offset < 0 ? 0 : index - offset;
-                        charRect = at.getCharacterBounds(lineStart);
-                    }
-                    if (lineStart == 0) {    // special case: we're on the first line!
-                        // we found it!
-                    } else {
-                        offset = offset >> 1;   // know boundary within last expansion
-                        // ground forward to beginning of line
-                        while (offset > 0) {
-                            charRect = at.getCharacterBounds(lineStart + offset);
-                            if (charRect.y < indexRect.y) { // still before line
-                                lineStart += offset;
-                            } else {
-                                // leave lineStart alone, it's close!
-                            }
-                            offset = offset >> 1;
-                        }
-                        // subtract one 'cause we're already too far...
-                        lineStart += 1;
-                    }
-                    return lineStart;
-                }
-                return -1;
-            }
-        }, ac);
-    }
-
-    /**
-     * Get line info: right index of line
-     *
-     * algorithm:  cast back, doubling each time,
-     *             'till find line boundaries
-     *
-     * return -1 if we can't get the info (e.g. index or at passed in
-     * is bogus; etc.)
-     */
-    private int getAccessibleTextLineRightBoundsFromContext(final AccessibleContext ac, final int index) {
-        if(ac == null)
-            return -1;
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                AccessibleText at = ac.getAccessibleText();
-                if (at != null) {
-                    int lineEnd;
-                    int offset;
-                    Rectangle charRect;
-                    Rectangle indexRect = at.getCharacterBounds(index);
-                    int textLen = at.getCharCount();
-                    if (indexRect == null) {
-                        return -1;
-                    }
-                    // find the end of the line
-                    //
-                    offset = 1;
-                    lineEnd = index + offset > textLen - 1
-                            ? textLen - 1 : index + offset;
-                    charRect = at.getCharacterBounds(lineEnd);
-                    // push past end of line
-                    while (charRect != null &&
-                            charRect.y <= indexRect.y &&
-                            lineEnd < textLen - 1) {
-                        offset = offset << 1;
-                        lineEnd = index + offset > textLen - 1
-                                ? textLen - 1 : index + offset;
-                        charRect = at.getCharacterBounds(lineEnd);
-                    }
-                    if (lineEnd == textLen - 1) {    // special case: on the last line!
-                        // we found it!
-                    } else {
-                        offset = offset >> 1;   // know boundary within last expansion
-                        // pull back to end of line
-                        while (offset > 0) {
-                            charRect = at.getCharacterBounds(lineEnd - offset);
-                            if (charRect.y > indexRect.y) { // still beyond line
-                                lineEnd -= offset;
-                            } else {
-                                // leave lineEnd alone, it's close!
-                            }
-                            offset = offset >> 1;
-                        }
-                        // subtract one 'cause we're already too far...
-                        lineEnd -= 1;
-                    }
-                    return lineEnd;
-                }
-                return -1;
-            }
-        }, ac);
-    }
-
-    /**
-     * Get a range of text; null if indicies are bogus
-     */
-    private String getAccessibleTextRangeFromContext(final AccessibleContext ac,
-                                                    final int start, final int end) {
-        String s = InvocationUtils.invokeAndWait(new Callable<String>() {
-            @Override
-            public String call() throws Exception {
-                if (ac != null) {
-                    AccessibleText at = ac.getAccessibleText();
-                    if (at != null) {
-                        // start - end is inclusive
-                        if (start > end) {
-                            return null;
-                        }
-                        if (end >= at.getCharCount()) {
-                            return null;
-                        }
-                        StringBuffer buf = new StringBuffer(end - start + 1);
-                        for (int i = start; i <= end; i++) {
-                            buf.append(at.getAtIndex(AccessibleText.CHARACTER, i));
-                        }
-                        return buf.toString();
-                    }
-                }
-                return null;
-            }
-        }, ac);
-        if (s != null) {
-            references.increment(s);
-            return s;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * return the AttributeSet object at a given index from an AccessibleContext
-     */
-    private AttributeSet getAccessibleAttributeSetAtIndexFromContext(final AccessibleContext ac,
-                                                                    final int index) {
-        return InvocationUtils.invokeAndWait(new Callable<AttributeSet>() {
-            @Override
-            public AttributeSet call() throws Exception {
-                if (ac != null) {
-                    AccessibleText at = ac.getAccessibleText();
-                    if (at != null) {
-                        AttributeSet as = at.getCharacterAttribute(index);
-                        if (as != null) {
-                            AccessBridge.this.references.increment(as);
-                            return as;
-                        }
-                    }
-                }
-                return null;
-            }
-        }, ac);
-    }
-
-
-    /**
-     * return the bounding rectangle at index from an AccessibleContext
-     */
-    private Rectangle getAccessibleTextRectAtIndexFromContext(final AccessibleContext ac,
-                                                        final int index) {
-        // want to do this in global coords, so need to combine w/ac global coords
-        Rectangle r = InvocationUtils.invokeAndWait(new Callable<Rectangle>() {
-            @Override
-            public Rectangle call() throws Exception {
-                // want to do this in global coords, so need to combine w/ac global coords
-                if (ac != null) {
-                    AccessibleText at = ac.getAccessibleText();
-                    if (at != null) {
-                        Rectangle rect = at.getCharacterBounds(index);
-                        if (rect != null) {
-                            String s = at.getAtIndex(AccessibleText.CHARACTER, index);
-                            if (s != null && s.equals("\n")) {
-                                rect.width = 0;
-                            }
-                            return rect;
-                        }
-                    }
-                }
-                return null;
-            }
-        }, ac);
-        Rectangle acRect = getAccessibleBoundsOnScreenFromContext(ac);
-        if (r != null && acRect != null) {
-            r.translate(acRect.x, acRect.y);
-            return r;
-        }
-        return null;
-    }
-
-    /**
-     * return the AccessibleText character x-coord at index from an AccessibleContext
-     */
-    private int getAccessibleXcoordTextRectAtIndexFromContext(AccessibleContext ac, int index) {
-        if (ac != null) {
-            Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
-            if (r != null) {
-                return r.x;
-            }
-        } else {
-            debugString("getAccessibleXcoordTextRectAtIndexFromContext; ac = null");
-        }
-        return -1;
-    }
-
-    /**
-     * return the AccessibleText character y-coord at index from an AccessibleContext
-     */
-    private int getAccessibleYcoordTextRectAtIndexFromContext(AccessibleContext ac, int index) {
-        if (ac != null) {
-            Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
-            if (r != null) {
-                return r.y;
-            }
-        } else {
-            debugString("getAccessibleYcoordTextRectAtIndexFromContext; ac = null");
-        }
-        return -1;
-    }
-
-    /**
-     * return the AccessibleText character height at index from an AccessibleContext
-     */
-    private int getAccessibleHeightTextRectAtIndexFromContext(AccessibleContext ac, int index) {
-        if (ac != null) {
-            Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
-            if (r != null) {
-                return r.height;
-            }
-        } else {
-            debugString("getAccessibleHeightTextRectAtIndexFromContext; ac = null");
-        }
-        return -1;
-    }
-
-    /**
-     * return the AccessibleText character width at index from an AccessibleContext
-     */
-    private int getAccessibleWidthTextRectAtIndexFromContext(AccessibleContext ac, int index) {
-        if (ac != null) {
-            Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
-            if (r != null) {
-                return r.width;
-            }
-        } else {
-            debugString("getAccessibleWidthTextRectAtIndexFromContext; ac = null");
-        }
-        return -1;
-    }
-
-    /* ===== AttributeSet methods for AccessibleText ===== */
-
-    /**
-     * return the bold setting from an AttributeSet
-     */
-    private boolean getBoldFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            return StyleConstants.isBold(as);
-        } else {
-            debugString("getBoldFromAttributeSet; as = null");
-        }
-        return false;
-    }
-
-    /**
-     * return the italic setting from an AttributeSet
-     */
-    private boolean getItalicFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            return StyleConstants.isItalic(as);
-        } else {
-            debugString("getItalicFromAttributeSet; as = null");
-        }
-        return false;
-    }
-
-    /**
-     * return the underline setting from an AttributeSet
-     */
-    private boolean getUnderlineFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            return StyleConstants.isUnderline(as);
-        } else {
-            debugString("getUnderlineFromAttributeSet; as = null");
-        }
-        return false;
-    }
-
-    /**
-     * return the strikethrough setting from an AttributeSet
-     */
-    private boolean getStrikethroughFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            return StyleConstants.isStrikeThrough(as);
-        } else {
-            debugString("getStrikethroughFromAttributeSet; as = null");
-        }
-        return false;
-    }
-
-    /**
-     * return the superscript setting from an AttributeSet
-     */
-    private boolean getSuperscriptFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            return StyleConstants.isSuperscript(as);
-        } else {
-            debugString("getSuperscriptFromAttributeSet; as = null");
-        }
-        return false;
-    }
-
-    /**
-     * return the subscript setting from an AttributeSet
-     */
-    private boolean getSubscriptFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            return StyleConstants.isSubscript(as);
-        } else {
-            debugString("getSubscriptFromAttributeSet; as = null");
-        }
-        return false;
-    }
-
-    /**
-     * return the background color from an AttributeSet
-     */
-    private String getBackgroundColorFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            String s = StyleConstants.getBackground(as).toString();
-            if (s != null) {
-                references.increment(s);
-                return s;
-            }
-        } else {
-            debugString("getBackgroundColorFromAttributeSet; as = null");
-        }
-        return null;
-    }
-
-    /**
-     * return the foreground color from an AttributeSet
-     */
-    private String getForegroundColorFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            String s = StyleConstants.getForeground(as).toString();
-            if (s != null) {
-                references.increment(s);
-                return s;
-            }
-        } else {
-            debugString("getForegroundColorFromAttributeSet; as = null");
-        }
-        return null;
-    }
-
-    /**
-     * return the font family from an AttributeSet
-     */
-    private String getFontFamilyFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            String s = StyleConstants.getFontFamily(as).toString();
-            if (s != null) {
-                references.increment(s);
-                return s;
-            }
-        } else {
-            debugString("getFontFamilyFromAttributeSet; as = null");
-        }
-        return null;
-    }
-
-    /**
-     * return the font size from an AttributeSet
-     */
-    private int getFontSizeFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            return StyleConstants.getFontSize(as);
-        } else {
-            debugString("getFontSizeFromAttributeSet; as = null");
-        }
-        return -1;
-    }
-
-    /**
-     * return the alignment from an AttributeSet
-     */
-    private int getAlignmentFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            return StyleConstants.getAlignment(as);
-        } else {
-            debugString("getAlignmentFromAttributeSet; as = null");
-        }
-        return -1;
-    }
-
-    /**
-     * return the BiDi level from an AttributeSet
-     */
-    private int getBidiLevelFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            return StyleConstants.getBidiLevel(as);
-        } else {
-            debugString("getBidiLevelFromAttributeSet; as = null");
-        }
-        return -1;
-    }
-
-
-    /**
-     * return the first line indent from an AttributeSet
-     */
-    private float getFirstLineIndentFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            return StyleConstants.getFirstLineIndent(as);
-        } else {
-            debugString("getFirstLineIndentFromAttributeSet; as = null");
-        }
-        return -1;
-    }
-
-    /**
-     * return the left indent from an AttributeSet
-     */
-    private float getLeftIndentFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            return StyleConstants.getLeftIndent(as);
-        } else {
-            debugString("getLeftIndentFromAttributeSet; as = null");
-        }
-        return -1;
-    }
-
-    /**
-     * return the right indent from an AttributeSet
-     */
-    private float getRightIndentFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            return StyleConstants.getRightIndent(as);
-        } else {
-            debugString("getRightIndentFromAttributeSet; as = null");
-        }
-        return -1;
-    }
-
-    /**
-     * return the line spacing from an AttributeSet
-     */
-    private float getLineSpacingFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            return StyleConstants.getLineSpacing(as);
-        } else {
-            debugString("getLineSpacingFromAttributeSet; as = null");
-        }
-        return -1;
-    }
-
-    /**
-     * return the space above from an AttributeSet
-     */
-    private float getSpaceAboveFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            return StyleConstants.getSpaceAbove(as);
-        } else {
-            debugString("getSpaceAboveFromAttributeSet; as = null");
-        }
-        return -1;
-    }
-
-    /**
-     * return the space below from an AttributeSet
-     */
-    private float getSpaceBelowFromAttributeSet(AttributeSet as) {
-        if (as != null) {
-            return StyleConstants.getSpaceBelow(as);
-        } else {
-            debugString("getSpaceBelowFromAttributeSet; as = null");
-        }
-        return -1;
-    }
-
-    /**
-     * Enumerate all StyleConstants in the AttributeSet
-     *
-     * We need to check explicitly, 'cause of the HTML package conversion
-     * mechanism (they may not be stored as StyleConstants, just translated
-     * to them when asked).
-     *
-     * (Use convenience methods where they are defined...)
-     *
-     * Not checking the following (which the IBM SNS guidelines says
-     * should be defined):
-     *    - ComponentElementName
-     *    - IconElementName
-     *    - NameAttribute
-     *    - ResolveAttribute
-     */
-    private String expandStyleConstants(AttributeSet as) {
-        Color c;
-        Object o;
-        String attrString = "";
-
-        // ---------- check for various Character Constants
-
-        attrString += "BidiLevel = " + StyleConstants.getBidiLevel(as);
-
-        final Component comp = StyleConstants.getComponent(as);
-        if (comp != null) {
-            if (comp instanceof Accessible) {
-                final AccessibleContext ac = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-                    @Override
-                    public AccessibleContext call() throws Exception {
-                        return comp.getAccessibleContext();
-                    }
-                }, comp);
-                if (ac != null) {
-                    attrString += "; Accessible Component = " + InvocationUtils.invokeAndWait(new Callable<String>() {
-                        @Override
-                        public String call() throws Exception {
-                            return ac.getAccessibleName();
-                        }
-                    }, ac);
-                } else {
-                    attrString += "; Innaccessible Component = " + comp;
-                }
-            } else {
-                attrString += "; Innaccessible Component = " + comp;
-            }
-        }
-
-        Icon i = StyleConstants.getIcon(as);
-        if (i != null) {
-            if (i instanceof ImageIcon) {
-                attrString += "; ImageIcon = " + ((ImageIcon) i).getDescription();
-            } else {
-                attrString += "; Icon = " + i;
-            }
-        }
-
-        attrString += "; FontFamily = " + StyleConstants.getFontFamily(as);
-
-        attrString += "; FontSize = " + StyleConstants.getFontSize(as);
-
-        if (StyleConstants.isBold(as)) {
-            attrString += "; bold";
-        }
-
-        if (StyleConstants.isItalic(as)) {
-            attrString += "; italic";
-        }
-
-        if (StyleConstants.isUnderline(as)) {
-            attrString += "; underline";
-        }
-
-        if (StyleConstants.isStrikeThrough(as)) {
-            attrString += "; strikethrough";
-        }
-
-        if (StyleConstants.isSuperscript(as)) {
-            attrString += "; superscript";
-        }
-
-        if (StyleConstants.isSubscript(as)) {
-            attrString += "; subscript";
-        }
-
-        c = StyleConstants.getForeground(as);
-        if (c != null) {
-            attrString += "; Foreground = " + c;
-        }
-
-        c = StyleConstants.getBackground(as);
-        if (c != null) {
-            attrString += "; Background = " + c;
-        }
-
-        attrString += "; FirstLineIndent = " + StyleConstants.getFirstLineIndent(as);
-
-        attrString += "; RightIndent = " + StyleConstants.getRightIndent(as);
-
-        attrString += "; LeftIndent = " + StyleConstants.getLeftIndent(as);
-
-        attrString += "; LineSpacing = " + StyleConstants.getLineSpacing(as);
-
-        attrString += "; SpaceAbove = " + StyleConstants.getSpaceAbove(as);
-
-        attrString += "; SpaceBelow = " + StyleConstants.getSpaceBelow(as);
-
-        attrString += "; Alignment = " + StyleConstants.getAlignment(as);
-
-        TabSet ts = StyleConstants.getTabSet(as);
-        if (ts != null) {
-            attrString += "; TabSet = " + ts;
-        }
-
-        return attrString;
-    }
-
-
-    /* ===== AccessibleValue methods ===== */
-
-    /**
-     * return the AccessibleValue current value from an AccessibleContext
-     * returned using a String 'cause the value is a java Number
-     *
-     */
-    private String getCurrentAccessibleValueFromContext(final AccessibleContext ac) {
-        if (ac != null) {
-            final Number value = InvocationUtils.invokeAndWait(new Callable<Number>() {
-                @Override
-                public Number call() throws Exception {
-                    AccessibleValue av = ac.getAccessibleValue();
-                    if (av == null) return null;
-                    return av.getCurrentAccessibleValue();
-                }
-            }, ac);
-            if (value != null) {
-                String s = value.toString();
-                if (s != null) {
-                    references.increment(s);
-                    return s;
-                }
-            }
-        } else {
-            debugString("getCurrentAccessibleValueFromContext; ac = null");
-        }
-        return null;
-    }
-
-    /**
-     * return the AccessibleValue maximum value from an AccessibleContext
-     * returned using a String 'cause the value is a java Number
-     *
-     */
-    private String getMaximumAccessibleValueFromContext(final AccessibleContext ac) {
-        if (ac != null) {
-            final Number value = InvocationUtils.invokeAndWait(new Callable<Number>() {
-                @Override
-                public Number call() throws Exception {
-                    AccessibleValue av = ac.getAccessibleValue();
-                    if (av == null) return null;
-                    return av.getMaximumAccessibleValue();
-                }
-            }, ac);
-            if (value != null) {
-                String s = value.toString();
-                if (s != null) {
-                    references.increment(s);
-                    return s;
-                }
-            }
-        } else {
-            debugString("getMaximumAccessibleValueFromContext; ac = null");
-        }
-        return null;
-    }
-
-    /**
-     * return the AccessibleValue minimum value from an AccessibleContext
-     * returned using a String 'cause the value is a java Number
-     *
-     */
-    private String getMinimumAccessibleValueFromContext(final AccessibleContext ac) {
-        if (ac != null) {
-            final Number value = InvocationUtils.invokeAndWait(new Callable<Number>() {
-                @Override
-                public Number call() throws Exception {
-                    AccessibleValue av = ac.getAccessibleValue();
-                    if (av == null) return null;
-                    return av.getMinimumAccessibleValue();
-                }
-            }, ac);
-            if (value != null) {
-                String s = value.toString();
-                if (s != null) {
-                    references.increment(s);
-                    return s;
-                }
-            }
-        } else {
-            debugString("getMinimumAccessibleValueFromContext; ac = null");
-        }
-        return null;
-    }
-
-
-    /* ===== AccessibleSelection methods ===== */
-
-    /**
-     * add to the AccessibleSelection of an AccessibleContext child i
-     *
-     */
-    private void addAccessibleSelectionFromContext(final AccessibleContext ac, final int i) {
-        try {
-            InvocationUtils.invokeAndWait(new Callable<Object>() {
-                @Override
-                public Object call() throws Exception {
-                    if (ac != null) {
-                        AccessibleSelection as = ac.getAccessibleSelection();
-                        if (as != null) {
-                            as.addAccessibleSelection(i);
-                        }
-                    }
-                    return null;
-                }
-            }, ac);
-        } catch(Exception e){}
-    }
-
-    /**
-     * clear all of the AccessibleSelection of an AccessibleContex
-     *
-     */
-    private void clearAccessibleSelectionFromContext(final AccessibleContext ac) {
-        try {
-            InvocationUtils.invokeAndWait(new Callable<Object>() {
-                @Override
-                public Object call() throws Exception {
-                    AccessibleSelection as = ac.getAccessibleSelection();
-                    if (as != null) {
-                        as.clearAccessibleSelection();
-                    }
-                    return null;
-                }
-            }, ac);
-        } catch(Exception e){}
-
-    }
-
-    /**
-     * get the AccessibleContext of the i-th AccessibleSelection of an AccessibleContext
-     *
-     */
-    private AccessibleContext getAccessibleSelectionFromContext(final AccessibleContext ac, final int i) {
-        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-            @Override
-            public AccessibleContext call() throws Exception {
-                if (ac != null) {
-                    AccessibleSelection as = ac.getAccessibleSelection();
-                    if (as != null) {
-                        Accessible a = as.getAccessibleSelection(i);
-                        if (a == null)
-                            return null;
-                        else
-                            return a.getAccessibleContext();
-                    }
-                }
-                return null;
-            }
-        }, ac);
-    }
-
-    /**
-     * get number of things selected in the AccessibleSelection of an AccessibleContext
-     *
-     */
-    private int getAccessibleSelectionCountFromContext(final AccessibleContext ac) {
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                if (ac != null) {
-                    AccessibleSelection as = ac.getAccessibleSelection();
-                    if (as != null) {
-                        return as.getAccessibleSelectionCount();
-                    }
-                }
-                return -1;
-            }
-        }, ac);
-    }
-
-    /**
-     * return true if the i-th child of the AccessibleSelection of an AccessibleContext is selected
-     *
-     */
-    private boolean isAccessibleChildSelectedFromContext(final AccessibleContext ac, final int i) {
-        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
-            @Override
-            public Boolean call() throws Exception {
-                if (ac != null) {
-                    AccessibleSelection as = ac.getAccessibleSelection();
-                    if (as != null) {
-                        return as.isAccessibleChildSelected(i);
-                    }
-                }
-                return false;
-            }
-        }, ac);
-    }
-
-    /**
-     * remove the i-th child from the AccessibleSelection of an AccessibleContext
-     *
-     */
-    private void removeAccessibleSelectionFromContext(final AccessibleContext ac, final int i) {
-        InvocationUtils.invokeAndWait(new Callable<Object>() {
-            @Override
-            public Object call() throws Exception {
-                if (ac != null) {
-                    AccessibleSelection as = ac.getAccessibleSelection();
-                    if (as != null) {
-                        as.removeAccessibleSelection(i);
-                    }
-                }
-                return null;
-            }
-        }, ac);
-    }
-
-    /**
-     * select all (if possible) of the children of the AccessibleSelection of an AccessibleContext
-     *
-     */
-    private void selectAllAccessibleSelectionFromContext(final AccessibleContext ac) {
-            InvocationUtils.invokeAndWait(new Callable<Object>() {
-                @Override
-                public Object call() throws Exception {
-                    if (ac != null) {
-                        AccessibleSelection as = ac.getAccessibleSelection();
-                        if (as != null) {
-                            as.selectAllAccessibleSelection();
-                        }
-                    }
-                    return null;
-                }
-            }, ac);
-    }
-
-    // ======== AccessibleTable ========
-
-    ConcurrentHashMap<AccessibleTable,AccessibleContext> hashtab = new ConcurrentHashMap<>();
-
-    /**
-     * returns the AccessibleTable for an AccessibleContext
-     */
-    private AccessibleTable getAccessibleTableFromContext(final AccessibleContext ac) {
-        return InvocationUtils.invokeAndWait(new Callable<AccessibleTable>() {
-            @Override
-            public AccessibleTable call() throws Exception {
-                if (ac != null) {
-                    AccessibleTable at = ac.getAccessibleTable();
-                    if (at != null) {
-                        AccessBridge.this.hashtab.put(at, ac);
-                        return at;
-                    }
-                }
-                return null;
-            }
-        }, ac);
-    }
-
-
-    /*
-     * returns the AccessibleContext that contains an AccessibleTable
-     */
-    private AccessibleContext getContextFromAccessibleTable(AccessibleTable at) {
-        return hashtab.get(at);
-    }
-
-    /*
-     * returns the row count for an AccessibleTable
-     */
-    private int getAccessibleTableRowCount(final AccessibleContext ac) {
-        debugString("##### getAccessibleTableRowCount");
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                if (ac != null) {
-                    AccessibleTable at = ac.getAccessibleTable();
-                    if (at != null) {
-                        return at.getAccessibleRowCount();
-                    }
-                }
-                return -1;
-            }
-        }, ac);
-    }
-
-    /*
-     * returns the column count for an AccessibleTable
-     */
-    private int getAccessibleTableColumnCount(final AccessibleContext ac) {
-        debugString("##### getAccessibleTableColumnCount");
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                if (ac != null) {
-                    AccessibleTable at = ac.getAccessibleTable();
-                    if (at != null) {
-                        return at.getAccessibleColumnCount();
-                    }
-                }
-                return -1;
-            }
-        }, ac);
-    }
-
-    /*
-     * returns the AccessibleContext for an AccessibleTable cell
-     */
-    private AccessibleContext getAccessibleTableCellAccessibleContext(final AccessibleTable at,
-                                                                      final int row, final int column) {
-        debugString("getAccessibleTableCellAccessibleContext: at = "+at.getClass());
-        if (at == null) return null;
-        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-            @Override
-            public AccessibleContext call() throws Exception {
-                if (!(at instanceof AccessibleContext)) {
-                    Accessible a = at.getAccessibleAt(row, column);
-                    if (a != null) {
-                        return a.getAccessibleContext();
-                    }
-                } else {
-                    // work-around for AccessibleJTable.getCurrentAccessibleContext returning
-                    // wrong renderer component when cell contains more than one component
-                    AccessibleContext ac = (AccessibleContext) at;
-                    Accessible parent = ac.getAccessibleParent();
-                    if (parent != null) {
-                        int indexInParent = ac.getAccessibleIndexInParent();
-                        Accessible child =
-                                parent.getAccessibleContext().getAccessibleChild(indexInParent);
-                        if (child instanceof JTable) {
-                            JTable table = (JTable) child;
-
-                            TableCellRenderer renderer = table.getCellRenderer(row, column);
-                            if (renderer == null) {
-                                Class<?> columnClass = table.getColumnClass(column);
-                                renderer = table.getDefaultRenderer(columnClass);
-                            }
-                            Component component =
-                                    renderer.getTableCellRendererComponent(table, table.getValueAt(row, column),
-                                            false, false, row, column);
-                            if (component instanceof Accessible) {
-                                return component.getAccessibleContext();
-                            }
-                        }
-                    }
-                }
-                return null;
-            }
-        }, getContextFromAccessibleTable(at));
-    }
-
-    /*
-     * returns the index of a cell at a given row and column in an AccessibleTable
-     */
-    private int getAccessibleTableCellIndex(final AccessibleTable at, int row, int column) {
-        debugString("##### getAccessibleTableCellIndex: at="+at);
-        if (at != null) {
-            int cellIndex = row *
-                InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                    @Override
-                    public Integer call() throws Exception {
-                        return at.getAccessibleColumnCount();
-                    }
-                }, getContextFromAccessibleTable(at)) +
-                column;
-            debugString("   ##### getAccessibleTableCellIndex="+cellIndex);
-            return cellIndex;
-        }
-        debugString(" ##### getAccessibleTableCellIndex FAILED");
-        return -1;
-    }
-
-    /*
-     * returns the row extent of a cell at a given row and column in an AccessibleTable
-     */
-    private int getAccessibleTableCellRowExtent(final AccessibleTable at, final int row, final int column) {
-        debugString("##### getAccessibleTableCellRowExtent");
-        if (at != null) {
-            int rowExtent = InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                                                              @Override
-                                                              public Integer call() throws Exception {
-                                                                  return at.getAccessibleRowExtentAt(row, column);
-                                                              }
-                                                          },
-                    getContextFromAccessibleTable(at));
-            debugString("   ##### getAccessibleTableCellRowExtent="+rowExtent);
-            return rowExtent;
-        }
-        debugString(" ##### getAccessibleTableCellRowExtent FAILED");
-        return -1;
-    }
-
-    /*
-     * returns the column extent of a cell at a given row and column in an AccessibleTable
-     */
-    private int getAccessibleTableCellColumnExtent(final AccessibleTable at, final int row, final int column) {
-        debugString("##### getAccessibleTableCellColumnExtent");
-        if (at != null) {
-            int columnExtent = InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                                                                 @Override
-                                                                 public Integer call() throws Exception {
-                                                                     return at.getAccessibleColumnExtentAt(row, column);
-                                                                 }
-                                                             },
-                    getContextFromAccessibleTable(at));
-            debugString("   ##### getAccessibleTableCellColumnExtent="+columnExtent);
-            return columnExtent;
-        }
-        debugString(" ##### getAccessibleTableCellColumnExtent FAILED");
-        return -1;
-    }
-
-    /*
-     * returns whether a cell is selected at a given row and column in an AccessibleTable
-     */
-    private boolean isAccessibleTableCellSelected(final AccessibleTable at, final int row,
-                         final int column) {
-        debugString("##### isAccessibleTableCellSelected: ["+row+"]["+column+"]");
-        if (at == null)
-            return false;
-        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
-            @Override
-            public Boolean call() throws Exception {
-                boolean isSelected = false;
-                Accessible a = at.getAccessibleAt(row, column);
-                if (a != null) {
-                    AccessibleContext ac = a.getAccessibleContext();
-                    if (ac == null)
-                        return false;
-                    AccessibleStateSet as = ac.getAccessibleStateSet();
-                    if (as != null) {
-                        isSelected = as.contains(AccessibleState.SELECTED);
-                    }
-                }
-                return isSelected;
-            }
-        }, getContextFromAccessibleTable(at));
-    }
-
-    /*
-     * returns an AccessibleTable that represents the row header in an
-     * AccessibleTable
-     */
-    private AccessibleTable getAccessibleTableRowHeader(final AccessibleContext ac) {
-        debugString(" #####  getAccessibleTableRowHeader called");
-        AccessibleTable at = InvocationUtils.invokeAndWait(new Callable<AccessibleTable>() {
-            @Override
-            public AccessibleTable call() throws Exception {
-                if (ac != null) {
-                    AccessibleTable at = ac.getAccessibleTable();
-                    if (at != null) {
-                        return at.getAccessibleRowHeader();
-                    }
-                }
-                return null;
-            }
-        }, ac);
-        if (at != null) {
-            hashtab.put(at, ac);
-        }
-        return at;
-    }
-
-    /*
-     * returns an AccessibleTable that represents the column header in an
-     * AccessibleTable
-     */
-    private AccessibleTable getAccessibleTableColumnHeader(final AccessibleContext ac) {
-    debugString("##### getAccessibleTableColumnHeader");
-        if (ac == null)
-            return null;
-        AccessibleTable at = InvocationUtils.invokeAndWait(new Callable<AccessibleTable>() {
-            @Override
-            public AccessibleTable call() throws Exception {
-                // workaround for getAccessibleColumnHeader NPE
-                // when the table header is null
-                Accessible parent = ac.getAccessibleParent();
-                if (parent != null) {
-                    int indexInParent = ac.getAccessibleIndexInParent();
-                    Accessible child =
-                            parent.getAccessibleContext().getAccessibleChild(indexInParent);
-                    if (child instanceof JTable) {
-                        JTable table = (JTable) child;
-                        if (table.getTableHeader() == null) {
-                            return null;
-                        }
-                    }
-                }
-                AccessibleTable at = ac.getAccessibleTable();
-                if (at != null) {
-                    return at.getAccessibleColumnHeader();
-                }
-                return null;
-            }
-        }, ac);
-        if (at != null) {
-            hashtab.put(at, ac);
-        }
-        return at;
-    }
-
-    /*
-     * returns the number of row headers in an AccessibleTable that represents
-     * the row header in an AccessibleTable
-     */
-    private int getAccessibleTableRowHeaderRowCount(AccessibleContext ac) {
-
-    debugString(" #####  getAccessibleTableRowHeaderRowCount called");
-        if (ac != null) {
-            final AccessibleTable atRowHeader = getAccessibleTableRowHeader(ac);
-            if (atRowHeader != null) {
-                return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                    @Override
-                    public Integer call() throws Exception {
-                        if (atRowHeader != null) {
-                            return atRowHeader.getAccessibleRowCount();
-                        }
-                        return -1;
-                    }
-                }, ac);
-            }
-        }
-        return -1;
-    }
-
-    /*
-     * returns the number of column headers in an AccessibleTable that represents
-     * the row header in an AccessibleTable
-     */
-    private int getAccessibleTableRowHeaderColumnCount(AccessibleContext ac) {
-        debugString(" #####  getAccessibleTableRowHeaderColumnCount called");
-        if (ac != null) {
-            final AccessibleTable atRowHeader = getAccessibleTableRowHeader(ac);
-            if (atRowHeader != null) {
-                return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                    @Override
-                    public Integer call() throws Exception {
-                        if (atRowHeader != null) {
-                            return atRowHeader.getAccessibleColumnCount();
-                        }
-                        return -1;
-                    }
-                }, ac);
-            }
-        }
-        debugString(" ##### getAccessibleTableRowHeaderColumnCount FAILED");
-        return -1;
-    }
-
-    /*
-     * returns the number of row headers in an AccessibleTable that represents
-     * the column header in an AccessibleTable
-     */
-    private int getAccessibleTableColumnHeaderRowCount(AccessibleContext ac) {
-
-    debugString("##### getAccessibleTableColumnHeaderRowCount");
-        if (ac != null) {
-            final AccessibleTable atColumnHeader = getAccessibleTableColumnHeader(ac);
-            if (atColumnHeader != null) {
-                return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                    @Override
-                    public Integer call() throws Exception {
-                        if (atColumnHeader != null) {
-                            return atColumnHeader.getAccessibleRowCount();
-                        }
-                        return -1;
-                    }
-                }, ac);
-            }
-        }
-        debugString(" ##### getAccessibleTableColumnHeaderRowCount FAILED");
-        return -1;
-    }
-
-    /*
-     * returns the number of column headers in an AccessibleTable that represents
-     * the column header in an AccessibleTable
-     */
-    private int getAccessibleTableColumnHeaderColumnCount(AccessibleContext ac) {
-
-    debugString("#####  getAccessibleTableColumnHeaderColumnCount");
-        if (ac != null) {
-            final AccessibleTable atColumnHeader = getAccessibleTableColumnHeader(ac);
-            if (atColumnHeader != null) {
-                return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                    @Override
-                    public Integer call() throws Exception {
-                        if (atColumnHeader != null) {
-                            return atColumnHeader.getAccessibleColumnCount();
-                        }
-                        return -1;
-                    }
-                }, ac);
-            }
-        }
-        debugString(" ##### getAccessibleTableColumnHeaderColumnCount FAILED");
-        return -1;
-    }
-
-    /*
-     * returns the description of a row header in an AccessibleTable
-     */
-    private AccessibleContext getAccessibleTableRowDescription(final AccessibleTable table,
-                                                              final int row) {
-        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-            @Override
-            public AccessibleContext call() throws Exception {
-                if (table != null) {
-                    Accessible a = table.getAccessibleRowDescription(row);
-                    if (a != null) {
-                        return a.getAccessibleContext();
-                    }
-                }
-                return null;
-            }
-        }, getContextFromAccessibleTable(table));
-    }
-
-    /*
-     * returns the description of a column header in an AccessibleTable
-     */
-    private AccessibleContext getAccessibleTableColumnDescription(final AccessibleTable at,
-                                                                 final int column) {
-        if (at == null)
-            return null;
-        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-            @Override
-            public AccessibleContext call() throws Exception {
-                Accessible a = at.getAccessibleColumnDescription(column);
-                if (a != null) {
-                    return a.getAccessibleContext();
-                }
-                return null;
-            }
-        }, getContextFromAccessibleTable(at));
-    }
-
-    /*
-     * returns the number of rows selected in an AccessibleTable
-     */
-    private int getAccessibleTableRowSelectionCount(final AccessibleTable at) {
-        if (at != null) {
-            return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                @Override
-                public Integer call() throws Exception {
-                    int[] selections = at.getSelectedAccessibleRows();
-                    if (selections != null)
-                        return selections.length;
-                    else
-                        return -1;
-                }
-            }, getContextFromAccessibleTable(at));
-        }
-        return -1;
-    }
-
-    /*
-     * returns the row number of the i-th selected row in an AccessibleTable
-     */
-    private int getAccessibleTableRowSelections(final AccessibleTable at, final int i) {
-        if (at != null) {
-            return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                @Override
-                public Integer call() throws Exception {
-                    int[] selections = at.getSelectedAccessibleRows();
-                    if (selections.length > i) {
-                        return selections[i];
-                    }
-                    return -1;
-                }
-            }, getContextFromAccessibleTable(at));
-        }
-        return -1;
-    }
-
-    /*
-     * returns whether a row is selected in an AccessibleTable
-     */
-    private boolean isAccessibleTableRowSelected(final AccessibleTable at,
-                                                 final int row) {
-        if (at == null)
-            return false;
-        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
-            @Override
-            public Boolean call() throws Exception {
-                return at.isAccessibleRowSelected(row);
-            }
-         }, getContextFromAccessibleTable(at));
-    }
-
-    /*
-     * returns whether a column is selected in an AccessibleTable
-     */
-    private boolean isAccessibleTableColumnSelected(final AccessibleTable at,
-                                                   final int column) {
-        if (at == null)
-            return false;
-        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
-            @Override
-            public Boolean call() throws Exception {
-                return at.isAccessibleColumnSelected(column);
-            }
-         }, getContextFromAccessibleTable(at));
-    }
-
-    /*
-     * returns the number of columns selected in an AccessibleTable
-     */
-    private int getAccessibleTableColumnSelectionCount(final AccessibleTable at) {
-        if (at == null)
-            return -1;
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                int[] selections = at.getSelectedAccessibleColumns();
-                if (selections != null)
-                    return selections.length;
-                else
-                    return -1;
-            }
-        }, getContextFromAccessibleTable(at));
-    }
-
-    /*
-     * returns the row number of the i-th selected row in an AccessibleTable
-     */
-    private int getAccessibleTableColumnSelections(final AccessibleTable at, final int i) {
-        if (at == null)
-            return -1;
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                int[] selections = at.getSelectedAccessibleColumns();
-                if (selections != null && selections.length > i) {
-                    return selections[i];
-                }
-                return -1;
-            }
-        }, getContextFromAccessibleTable(at));
-    }
-
-    /* ===== AccessibleExtendedTable (since 1.4) ===== */
-
-    /*
-     * returns the row number for a cell at a given index in an AccessibleTable
-     */
-    private int getAccessibleTableRow(final AccessibleTable at, int index) {
-        if (at == null)
-            return -1;
-        int colCount=InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                return at.getAccessibleColumnCount();
-            }
-        }, getContextFromAccessibleTable(at));
-        return index / colCount;
-    }
-
-    /*
-     * returns the column number for a cell at a given index in an AccessibleTable
-     */
-    private int getAccessibleTableColumn(final AccessibleTable at, int index) {
-        if (at == null)
-            return -1;
-        int colCount=InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                return at.getAccessibleColumnCount();
-            }
-        }, getContextFromAccessibleTable(at));
-        return index % colCount;
-    }
-
-    /*
-     * returns the index for a cell at a given row and column in an
-     * AccessibleTable
-     */
-    private int getAccessibleTableIndex(final AccessibleTable at, int row, int column) {
-        if (at == null)
-            return -1;
-        int colCount = InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                return at.getAccessibleColumnCount();
-            }
-         }, getContextFromAccessibleTable(at));
-        return row * colCount + column;
-    }
-
-    // ===== AccessibleRelationSet =====
-
-    /*
-     * returns the number of relations in the AccessibleContext's
-     * AccessibleRelationSet
-     */
-    private int getAccessibleRelationCount(final AccessibleContext ac) {
-        {
-            if (ac != null) {
-                AccessibleRelationSet ars = InvocationUtils.invokeAndWait(new Callable<AccessibleRelationSet>() {
-                    @Override
-                    public AccessibleRelationSet call() throws Exception {
-                        return ac.getAccessibleRelationSet();
-                    }
-                }, ac);
-                if (ars != null)
-                    return ars.size();
-            }
-        }
-        return 0;
-    }
-
-    /*
-     * returns the ith relation key in the AccessibleContext's
-     * AccessibleRelationSet
-     */
-    private String getAccessibleRelationKey(final AccessibleContext ac, final int i) {
-        return InvocationUtils.invokeAndWait(new Callable<String>() {
-            @Override
-            public String call() throws Exception {
-                if (ac != null) {
-                    AccessibleRelationSet ars = ac.getAccessibleRelationSet();
-                    if (ars != null) {
-                        AccessibleRelation[] relations = ars.toArray();
-                        if (relations != null && i >= 0 && i < relations.length) {
-                            return relations[i].getKey();
-                        }
-                    }
-                }
-                return null;
-            }
-        }, ac);
-    }
-
-    /*
-     * returns the number of targets in a relation in the AccessibleContext's
-     * AccessibleRelationSet
-     */
-    private int getAccessibleRelationTargetCount(final AccessibleContext ac, final int i) {
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                if (ac != null) {
-                    AccessibleRelationSet ars = ac.getAccessibleRelationSet();
-                    if (ars != null) {
-                        AccessibleRelation[] relations = ars.toArray();
-                        if (relations != null && i >= 0 && i < relations.length) {
-                            Object[] targets = relations[i].getTarget();
-                            return targets.length;
-                        }
-                    }
-                }
-                return -1;
-            }
-        }, ac);
-    }
-
-    /*
-     * returns the jth target in the ith relation in the AccessibleContext's
-     * AccessibleRelationSet
-     */
-    private AccessibleContext getAccessibleRelationTarget(final AccessibleContext ac,
-                                                         final int i, final int j) {
-        debugString("***** getAccessibleRelationTarget");
-        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-            @Override
-            public AccessibleContext call() throws Exception {
-                if (ac != null) {
-                    AccessibleRelationSet ars = ac.getAccessibleRelationSet();
-                    if (ars != null) {
-                        AccessibleRelation[] relations = ars.toArray();
-                        if (relations != null && i >= 0 && i < relations.length) {
-                            Object[] targets = relations[i].getTarget();
-                            if (targets != null && j >= 0 & j < targets.length) {
-                                Object o = targets[j];
-                                if (o instanceof Accessible) {
-                                    return ((Accessible) o).getAccessibleContext();
-                                }
-                            }
-                        }
-                    }
-                }
-                return null;
-            }
-        }, ac);
-    }
-
-    // ========= AccessibleHypertext =========
-
-    private Map<AccessibleHypertext, AccessibleContext> hyperTextContextMap = new WeakHashMap<>();
-    private Map<AccessibleHyperlink, AccessibleContext> hyperLinkContextMap = new WeakHashMap<>();
-
-    /*
-     * Returns the AccessibleHypertext
-     */
-    private AccessibleHypertext getAccessibleHypertext(final AccessibleContext ac) {
-        debugString("getAccessibleHyperlink");
-        if (ac==null)
-            return null;
-        AccessibleHypertext hypertext = InvocationUtils.invokeAndWait(new Callable<AccessibleHypertext>() {
-            @Override
-            public AccessibleHypertext call() throws Exception {
-                AccessibleText at = ac.getAccessibleText();
-                if (!(at instanceof AccessibleHypertext)) {
-                    return null;
-                }
-                return ((AccessibleHypertext) at);
-            }
-        }, ac);
-        hyperTextContextMap.put(hypertext, ac);
-        return hypertext;
-    }
-
-    /*
-     * Returns the number of AccessibleHyperlinks
-     */
-    private int getAccessibleHyperlinkCount(AccessibleContext ac) {
-        debugString("getAccessibleHyperlinkCount");
-        if (ac == null) {
-            return 0;
-        }
-        final AccessibleHypertext hypertext = getAccessibleHypertext(ac);
-        if (hypertext == null) {
-            return 0;
-        }
-        //return hypertext.getLinkCount();
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                return hypertext.getLinkCount();
-            }
-        }, ac);
-    }
-
-    /*
-     * Returns the hyperlink at the specified index
-     */
-    private AccessibleHyperlink getAccessibleHyperlink(final AccessibleHypertext hypertext, final int i) {
-        debugString("getAccessibleHyperlink");
-        if (hypertext == null) {
-            return null;
-        }
-        AccessibleContext ac = hyperTextContextMap.get(hypertext);
-        if ( i < 0 || i >=
-             InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                 @Override
-                 public Integer call() throws Exception {
-                     return hypertext.getLinkCount();
-                 }
-             }, ac) ) {
-            return null;
-        }
-        AccessibleHyperlink acLink = InvocationUtils.invokeAndWait(new Callable<AccessibleHyperlink>() {
-            @Override
-            public AccessibleHyperlink call() throws Exception {
-                AccessibleHyperlink link = hypertext.getLink(i);
-                if (link == null || (!link.isValid())) {
-                    return null;
-                }
-                return link;
-            }
-        }, ac);
-        hyperLinkContextMap.put(acLink, ac);
-        return acLink;
-    }
-
-    /*
-     * Returns the hyperlink object description
-     */
-    private String getAccessibleHyperlinkText(final AccessibleHyperlink link) {
-        debugString("getAccessibleHyperlinkText");
-        if (link == null) {
-            return null;
-        }
-        return InvocationUtils.invokeAndWait(new Callable<String>() {
-            @Override
-            public String call() throws Exception {
-                Object o = link.getAccessibleActionDescription(0);
-                if (o != null) {
-                    return o.toString();
-                }
-                return null;
-            }
-        }, hyperLinkContextMap.get(link));
-    }
-
-    /*
-     * Returns the hyperlink URL
-     */
-    private String getAccessibleHyperlinkURL(final AccessibleHyperlink link) {
-        debugString("getAccessibleHyperlinkURL");
-        if (link == null) {
-            return null;
-        }
-        return InvocationUtils.invokeAndWait(new Callable<String>() {
-            @Override
-            public String call() throws Exception {
-                Object o = link.getAccessibleActionObject(0);
-                if (o != null) {
-                    return o.toString();
-                } else {
-                    return null;
-                }
-            }
-        }, hyperLinkContextMap.get(link));
-    }
-
-    /*
-     * Returns the start index of the hyperlink text
-     */
-    private int getAccessibleHyperlinkStartIndex(final AccessibleHyperlink link) {
-        debugString("getAccessibleHyperlinkStartIndex");
-        if (link == null) {
-            return -1;
-        }
-        return  InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                return link.getStartIndex();
-            }
-        }, hyperLinkContextMap.get(link));
-    }
-
-    /*
-     * Returns the end index of the hyperlink text
-     */
-    private int getAccessibleHyperlinkEndIndex(final AccessibleHyperlink link) {
-        debugString("getAccessibleHyperlinkEndIndex");
-        if (link == null) {
-            return -1;
-        }
-        return  InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                return link.getEndIndex();
-            }
-        }, hyperLinkContextMap.get(link));
-    }
-
-    /*
-     * Returns the index into an array of hyperlinks that
-     * is associated with this character index, or -1 if there
-     * is no hyperlink associated with this index.
-     */
-    private int getAccessibleHypertextLinkIndex(final AccessibleHypertext hypertext, final int charIndex) {
-        debugString("getAccessibleHypertextLinkIndex: charIndex = "+charIndex);
-        if (hypertext == null) {
-            return -1;
-        }
-        int linkIndex = InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                return hypertext.getLinkIndex(charIndex);
-            }
-        }, hyperTextContextMap.get(hypertext));
-        debugString("getAccessibleHypertextLinkIndex returning "+linkIndex);
-        return linkIndex;
-    }
-
-    /*
-     * Actives the hyperlink
-     */
-    private boolean activateAccessibleHyperlink(final AccessibleContext ac,
-                                                final AccessibleHyperlink link) {
-        //debugString("activateAccessibleHyperlink: link = "+link.getClass());
-        if (link == null) {
-            return false;
-        }
-        boolean retval = InvocationUtils.invokeAndWait(new Callable<Boolean>() {
-            @Override
-            public Boolean call() throws Exception {
-                return link.doAccessibleAction(0);
-            }
-        }, ac);
-        debugString("activateAccessibleHyperlink: returning = "+retval);
-        return retval;
-    }
-
-
-    // ============ AccessibleKeyBinding =============
-
-    /*
-     * returns the component mnemonic
-     */
-    private KeyStroke getMnemonic(final AccessibleContext ac) {
-        if (ac == null)
-            return null;
-        return InvocationUtils.invokeAndWait(new Callable<KeyStroke>() {
-            @Override
-            public KeyStroke call() throws Exception {
-                AccessibleComponent comp = ac.getAccessibleComponent();
-                if (!(comp instanceof AccessibleExtendedComponent)) {
-                    return null;
-                }
-                AccessibleExtendedComponent aec = (AccessibleExtendedComponent) comp;
-                if (aec != null) {
-                    AccessibleKeyBinding akb = aec.getAccessibleKeyBinding();
-                    if (akb != null) {
-                        Object o = akb.getAccessibleKeyBinding(0);
-                        if (o instanceof KeyStroke) {
-                            return (KeyStroke) o;
-                        }
-                    }
-                }
-                return null;
-            }
-        }, ac);
-    }
-
-    /*
-     * returns the JMenuItem accelerator
-     */
-    private KeyStroke getAccelerator(final AccessibleContext ac) {
-        // workaround for getAccessibleKeyBinding not returning the
-        // JMenuItem accelerator
-        if (ac == null)
-            return null;
-        return InvocationUtils.invokeAndWait(new Callable<KeyStroke>() {
-            @Override
-            public KeyStroke call() throws Exception {
-                Accessible parent = ac.getAccessibleParent();
-                if (parent instanceof Accessible) {
-                    int indexInParent = ac.getAccessibleIndexInParent();
-                    Accessible child =
-                            parent.getAccessibleContext().getAccessibleChild(indexInParent);
-                    if (child instanceof JMenuItem) {
-                        JMenuItem menuItem = (JMenuItem) child;
-                        if (menuItem == null)
-                            return null;
-                        KeyStroke keyStroke = menuItem.getAccelerator();
-                        return keyStroke;
-                    }
-                }
-                return null;
-            }
-        }, ac);
-    }
-
-    /*
-     * returns 1-24 to indicate which F key is being used for a shortcut or 0 otherwise
-     */
-    private int fKeyNumber(KeyStroke keyStroke) {
-        if (keyStroke == null)
-            return 0;
-        int fKey = 0;
-        String keyText = KeyEvent.getKeyText(keyStroke.getKeyCode());
-        if (keyText != null && (keyText.length() == 2 || keyText.length() == 3)) {
-            String prefix = keyText.substring(0, 1);
-            if (prefix.equals("F")) {
-                try {
-                    int suffix = Integer.parseInt(keyText.substring(1));
-                    if (suffix >= 1 && suffix <= 24) {
-                        fKey = suffix;
-                    }
-                } catch (Exception e) { // ignore NumberFormatException
-                }
-            }
-        }
-        return fKey;
-    }
-
-    /*
-     * returns one of several important control characters or 0 otherwise
-     */
-    private int controlCode(KeyStroke keyStroke) {
-        if (keyStroke == null)
-            return 0;
-        int code = keyStroke.getKeyCode();
-        switch (code) {
-            case KeyEvent.VK_BACK_SPACE:
-            case KeyEvent.VK_DELETE:
-            case KeyEvent.VK_DOWN:
-            case KeyEvent.VK_END:
-            case KeyEvent.VK_HOME:
-            case KeyEvent.VK_INSERT:
-            case KeyEvent.VK_KP_DOWN:
-            case KeyEvent.VK_KP_LEFT:
-            case KeyEvent.VK_KP_RIGHT:
-            case KeyEvent.VK_KP_UP:
-            case KeyEvent.VK_LEFT:
-            case KeyEvent.VK_PAGE_DOWN:
-            case KeyEvent.VK_PAGE_UP:
-            case KeyEvent.VK_RIGHT:
-            case KeyEvent.VK_UP:
-                break;
-            default:
-                code = 0;
-                break;
-        }
-        return code;
-    }
-
-    /*
-     * returns the KeyStoke character
-     */
-    private char getKeyChar(KeyStroke keyStroke) {
-        // If the shortcut is an FKey return 1-24
-        if (keyStroke == null)
-            return 0;
-        int fKey = fKeyNumber(keyStroke);
-        if (fKey != 0) {
-            // return 0x00000001 through 0x00000018
-            debugString("   Shortcut is: F" + fKey);
-            return (char)fKey;
-        }
-        // If the accelerator is a control character, return it
-        int keyCode = controlCode(keyStroke);
-        if (keyCode != 0) {
-            debugString("   Shortcut is control character: " + Integer.toHexString(keyCode));
-            return (char)keyCode;
-        }
-        String keyText = KeyEvent.getKeyText(keyStroke.getKeyCode());
-        debugString("   Shortcut is: " + keyText);
-        if (keyText != null || keyText.length() > 0) {
-            CharSequence seq = keyText.subSequence(0, 1);
-            if (seq != null || seq.length() > 0) {
-                return seq.charAt(0);
-            }
-        }
-        return 0;
-    }
-
-    /*
-     * returns the KeyStroke modifiers as an int
-     */
-    private int getModifiers(KeyStroke keyStroke) {
-        if (keyStroke == null)
-            return 0;
-        debugString("In AccessBridge.getModifiers");
-        // modifiers is a bit strip where bits 0-7 indicate a traditional modifier
-        // such as Ctrl/Alt/Shift, bit 8 indicates an F key shortcut, and bit 9 indicates
-        // a control code shortcut such as the delete key.
-
-        int modifiers = 0;
-        // Is the shortcut an FKey?
-        if (fKeyNumber(keyStroke) != 0) {
-            modifiers |= 1 << 8;
-        }
-        // Is the shortcut a control code?
-        if (controlCode(keyStroke) != 0) {
-            modifiers |= 1 << 9;
-        }
-        // The following is needed in order to handle translated modifiers.
-        // getKeyModifiersText doesn't work because for example in German Strg is
-        // returned for Ctrl.
-
-        // There can be more than one modifier, e.g. if the modifier is ctrl + shift + B
-        // the toString text is "shift ctrl pressed B". Need to parse through that.
-        StringTokenizer st = new StringTokenizer(keyStroke.toString());
-        while (st.hasMoreTokens()) {
-            String text = st.nextToken();
-            // Meta+Ctrl+Alt+Shift
-            // 0-3 are shift, ctrl, meta, alt
-            // 4-7 are for Solaris workstations (though not being used)
-            if (text.startsWith("met")) {
-                debugString("   found meta");
-                modifiers |= ActionEvent.META_MASK;
-            }
-            if (text.startsWith("ctr")) {
-                debugString("   found ctrl");
-                modifiers |= ActionEvent.CTRL_MASK;
-            }
-            if (text.startsWith("alt")) {
-                debugString("   found alt");
-                modifiers |= ActionEvent.ALT_MASK;
-            }
-            if (text.startsWith("shi")) {
-                debugString("   found shift");
-                modifiers |= ActionEvent.SHIFT_MASK;
-            }
-        }
-        debugString("   returning modifiers: 0x" + Integer.toHexString(modifiers));
-        return modifiers;
-    }
-
-    /*
-     * returns the number of key bindings associated with this context
-     */
-    private int getAccessibleKeyBindingsCount(AccessibleContext ac) {
-        if (ac == null)
-            return 0;
-        int count = 0;
-
-        if (getMnemonic(ac) != null) {
-            count++;
-        }
-        if (getAccelerator(ac) != null) {
-            count++;
-        }
-        return count;
-    }
-
-    /*
-     * returns the key binding character at the specified index
-     */
-    private char getAccessibleKeyBindingChar(AccessibleContext ac, int index) {
-        if (ac == null)
-            return 0;
-        if((index == 0) && getMnemonic(ac)==null) {// special case when there is no mnemonic
-            KeyStroke keyStroke = getAccelerator(ac);
-            if (keyStroke != null) {
-                return getKeyChar(keyStroke);
-            }
-        }
-        if (index == 0) {   // mnemonic
-            KeyStroke keyStroke = getMnemonic(ac);
-            if (keyStroke != null) {
-                return getKeyChar(keyStroke);
-            }
-        } else if (index == 1) { // accelerator
-            KeyStroke keyStroke = getAccelerator(ac);
-            if (keyStroke != null) {
-                return getKeyChar(keyStroke);
-            }
-        }
-        return 0;
-    }
-
-    /*
-     * returns the key binding modifiers at the specified index
-     */
-    private int getAccessibleKeyBindingModifiers(AccessibleContext ac, int index) {
-        if (ac == null)
-            return 0;
-        if((index == 0) && getMnemonic(ac)==null) {// special case when there is no mnemonic
-            KeyStroke keyStroke = getAccelerator(ac);
-            if (keyStroke != null) {
-                return getModifiers(keyStroke);
-            }
-        }
-        if (index == 0) {   // mnemonic
-            KeyStroke keyStroke = getMnemonic(ac);
-            if (keyStroke != null) {
-                return getModifiers(keyStroke);
-            }
-        } else if (index == 1) { // accelerator
-            KeyStroke keyStroke = getAccelerator(ac);
-            if (keyStroke != null) {
-                return getModifiers(keyStroke);
-            }
-        }
-        return 0;
-    }
-
-    // ========== AccessibleIcon ============
-
-    /*
-     * return the number of icons associated with this context
-     */
-    private int getAccessibleIconsCount(final AccessibleContext ac) {
-        debugString("getAccessibleIconsCount");
-        if (ac == null) {
-            return 0;
-        }
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                AccessibleIcon[] ai = ac.getAccessibleIcon();
-                if (ai == null) {
-                    return 0;
-                }
-                return ai.length;
-            }
-        }, ac);
-    }
-
-    /*
-     * return icon description at the specified index
-     */
-    private String getAccessibleIconDescription(final AccessibleContext ac, final int index) {
-        debugString("getAccessibleIconDescription: index = "+index);
-        if (ac == null) {
-            return null;
-        }
-        return InvocationUtils.invokeAndWait(new Callable<String>() {
-            @Override
-            public String call() throws Exception {
-                AccessibleIcon[] ai = ac.getAccessibleIcon();
-                if (ai == null || index < 0 || index >= ai.length) {
-                    return null;
-                }
-                return ai[index].getAccessibleIconDescription();
-            }
-        }, ac);
-    }
-
-    /*
-     * return icon height at the specified index
-     */
-    private int getAccessibleIconHeight(final AccessibleContext ac, final int index) {
-        debugString("getAccessibleIconHeight: index = "+index);
-        if (ac == null) {
-            return 0;
-        }
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                AccessibleIcon[] ai = ac.getAccessibleIcon();
-                if (ai == null || index < 0 || index >= ai.length) {
-                    return 0;
-                }
-                return ai[index].getAccessibleIconHeight();
-            }
-        }, ac);
-    }
-
-    /*
-     * return icon width at the specified index
-     */
-    private int getAccessibleIconWidth(final AccessibleContext ac, final int index) {
-        debugString("getAccessibleIconWidth: index = "+index);
-        if (ac == null) {
-            return 0;
-        }
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                AccessibleIcon[] ai = ac.getAccessibleIcon();
-                if (ai == null || index < 0 || index >= ai.length) {
-                    return 0;
-                }
-                return ai[index].getAccessibleIconWidth();
-            }
-        }, ac);
-    }
-
-    // ========= AccessibleAction ===========
-
-    /*
-     * return the number of icons associated with this context
-     */
-    private int getAccessibleActionsCount(final AccessibleContext ac) {
-        debugString("getAccessibleActionsCount");
-        if (ac == null) {
-            return 0;
-        }
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                AccessibleAction aa = ac.getAccessibleAction();
-                if (aa == null)
-                    return 0;
-                return aa.getAccessibleActionCount();
-            }
-        }, ac);
-    }
-
-    /*
-     * return icon description at the specified index
-     */
-    private String getAccessibleActionName(final AccessibleContext ac, final int index) {
-        debugString("getAccessibleActionName: index = "+index);
-        if (ac == null) {
-            return null;
-        }
-        return InvocationUtils.invokeAndWait(new Callable<String>() {
-            @Override
-            public String call() throws Exception {
-                AccessibleAction aa = ac.getAccessibleAction();
-                if (aa == null) {
-                    return null;
-                }
-                return aa.getAccessibleActionDescription(index);
-            }
-        }, ac);
-    }
-    /*
-     * return icon description at the specified index
-     */
-    private boolean doAccessibleActions(final AccessibleContext ac, final String name) {
-        debugString("doAccessibleActions: action name = "+name);
-        if (ac == null || name == null) {
-            return false;
-        }
-        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
-            @Override
-            public Boolean call() throws Exception {
-                AccessibleAction aa = ac.getAccessibleAction();
-                if (aa == null) {
-                    return false;
-                }
-                int index = -1;
-                int numActions = aa.getAccessibleActionCount();
-                for (int i = 0; i < numActions; i++) {
-                    String actionName = aa.getAccessibleActionDescription(i);
-                    if (name.equals(actionName)) {
-                        index = i;
-                        break;
-                    }
-                }
-                if (index == -1) {
-                    return false;
-                }
-                boolean retval = aa.doAccessibleAction(index);
-                return retval;
-            }
-        }, ac);
-    }
-
-    /* ===== AT utility methods ===== */
-
-    /**
-     * Sets the contents of an AccessibleContext that
-     * implements AccessibleEditableText with the
-     * specified text string.
-     * Returns whether successful.
-     */
-    private boolean setTextContents(final AccessibleContext ac, final String text) {
-        debugString("setTextContents: ac = "+ac+"; text = "+text);
-
-        if (! (ac instanceof AccessibleEditableText)) {
-            debugString("   ac not instanceof AccessibleEditableText: "+ac);
-            return false;
-        }
-        if (text == null) {
-            debugString("   text is null");
-            return false;
-        }
-
-        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
-            @Override
-            public Boolean call() throws Exception {
-                // check whether the text field is editable
-                AccessibleStateSet ass = ac.getAccessibleStateSet();
-                if (!ass.contains(AccessibleState.ENABLED)) {
-                    return false;
-                }
-                ((AccessibleEditableText) ac).setTextContents(text);
-                return true;
-            }
-        }, ac);
-    }
-
-    /**
-     * Returns the Accessible Context of an Internal Frame object that is
-     * the ancestor of a given object.  If the object is an Internal Frame
-     * object or an Internal Frame ancestor object was found, returns the
-     * object's AccessibleContext.
-     * If there is no ancestor object that has an Accessible Role of
-     * Internal Frame, returns (AccessibleContext)0.
-     */
-    private AccessibleContext getInternalFrame (AccessibleContext ac) {
-        return getParentWithRole(ac, AccessibleRole.INTERNAL_FRAME.toString());
-    }
-
-    /**
-     * Returns the Accessible Context for the top level object in
-     * a Java Window.  This is same Accessible Context that is obtained
-     * from GetAccessibleContextFromHWND for that window.  Returns
-     * (AccessibleContext)0 on error.
-     */
-    private AccessibleContext getTopLevelObject (final AccessibleContext ac) {
-        debugString("getTopLevelObject; ac = "+ac);
-        if (ac == null) {
-            return null;
-        }
-        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-            @Override
-            public AccessibleContext call() throws Exception {
-                if (ac.getAccessibleRole() == AccessibleRole.DIALOG) {
-                    // return the dialog, not the parent window
-                    return ac;
-                }
-
-                Accessible parent = ac.getAccessibleParent();
-                if (parent == null) {
-                    return ac;
-                }
-                Accessible tmp = parent;
-                while (tmp != null && tmp.getAccessibleContext() != null) {
-                    AccessibleContext ac2 = tmp.getAccessibleContext();
-                    if (ac2 != null && ac2.getAccessibleRole() == AccessibleRole.DIALOG) {
-                        // return the dialog, not the parent window
-                        return ac2;
-                    }
-                    parent = tmp;
-                    tmp = parent.getAccessibleContext().getAccessibleParent();
-                }
-                return parent.getAccessibleContext();
-            }
-        }, ac);
-    }
-
-    /**
-     * Returns the parent AccessibleContext that has the specified AccessibleRole.
-     * Returns null on error or if the AccessibleContext does not exist.
-     */
-    private AccessibleContext getParentWithRole (final AccessibleContext ac,
-                                                 final String roleName) {
-        debugString("getParentWithRole; ac = "+ac);
-        debugString("role = "+roleName);
-        if (ac == null || roleName == null) {
-            return null;
-        }
-
-        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-            @Override
-            public AccessibleContext call() throws Exception {
-                AccessibleRole role = AccessBridge.this.accessibleRoleMap.get(roleName);
-                if (role == null) {
-                    return ac;
-                }
-
-                Accessible parent = ac.getAccessibleParent();
-                if (parent == null && ac.getAccessibleRole() == role) {
-                    return ac;
-                }
-
-                Accessible tmp = parent;
-                AccessibleContext tmp_ac = null;
-
-                while (tmp != null && (tmp_ac = tmp.getAccessibleContext()) != null) {
-                    AccessibleRole ar = tmp_ac.getAccessibleRole();
-                    if (ar == role) {
-                        // found
-                        return tmp_ac;
-                    }
-                    parent = tmp;
-                    tmp = parent.getAccessibleContext().getAccessibleParent();
-                }
-                // not found
-                return null;
-            }
-        }, ac);
-    }
-
-    /**
-     * Returns the parent AccessibleContext that has the specified AccessibleRole.
-     * Otherwise, returns the top level object for the Java Window.
-     * Returns (AccessibleContext)0 on error.
-     */
-    private AccessibleContext getParentWithRoleElseRoot (AccessibleContext ac,
-                                                         String roleName) {
-        AccessibleContext retval = getParentWithRole(ac, roleName);
-        if (retval == null) {
-            retval = getTopLevelObject(ac);
-        }
-        return retval;
-    }
-
-    /**
-     * Returns how deep in the object hierarchy a given object is.
-     * The top most object in the object hierarchy has an object depth of 0.
-     * Returns -1 on error.
-     */
-    private int getObjectDepth(final AccessibleContext ac) {
-        debugString("getObjectDepth: ac = "+ac);
-
-        if (ac == null) {
-            return -1;
-        }
-        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                int count = 0;
-                Accessible parent = ac.getAccessibleParent();
-                if (parent == null) {
-                    return count;
-                }
-                Accessible tmp = parent;
-                while (tmp != null && tmp.getAccessibleContext() != null) {
-                    parent = tmp;
-                    tmp = parent.getAccessibleContext().getAccessibleParent();
-                    count++;
-                }
-                return count;
-            }
-        }, ac);
-    }
-
-    /**
-     * Returns the Accessible Context of the current ActiveDescendent of an object.
-     * Returns (AccessibleContext)0 on error.
-     */
-    private AccessibleContext getActiveDescendent (final AccessibleContext ac) {
-        debugString("getActiveDescendent: ac = "+ac);
-        if (ac == null) {
-            return null;
-        }
-        // workaround for JTree bug where the only possible active
-        // descendent is the JTree root
-        final Accessible parent = InvocationUtils.invokeAndWait(new Callable<Accessible>() {
-            @Override
-            public Accessible call() throws Exception {
-                return ac.getAccessibleParent();
-            }
-        }, ac);
-
-        if (parent != null) {
-            Accessible child = InvocationUtils.invokeAndWait(new Callable<Accessible>() {
-                @Override
-                public Accessible call() throws Exception {
-                    int indexInParent = ac.getAccessibleIndexInParent();
-                    return parent.getAccessibleContext().getAccessibleChild(indexInParent);
-                }
-            }, ac);
-
-            if (child instanceof JTree) {
-                // return the selected node
-                final JTree tree = (JTree)child;
-                return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-                    @Override
-                    public AccessibleContext call() throws Exception {
-                        return new AccessibleJTreeNode(tree,
-                                tree.getSelectionPath(),
-                                null);
-                    }
-                }, child);
-            }
-        }
-
-        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-            @Override
-            public AccessibleContext call() throws Exception {
-                AccessibleSelection as = ac.getAccessibleSelection();
-                if (as == null) {
-                    return null;
-                }
-                // assume single selection
-                if (as.getAccessibleSelectionCount() != 1) {
-                    return null;
-                }
-                Accessible a = as.getAccessibleSelection(0);
-                if (a == null) {
-                    return null;
-                }
-                return a.getAccessibleContext();
-            }
-        }, ac);
-    }
-
-
-    /**
-     * Additional methods for Teton
-     */
-
-    /**
-     * Gets the AccessibleName for a component based upon the JAWS algorithm.
-     * Returns whether successful.
-     *
-     * Bug ID 4916682 - Implement JAWS AccessibleName policy
-     */
-    private String getJAWSAccessibleName(final AccessibleContext ac) {
-        debugString("getJAWSAccessibleName");
-        if (ac == null) {
-            return null;
-        }
-        // placeholder
-        return InvocationUtils.invokeAndWait(new Callable<String>() {
-            @Override
-            public String call() throws Exception {
-                return ac.getAccessibleName();
-            }
-        }, ac);
-    }
-
-    /**
-     * Request focus for a component. Returns whether successful;
-     *
-     * Bug ID 4944757 - requestFocus method needed
-     */
-    private boolean requestFocus(final AccessibleContext ac) {
-        debugString("requestFocus");
-        if (ac == null) {
-            return false;
-        }
-        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
-            @Override
-            public Boolean call() throws Exception {
-                AccessibleComponent acomp = ac.getAccessibleComponent();
-                if (acomp == null) {
-                    return false;
-                }
-                acomp.requestFocus();
-                return ac.getAccessibleStateSet().contains(AccessibleState.FOCUSED);
-            }
-        }, ac);
-    }
-
-    /**
-     * Selects text between two indices.  Selection includes the
-     * text at the start index and the text at the end index. Returns
-     * whether successful;
-     *
-     * Bug ID 4944758 - selectTextRange method needed
-     */
-    private boolean selectTextRange(final AccessibleContext ac, final int startIndex, final int endIndex) {
-        debugString("selectTextRange: start = "+startIndex+"; end = "+endIndex);
-        if (ac == null) {
-            return false;
-        }
-        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
-            @Override
-            public Boolean call() throws Exception {
-                AccessibleText at = ac.getAccessibleText();
-                if (!(at instanceof AccessibleEditableText)) {
-                    return false;
-                }
-                ((AccessibleEditableText) at).selectText(startIndex, endIndex);
-
-                boolean result = at.getSelectionStart() == startIndex &&
-                        at.getSelectionEnd() == endIndex;
-                return result;
-            }
-        }, ac);
-    }
-
-    /**
-     * Set the caret to a text position. Returns whether successful;
-     *
-     * Bug ID 4944770 - setCaretPosition method needed
-     */
-    private boolean setCaretPosition(final AccessibleContext ac, final int position) {
-        debugString("setCaretPosition: position = "+position);
-        if (ac == null) {
-            return false;
-        }
-        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
-            @Override
-            public Boolean call() throws Exception {
-                AccessibleText at = ac.getAccessibleText();
-                if (!(at instanceof AccessibleEditableText)) {
-                    return false;
-                }
-                ((AccessibleEditableText) at).selectText(position, position);
-                return at.getCaretPosition() == position;
-            }
-        }, ac);
-    }
-
-    /**
-     * Gets the number of visible children of an AccessibleContext.
-     *
-     * Bug ID 4944762- getVisibleChildren for list-like components needed
-     */
-    private int _visibleChildrenCount;
-    private AccessibleContext _visibleChild;
-    private int _currentVisibleIndex;
-    private boolean _foundVisibleChild;
-
-    private int getVisibleChildrenCount(AccessibleContext ac) {
-        debugString("getVisibleChildrenCount");
-        if (ac == null) {
-            return -1;
-        }
-        _visibleChildrenCount = 0;
-        _getVisibleChildrenCount(ac);
-        debugString("  _visibleChildrenCount = "+_visibleChildrenCount);
-        return _visibleChildrenCount;
-    }
-
-    /*
-     * Recursively descends AccessibleContext and gets the number
-     * of visible children
-     */
-    private void _getVisibleChildrenCount(final AccessibleContext ac) {
-        if (ac == null)
-            return;
-        int numChildren = InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                return ac.getAccessibleChildrenCount();
-            }
-        }, ac);
-        for (int i = 0; i < numChildren; i++) {
-            final int idx = i;
-            final AccessibleContext ac2 = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-                @Override
-                public AccessibleContext call() throws Exception {
-                    Accessible a = ac.getAccessibleChild(idx);
-                    if (a != null)
-                        return a.getAccessibleContext();
-                    else
-                        return null;
-                }
-            }, ac);
-            if ( ac2 == null ||
-                 (!InvocationUtils.invokeAndWait(new Callable<Boolean>() {
-                     @Override
-                     public Boolean call() throws Exception {
-                         return ac2.getAccessibleStateSet().contains(AccessibleState.SHOWING);
-                     }
-                 }, ac))
-               ) {
-                continue;
-            }
-            _visibleChildrenCount++;
-
-            if (InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                @Override
-                public Integer call() throws Exception {
-                    return ac2.getAccessibleChildrenCount();
-                }
-            }, ac) > 0 ) {
-                _getVisibleChildrenCount(ac2);
-            }
-        }
-    }
-
-    /**
-     * Gets the visible child of an AccessibleContext at the
-     * specified index
-     *
-     * Bug ID 4944762- getVisibleChildren for list-like components needed
-     */
-    private AccessibleContext getVisibleChild(AccessibleContext ac, int index) {
-        debugString("getVisibleChild: index = "+index);
-        if (ac == null) {
-            return null;
-        }
-        _visibleChild = null;
-        _currentVisibleIndex = 0;
-        _foundVisibleChild = false;
-        _getVisibleChild(ac, index);
-
-        if (_visibleChild != null) {
-            debugString( "    getVisibleChild: found child = " +
-                         InvocationUtils.invokeAndWait(new Callable<String>() {
-                             @Override
-                             public String call() throws Exception {
-                                 return AccessBridge.this._visibleChild.getAccessibleName();
-                             }
-                         }, ac) );
-        }
-        return _visibleChild;
-    }
-
-    /*
-     * Recursively searchs AccessibleContext and finds the visible component
-     * at the specified index
-     */
-    private void _getVisibleChild(final AccessibleContext ac, final int index) {
-        if (_visibleChild != null) {
-            return;
-        }
-
-        int numChildren = InvocationUtils.invokeAndWait(new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                return ac.getAccessibleChildrenCount();
-            }
-        }, ac);
-        for (int i = 0; i < numChildren; i++) {
-            final int idx=i;
-            final AccessibleContext ac2=InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
-                @Override
-                public AccessibleContext call() throws Exception {
-                    Accessible a = ac.getAccessibleChild(idx);
-                    if (a == null)
-                        return null;
-                    else
-                        return a.getAccessibleContext();
-                }
-            }, ac);
-            if (ac2 == null ||
-            (!InvocationUtils.invokeAndWait(new Callable<Boolean>() {
-                @Override
-                public Boolean call() throws Exception {
-                    return ac2.getAccessibleStateSet().contains(AccessibleState.SHOWING);
-                }
-            }, ac))) {
-                continue;
-            }
-            if (!_foundVisibleChild && _currentVisibleIndex == index) {
-            _visibleChild = ac2;
-            _foundVisibleChild = true;
-            return;
-            }
-            _currentVisibleIndex++;
-
-            if ( InvocationUtils.invokeAndWait(new Callable<Integer>() {
-                @Override
-                public Integer call() throws Exception {
-                    return ac2.getAccessibleChildrenCount();
-                }
-            }, ac) > 0 ) {
-                _getVisibleChild(ac2, index);
-            }
-        }
-    }
-
-
-    /* ===== Java object memory management code ===== */
-
-    /**
-     * Class to track object references to ensure the
-     * Java VM doesn't garbage collect them
-     */
-    private class ObjectReferences {
-
-        private class Reference {
-            private int value;
-
-            Reference(int i) {
-                value = i;
-            }
-
-            public String toString() {
-                return ("refCount: " + value);
-            }
-        }
-
-        /**
-        * table object references, to keep 'em from being garbage collected
-        */
-        private ConcurrentHashMap<Object,Reference> refs;
-
-        /**
-        * Constructor
-        */
-        ObjectReferences() {
-            refs = new ConcurrentHashMap<>(4);
-        }
-
-        /**
-        * Debugging: dump the contents of ObjectReferences' refs Hashtable
-        */
-        String dump() {
-            return refs.toString();
-        }
-
-        /**
-        * Increment ref count; set to 1 if we have no references for it
-        */
-        void increment(Object o) {
-            if (o == null){
-                debugString("ObjectReferences::increment - Passed in object is null");
-                return;
-            }
-
-            if (refs.containsKey(o)) {
-                (refs.get(o)).value++;
-            } else {
-                refs.put(o, new Reference(1));
-            }
-        }
-
-        /**
-        * Decrement ref count; remove if count drops to 0
-        */
-        void decrement(Object o) {
-            Reference aRef = refs.get(o);
-            if (aRef != null) {
-                aRef.value--;
-                if (aRef.value == 0) {
-                    refs.remove(o);
-                } else if (aRef.value < 0) {
-                    debugString("ERROR: decrementing reference count below 0");
-                }
-            } else {
-                debugString("ERROR: object to decrement not in ObjectReferences table");
-            }
-        }
-
-    }
-
-    /* ===== event handling code ===== */
-
-   /**
-     * native method for handling property change events
-     */
-    private native void propertyCaretChange(PropertyChangeEvent e,
-                        AccessibleContext src,
-                        int oldValue, int newValue);
-    private native void propertyDescriptionChange(PropertyChangeEvent e,
-                        AccessibleContext src,
-                        String oldValue, String newValue);
-    private native void propertyNameChange(PropertyChangeEvent e,
-                        AccessibleContext src,
-                        String oldValue, String newValue);
-    private native void propertySelectionChange(PropertyChangeEvent e,
-                        AccessibleContext src);
-    private native void propertyStateChange(PropertyChangeEvent e,
-                        AccessibleContext src,
-                        String oldValue, String newValue);
-    private native void propertyTextChange(PropertyChangeEvent e,
-                        AccessibleContext src);
-    private native void propertyValueChange(PropertyChangeEvent e,
-                        AccessibleContext src,
-                        String oldValue, String newValue);
-    private native void propertyVisibleDataChange(PropertyChangeEvent e,
-                        AccessibleContext src);
-    private native void propertyChildChange(PropertyChangeEvent e,
-                        AccessibleContext src,
-                        AccessibleContext oldValue,
-                        AccessibleContext newValue);
-    private native void propertyActiveDescendentChange(PropertyChangeEvent e,
-                        AccessibleContext src,
-                        AccessibleContext oldValue,
-                        AccessibleContext newValue);
-
-    private native void javaShutdown();
-
-    /**
-     * native methods for handling focus events
-     */
-    private native void focusGained(FocusEvent e, AccessibleContext src);
-    private native void focusLost(FocusEvent e, AccessibleContext src);
-
-    /**
-     * native method for handling caret events
-     */
-    private native void caretUpdate(CaretEvent e, AccessibleContext src);
-
-    /**
-     * native methods for handling mouse events
-     */
-    private native void mouseClicked(MouseEvent e, AccessibleContext src);
-    private native void mouseEntered(MouseEvent e, AccessibleContext src);
-    private native void mouseExited(MouseEvent e, AccessibleContext src);
-    private native void mousePressed(MouseEvent e, AccessibleContext src);
-    private native void mouseReleased(MouseEvent e, AccessibleContext src);
-
-    /**
-     * native methods for handling menu & popupMenu events
-     */
-    private native void menuCanceled(MenuEvent e, AccessibleContext src);
-    private native void menuDeselected(MenuEvent e, AccessibleContext src);
-    private native void menuSelected(MenuEvent e, AccessibleContext src);
-    private native void popupMenuCanceled(PopupMenuEvent e, AccessibleContext src);
-    private native void popupMenuWillBecomeInvisible(PopupMenuEvent e,
-                                                     AccessibleContext src);
-    private native void popupMenuWillBecomeVisible(PopupMenuEvent e,
-                                                   AccessibleContext src);
-
-    /* ===== event definitions ===== */
-
-    private static final long PROPERTY_CHANGE_EVENTS = 1;
-    private static final long FOCUS_GAINED_EVENTS = 2;
-    private static final long FOCUS_LOST_EVENTS = 4;
-    private static final long FOCUS_EVENTS = (FOCUS_GAINED_EVENTS | FOCUS_LOST_EVENTS);
-
-    private static final long CARET_UPATE_EVENTS = 8;
-    private static final long CARET_EVENTS = CARET_UPATE_EVENTS;
-
-    private static final long MOUSE_CLICKED_EVENTS = 16;
-    private static final long MOUSE_ENTERED_EVENTS = 32;
-    private static final long MOUSE_EXITED_EVENTS = 64;
-    private static final long MOUSE_PRESSED_EVENTS = 128;
-    private static final long MOUSE_RELEASED_EVENTS = 256;
-    private static final long MOUSE_EVENTS = (MOUSE_CLICKED_EVENTS | MOUSE_ENTERED_EVENTS |
-                                             MOUSE_EXITED_EVENTS | MOUSE_PRESSED_EVENTS |
-                                             MOUSE_RELEASED_EVENTS);
-
-    private static final long MENU_CANCELED_EVENTS = 512;
-    private static final long MENU_DESELECTED_EVENTS = 1024;
-    private static final long MENU_SELECTED_EVENTS = 2048;
-    private static final long MENU_EVENTS = (MENU_CANCELED_EVENTS | MENU_DESELECTED_EVENTS |
-                                            MENU_SELECTED_EVENTS);
-
-    private static final long POPUPMENU_CANCELED_EVENTS = 4096;
-    private static final long POPUPMENU_WILL_BECOME_INVISIBLE_EVENTS = 8192;
-    private static final long POPUPMENU_WILL_BECOME_VISIBLE_EVENTS = 16384;
-    private static final long POPUPMENU_EVENTS = (POPUPMENU_CANCELED_EVENTS |
-                                                 POPUPMENU_WILL_BECOME_INVISIBLE_EVENTS |
-                                                 POPUPMENU_WILL_BECOME_VISIBLE_EVENTS);
-
-    /* These use their own numbering scheme, to ensure sufficient expansion room */
-    private static final long PROPERTY_NAME_CHANGE_EVENTS = 1;
-    private static final long PROPERTY_DESCRIPTION_CHANGE_EVENTS = 2;
-    private static final long PROPERTY_STATE_CHANGE_EVENTS = 4;
-    private static final long PROPERTY_VALUE_CHANGE_EVENTS = 8;
-    private static final long PROPERTY_SELECTION_CHANGE_EVENTS = 16;
-    private static final long PROPERTY_TEXT_CHANGE_EVENTS = 32;
-    private static final long PROPERTY_CARET_CHANGE_EVENTS = 64;
-    private static final long PROPERTY_VISIBLEDATA_CHANGE_EVENTS = 128;
-    private static final long PROPERTY_CHILD_CHANGE_EVENTS = 256;
-    private static final long PROPERTY_ACTIVEDESCENDENT_CHANGE_EVENTS = 512;
-
-
-    private static final long PROPERTY_EVENTS = (PROPERTY_NAME_CHANGE_EVENTS |
-                                                PROPERTY_DESCRIPTION_CHANGE_EVENTS |
-                                                PROPERTY_STATE_CHANGE_EVENTS |
-                                                PROPERTY_VALUE_CHANGE_EVENTS |
-                                                PROPERTY_SELECTION_CHANGE_EVENTS |
-                                                PROPERTY_TEXT_CHANGE_EVENTS |
-                                                PROPERTY_CARET_CHANGE_EVENTS |
-                                                PROPERTY_VISIBLEDATA_CHANGE_EVENTS |
-                                                PROPERTY_CHILD_CHANGE_EVENTS |
-                                                PROPERTY_ACTIVEDESCENDENT_CHANGE_EVENTS);
-
-    /**
-     * The EventHandler class listens for Java events and
-     * forwards them to the AT
-     */
-    private class EventHandler implements PropertyChangeListener,
-                                          FocusListener, CaretListener,
-                                          MenuListener, PopupMenuListener,
-                                          MouseListener, WindowListener,
-                                          ChangeListener {
-
-        private AccessBridge accessBridge;
-        private long javaEventMask = 0;
-        private long accessibilityEventMask = 0;
-
-        EventHandler(AccessBridge bridge) {
-            accessBridge = bridge;
-
-            // Register to receive WINDOW_OPENED and WINDOW_CLOSED
-            // events.  Add the event source as a native window
-            // handler is it implements NativeWindowHandler.
-            // SwingEventMonitor.addWindowListener(this);
-        }
-
-        // --------- Event Notification Registration methods
-
-        /**
-         * Invoked the first time a window is made visible.
-         */
-        public void windowOpened(WindowEvent e) {
-            // If the window is a NativeWindowHandler, add it.
-            Object o = null;
-            if (e != null)
-                o = e.getSource();
-            if (o instanceof NativeWindowHandler) {
-                addNativeWindowHandler((NativeWindowHandler)o);
-            }
-        }
-
-        /**
-         * Invoked when the user attempts to close the window
-         * from the window's system menu.  If the program does not
-         * explicitly hide or dispose the window while processing
-         * this event, the window close operation will be canceled.
-         */
-        public void windowClosing(WindowEvent e) {}
-
-        /**
-         * Invoked when a window has been closed as the result
-         * of calling dispose on the window.
-         */
-        public void windowClosed(WindowEvent e) {
-            // If the window is a NativeWindowHandler, remove it.
-            Object o = null;
-            if (e != null)
-                o = e.getSource();
-            if (o instanceof NativeWindowHandler) {
-                removeNativeWindowHandler((NativeWindowHandler)o);
-            }
-        }
-
-        /**
-         * Invoked when a window is changed from a normal to a
-         * minimized state. For many platforms, a minimized window
-         * is displayed as the icon specified in the window's
-         * iconImage property.
-         * @see java.awt.Frame#setIconImage
-         */
-        public void windowIconified(WindowEvent e) {}
-
-        /**
-         * Invoked when a window is changed from a minimized
-         * to a normal state.
-         */
-        public void windowDeiconified(WindowEvent e) {}
-
-        /**
-         * Invoked when the Window is set to be the active Window. Only a Frame or
-         * a Dialog can be the active Window. The native windowing system may
-         * denote the active Window or its children with special decorations, such
-         * as a highlighted title bar. The active Window is always either the
-         * focused Window, or the first Frame or Dialog that is an owner of the
-         * focused Window.
-         */
-        public void windowActivated(WindowEvent e) {}
-
-        /**
-         * Invoked when a Window is no longer the active Window. Only a Frame or a
-         * Dialog can be the active Window. The native windowing system may denote
-         * the active Window or its children with special decorations, such as a
-         * highlighted title bar. The active Window is always either the focused
-         * Window, or the first Frame or Dialog that is an owner of the focused
-         * Window.
-         */
-        public void windowDeactivated(WindowEvent e) {}
-
-        /**
-         * Turn on event monitoring for the event type passed in
-         * If necessary, add the appropriate event listener (if
-         * no other event of that type is being listened for)
-         */
-        void addJavaEventNotification(long type) {
-            long newEventMask = javaEventMask | type;
-            /*
-            if ( ((javaEventMask & PROPERTY_EVENTS) == 0) &&
-                 ((newEventMask & PROPERTY_EVENTS) != 0) ) {
-                AccessibilityEventMonitor.addPropertyChangeListener(this);
-            }
-            */
-            if ( ((javaEventMask & FOCUS_EVENTS) == 0) &&
-                ((newEventMask & FOCUS_EVENTS) != 0) ) {
-                SwingEventMonitor.addFocusListener(this);
-            }
-            if ( ((javaEventMask & CARET_EVENTS) == 0) &&
-                ((newEventMask & CARET_EVENTS) != 0) ) {
-                SwingEventMonitor.addCaretListener(this);
-            }
-            if ( ((javaEventMask & MOUSE_EVENTS) == 0) &&
-                ((newEventMask & MOUSE_EVENTS) != 0) ) {
-                SwingEventMonitor.addMouseListener(this);
-            }
-            if ( ((javaEventMask & MENU_EVENTS) == 0) &&
-                ((newEventMask & MENU_EVENTS) != 0) ) {
-                SwingEventMonitor.addMenuListener(this);
-                SwingEventMonitor.addPopupMenuListener(this);
-            }
-            if ( ((javaEventMask & POPUPMENU_EVENTS) == 0) &&
-                ((newEventMask & POPUPMENU_EVENTS) != 0) ) {
-                SwingEventMonitor.addPopupMenuListener(this);
-            }
-
-            javaEventMask = newEventMask;
-        }
-
-        /**
-         * Turn off event monitoring for the event type passed in
-         * If necessary, remove the appropriate event listener (if
-         * no other event of that type is being listened for)
-         */
-        void removeJavaEventNotification(long type) {
-            long newEventMask = javaEventMask & (~type);
-            /*
-            if ( ((javaEventMask & PROPERTY_EVENTS) != 0) &&
-                 ((newEventMask & PROPERTY_EVENTS) == 0) ) {
-                AccessibilityEventMonitor.removePropertyChangeListener(this);
-            }
-            */
-            if (((javaEventMask & FOCUS_EVENTS) != 0) &&
-                ((newEventMask & FOCUS_EVENTS) == 0)) {
-                SwingEventMonitor.removeFocusListener(this);
-            }
-            if (((javaEventMask & CARET_EVENTS) != 0) &&
-                ((newEventMask & CARET_EVENTS) == 0)) {
-                SwingEventMonitor.removeCaretListener(this);
-            }
-            if (((javaEventMask & MOUSE_EVENTS) == 0) &&
-                ((newEventMask & MOUSE_EVENTS) != 0)) {
-                SwingEventMonitor.removeMouseListener(this);
-            }
-            if (((javaEventMask & MENU_EVENTS) == 0) &&
-                ((newEventMask & MENU_EVENTS) != 0)) {
-                SwingEventMonitor.removeMenuListener(this);
-            }
-            if (((javaEventMask & POPUPMENU_EVENTS) == 0) &&
-                ((newEventMask & POPUPMENU_EVENTS) != 0)) {
-                SwingEventMonitor.removePopupMenuListener(this);
-            }
-
-            javaEventMask = newEventMask;
-        }
-
-        /**
-         * Turn on event monitoring for the event type passed in
-         * If necessary, add the appropriate event listener (if
-         * no other event of that type is being listened for)
-         */
-        void addAccessibilityEventNotification(long type) {
-            long newEventMask = accessibilityEventMask | type;
-            if ( ((accessibilityEventMask & PROPERTY_EVENTS) == 0) &&
-                 ((newEventMask & PROPERTY_EVENTS) != 0) ) {
-                AccessibilityEventMonitor.addPropertyChangeListener(this);
-            }
-            accessibilityEventMask = newEventMask;
-        }
-
-        /**
-         * Turn off event monitoring for the event type passed in
-         * If necessary, remove the appropriate event listener (if
-         * no other event of that type is being listened for)
-         */
-        void removeAccessibilityEventNotification(long type) {
-            long newEventMask = accessibilityEventMask & (~type);
-            if ( ((accessibilityEventMask & PROPERTY_EVENTS) != 0) &&
-                 ((newEventMask & PROPERTY_EVENTS) == 0) ) {
-                AccessibilityEventMonitor.removePropertyChangeListener(this);
-            }
-            accessibilityEventMask = newEventMask;
-        }
-
-        /**
-         *  ------- property change event glue
-         */
-        // This is invoked on the EDT , as
-        public void propertyChange(PropertyChangeEvent e) {
-
-            accessBridge.debugString("propertyChange(" + e.toString() + ") called");
-
-            if (e != null && (accessibilityEventMask & PROPERTY_EVENTS) != 0) {
-                Object o = e.getSource();
-                AccessibleContext ac;
-
-                if (o instanceof AccessibleContext) {
-                    ac = (AccessibleContext) o;
-                } else {
-                    Accessible a = Translator.getAccessible(e.getSource());
-                    if (a == null)
-                        return;
-                    else
-                        ac = a.getAccessibleContext();
-                }
-                if (ac != null) {
-                    InvocationUtils.registerAccessibleContext(ac, AppContext.getAppContext());
-
-                    accessBridge.debugString("AccessibleContext: " + ac);
-                    String propertyName = e.getPropertyName();
-
-                    if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_CARET_PROPERTY) == 0) {
-                        int oldValue = 0;
-                        int newValue = 0;
-
-                        if (e.getOldValue() instanceof Integer) {
-                            oldValue = ((Integer) e.getOldValue()).intValue();
-                        }
-                        if (e.getNewValue() instanceof Integer) {
-                            newValue = ((Integer) e.getNewValue()).intValue();
-                        }
-                        accessBridge.debugString(" - about to call propertyCaretChange()");
-                        accessBridge.debugString("   old value: " + oldValue + "new value: " + newValue);
-                        accessBridge.propertyCaretChange(e, ac, oldValue, newValue);
-
-                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY) == 0) {
-                        String oldValue = null;
-                        String newValue = null;
-
-                        if (e.getOldValue() != null) {
-                            oldValue = e.getOldValue().toString();
-                        }
-                        if (e.getNewValue() != null) {
-                            newValue = e.getNewValue().toString();
-                        }
-                        accessBridge.debugString(" - about to call propertyDescriptionChange()");
-                        accessBridge.debugString("   old value: " + oldValue + "new value: " + newValue);
-                        accessBridge.propertyDescriptionChange(e, ac, oldValue, newValue);
-
-                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_NAME_PROPERTY) == 0) {
-                        String oldValue = null;
-                        String newValue = null;
-
-                        if (e.getOldValue() != null) {
-                            oldValue = e.getOldValue().toString();
-                        }
-                        if (e.getNewValue() != null) {
-                            newValue = e.getNewValue().toString();
-                        }
-                        accessBridge.debugString(" - about to call propertyNameChange()");
-                        accessBridge.debugString("   old value: " + oldValue + " new value: " + newValue);
-                        accessBridge.propertyNameChange(e, ac, oldValue, newValue);
-
-                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY) == 0) {
-                        accessBridge.debugString(" - about to call propertySelectionChange() " + ac +  "   " + Thread.currentThread() + "   " + e.getSource());
-
-                        accessBridge.propertySelectionChange(e, ac);
-
-                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_STATE_PROPERTY) == 0) {
-                        String oldValue = null;
-                        String newValue = null;
-
-                        // Localization fix requested by Oliver for EA-1
-                        if (e.getOldValue() != null) {
-                            AccessibleState oldState = (AccessibleState) e.getOldValue();
-                            oldValue = oldState.toDisplayString(Locale.US);
-                        }
-                        if (e.getNewValue() != null) {
-                            AccessibleState newState = (AccessibleState) e.getNewValue();
-                            newValue = newState.toDisplayString(Locale.US);
-                        }
-
-                        accessBridge.debugString(" - about to call propertyStateChange()");
-                        accessBridge.propertyStateChange(e, ac, oldValue, newValue);
-
-                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_TEXT_PROPERTY) == 0) {
-                        accessBridge.debugString(" - about to call propertyTextChange()");
-                        accessBridge.propertyTextChange(e, ac);
-
-                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY) == 0) {  // strings 'cause of floating point, etc.
-                        String oldValue = null;
-                        String newValue = null;
-
-                        if (e.getOldValue() != null) {
-                            oldValue = e.getOldValue().toString();
-                        }
-                        if (e.getNewValue() != null) {
-                            newValue = e.getNewValue().toString();
-                        }
-                        accessBridge.debugString(" - about to call propertyDescriptionChange()");
-                        accessBridge.propertyValueChange(e, ac, oldValue, newValue);
-
-                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY) == 0) {
-                        accessBridge.propertyVisibleDataChange(e, ac);
-
-                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_CHILD_PROPERTY) == 0) {
-                        AccessibleContext oldAC = null;
-                        AccessibleContext newAC = null;
-                        Accessible a;
-
-                        if (e.getOldValue() instanceof AccessibleContext) {
-                            oldAC = (AccessibleContext) e.getOldValue();
-                            InvocationUtils.registerAccessibleContext(oldAC, AppContext.getAppContext());
-                        }
-                        if (e.getNewValue() instanceof AccessibleContext) {
-                            newAC = (AccessibleContext) e.getNewValue();
-                            InvocationUtils.registerAccessibleContext(newAC, AppContext.getAppContext());
-                        }
-                        accessBridge.debugString(" - about to call propertyChildChange()");
-                        accessBridge.debugString("   old AC: " + oldAC + "new AC: " + newAC);
-                        accessBridge.propertyChildChange(e, ac, oldAC, newAC);
-
-                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY) == 0) {
-                        handleActiveDescendentEvent(e, ac);
-                    }
-                }
-            }
-        }
-
-        /*
-        * Handle an ActiveDescendent PropertyChangeEvent.  This
-        * method works around a JTree bug where ActiveDescendent
-        * PropertyChangeEvents have the wrong parent.
-        */
-        private AccessibleContext prevAC = null; // previous AccessibleContext
-
-        private void handleActiveDescendentEvent(PropertyChangeEvent e,
-                                                 AccessibleContext ac) {
-            if (e == null || ac == null)
-                return;
-            AccessibleContext oldAC = null;
-            AccessibleContext newAC = null;
-            Accessible a;
-
-            // get the old active descendent
-            if (e.getOldValue() instanceof Accessible) {
-                oldAC = ((Accessible) e.getOldValue()).getAccessibleContext();
-            } else if (e.getOldValue() instanceof Component) {
-                a = Translator.getAccessible(e.getOldValue());
-                if (a != null) {
-                    oldAC = a.getAccessibleContext();
-                }
-            }
-            if (oldAC != null) {
-                Accessible parent = oldAC.getAccessibleParent();
-                if (parent instanceof JTree) {
-                    // use the previous AccessibleJTreeNode
-                    oldAC = prevAC;
-                }
-            }
-
-            // get the new active descendent
-            if (e.getNewValue() instanceof Accessible) {
-                newAC = ((Accessible) e.getNewValue()).getAccessibleContext();
-            } else if (e.getNewValue() instanceof Component) {
-                a = Translator.getAccessible(e.getNewValue());
-                if (a != null) {
-                    newAC = a.getAccessibleContext();
-                }
-            }
-            if (newAC != null) {
-                Accessible parent = newAC.getAccessibleParent();
-                if (parent instanceof JTree) {
-                    // use a new AccessibleJTreeNode with the right parent
-                    JTree tree = (JTree)parent;
-                    newAC = new AccessibleJTreeNode(tree,
-                                                    tree.getSelectionPath(),
-                                                    null);
-                }
-            }
-            prevAC = newAC;
-
-            accessBridge.debugString("  - about to call propertyActiveDescendentChange()");
-            accessBridge.debugString("   AC: " + ac);
-            accessBridge.debugString("   old AC: " + oldAC + "new AC: " + newAC);
-
-            InvocationUtils.registerAccessibleContext(oldAC, AppContext.getAppContext());
-            InvocationUtils.registerAccessibleContext(newAC, AppContext.getAppContext());
-            accessBridge.propertyActiveDescendentChange(e, ac, oldAC, newAC);
-        }
-
-        /**
-        *  ------- focus event glue
-        */
-        private boolean stateChangeListenerAdded = false;
-
-        public void focusGained(FocusEvent e) {
-            processFocusGained();
-        }
-
-        public void stateChanged(ChangeEvent e) {
-            processFocusGained();
-        }
-
-        private void processFocusGained() {
-            Component focusOwner = KeyboardFocusManager.
-            getCurrentKeyboardFocusManager().getFocusOwner();
-            if (focusOwner == null) {
-                return;
-            }
-
-            // Only menus and popup selections are handled by the JRootPane.
-            if (focusOwner instanceof JRootPane) {
-                MenuElement [] path =
-                MenuSelectionManager.defaultManager().getSelectedPath();
-                if (path.length > 1) {
-                    Component penult = path[path.length-2].getComponent();
-                    Component last = path[path.length-1].getComponent();
-
-                    if (last instanceof JPopupMenu) {
-                        // This is a popup with nothing in the popup
-                        // selected. The menu itself is selected.
-                        FocusEvent e = new FocusEvent(penult, FocusEvent.FOCUS_GAINED);
-                        AccessibleContext context = penult.getAccessibleContext();
-                        InvocationUtils.registerAccessibleContext(context, SunToolkit.targetToAppContext(penult));
-                        accessBridge.focusGained(e, context);
-                    } else if (penult instanceof JPopupMenu) {
-                        // This is a popup with an item selected
-                        FocusEvent e =
-                        new FocusEvent(last, FocusEvent.FOCUS_GAINED);
-                        accessBridge.debugString(" - about to call focusGained()");
-                        AccessibleContext focusedAC = last.getAccessibleContext();
-                        InvocationUtils.registerAccessibleContext(focusedAC, SunToolkit.targetToAppContext(last));
-                        accessBridge.debugString("   AC: " + focusedAC);
-                        accessBridge.focusGained(e, focusedAC);
-                    }
-                }
-            } else {
-                // The focus owner has the selection.
-                if (focusOwner instanceof Accessible) {
-                    FocusEvent e = new FocusEvent(focusOwner,
-                                                  FocusEvent.FOCUS_GAINED);
-                    accessBridge.debugString(" - about to call focusGained()");
-                    AccessibleContext focusedAC = focusOwner.getAccessibleContext();
-                    InvocationUtils.registerAccessibleContext(focusedAC, SunToolkit.targetToAppContext(focusOwner));
-                    accessBridge.debugString("   AC: " + focusedAC);
-                    accessBridge.focusGained(e, focusedAC);
-                }
-            }
-        }
-
-        public void focusLost(FocusEvent e) {
-            if (e != null && (javaEventMask & FOCUS_LOST_EVENTS) != 0) {
-                Accessible a = Translator.getAccessible(e.getSource());
-                if (a != null) {
-                    accessBridge.debugString(" - about to call focusLost()");
-                    accessBridge.debugString("   AC: " + a.getAccessibleContext());
-                    AccessibleContext context = a.getAccessibleContext();
-                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
-                    accessBridge.focusLost(e, context);
-                }
-            }
-        }
-
-        /**
-         *  ------- caret event glue
-         */
-        public void caretUpdate(CaretEvent e) {
-            if (e != null && (javaEventMask & CARET_UPATE_EVENTS) != 0) {
-                Accessible a = Translator.getAccessible(e.getSource());
-                if (a != null) {
-                    AccessibleContext context = a.getAccessibleContext();
-                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
-                    accessBridge.caretUpdate(e, context);
-                }
-            }
-        }
-
-    /**
-     *  ------- mouse event glue
-     */
-
-        public void mouseClicked(MouseEvent e) {
-            if (e != null && (javaEventMask & MOUSE_CLICKED_EVENTS) != 0) {
-                Accessible a = Translator.getAccessible(e.getSource());
-                if (a != null) {
-                    AccessibleContext context = a.getAccessibleContext();
-                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
-                    accessBridge.mouseClicked(e, context);
-                }
-            }
-        }
-
-        public void mouseEntered(MouseEvent e) {
-            if (e != null && (javaEventMask & MOUSE_ENTERED_EVENTS) != 0) {
-                Accessible a = Translator.getAccessible(e.getSource());
-                if (a != null) {
-                    AccessibleContext context = a.getAccessibleContext();
-                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
-                    accessBridge.mouseEntered(e, context);
-                }
-            }
-        }
-
-        public void mouseExited(MouseEvent e) {
-            if (e != null && (javaEventMask & MOUSE_EXITED_EVENTS) != 0) {
-                Accessible a = Translator.getAccessible(e.getSource());
-                if (a != null) {
-                    AccessibleContext context = a.getAccessibleContext();
-                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
-                    accessBridge.mouseExited(e, context);
-                }
-            }
-        }
-
-        public void mousePressed(MouseEvent e) {
-            if (e != null && (javaEventMask & MOUSE_PRESSED_EVENTS) != 0) {
-                Accessible a = Translator.getAccessible(e.getSource());
-                if (a != null) {
-                    AccessibleContext context = a.getAccessibleContext();
-                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
-                    accessBridge.mousePressed(e, context);
-                }
-            }
-        }
-
-        public void mouseReleased(MouseEvent e) {
-            if (e != null && (javaEventMask & MOUSE_RELEASED_EVENTS) != 0) {
-                Accessible a = Translator.getAccessible(e.getSource());
-                if (a != null) {
-                    AccessibleContext context = a.getAccessibleContext();
-                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
-                    accessBridge.mouseReleased(e, context);
-                }
-            }
-        }
-
-        /**
-         *  ------- menu event glue
-         */
-        public void menuCanceled(MenuEvent e) {
-            if (e != null && (javaEventMask & MENU_CANCELED_EVENTS) != 0) {
-                Accessible a = Translator.getAccessible(e.getSource());
-                if (a != null) {
-                    AccessibleContext context = a.getAccessibleContext();
-                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
-                    accessBridge.menuCanceled(e, context);
-                }
-            }
-        }
-
-        public void menuDeselected(MenuEvent e) {
-            if (e != null && (javaEventMask & MENU_DESELECTED_EVENTS) != 0) {
-                Accessible a = Translator.getAccessible(e.getSource());
-                if (a != null) {
-                    AccessibleContext context = a.getAccessibleContext();
-                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
-                    accessBridge.menuDeselected(e, context);
-                }
-            }
-        }
-
-        public void menuSelected(MenuEvent e) {
-            if (e != null && (javaEventMask & MENU_SELECTED_EVENTS) != 0) {
-                Accessible a = Translator.getAccessible(e.getSource());
-                if (a != null) {
-                    AccessibleContext context = a.getAccessibleContext();
-                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
-                    accessBridge.menuSelected(e, context);
-                }
-            }
-        }
-
-        public void popupMenuCanceled(PopupMenuEvent e) {
-            if (e != null && (javaEventMask & POPUPMENU_CANCELED_EVENTS) != 0) {
-                Accessible a = Translator.getAccessible(e.getSource());
-                if (a != null) {
-                    AccessibleContext context = a.getAccessibleContext();
-                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
-                    accessBridge.popupMenuCanceled(e, context);
-                }
-            }
-        }
-
-        public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
-            if (e != null && (javaEventMask & POPUPMENU_WILL_BECOME_INVISIBLE_EVENTS) != 0) {
-                Accessible a = Translator.getAccessible(e.getSource());
-                if (a != null) {
-                    AccessibleContext context = a.getAccessibleContext();
-                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
-                    accessBridge.popupMenuWillBecomeInvisible(e, context);
-                }
-            }
-        }
-
-        public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
-            if (e != null && (javaEventMask & POPUPMENU_WILL_BECOME_VISIBLE_EVENTS) != 0) {
-                Accessible a = Translator.getAccessible(e.getSource());
-                if (a != null) {
-                    AccessibleContext context = a.getAccessibleContext();
-                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
-                    accessBridge.popupMenuWillBecomeVisible(e, context);
-                }
-            }
-        }
-
-    } // End of EventHandler Class
-
-    // --------- Event Notification Registration methods
-
-    /**
-     *  Wrapper method around eventHandler.addJavaEventNotification()
-     */
-    private void addJavaEventNotification(final long type) {
-        EventQueue.invokeLater(new Runnable() {
-            public void run(){
-                eventHandler.addJavaEventNotification(type);
-            }
-        });
-    }
-
-    /**
-     *  Wrapper method around eventHandler.removeJavaEventNotification()
-     */
-    private void removeJavaEventNotification(final long type) {
-        EventQueue.invokeLater(new Runnable() {
-            public void run(){
-                eventHandler.removeJavaEventNotification(type);
-            }
-        });
-    }
-
-
-    /**
-     *  Wrapper method around eventHandler.addAccessibilityEventNotification()
-     */
-    private void addAccessibilityEventNotification(final long type) {
-        EventQueue.invokeLater(new Runnable() {
-            public void run(){
-                eventHandler.addAccessibilityEventNotification(type);
-            }
-        });
-    }
-
-    /**
-     *  Wrapper method around eventHandler.removeAccessibilityEventNotification()
-     */
-    private void removeAccessibilityEventNotification(final long type) {
-        EventQueue.invokeLater(new Runnable() {
-            public void run(){
-                eventHandler.removeAccessibilityEventNotification(type);
-            }
-        });
-    }
-
-    /**
-     ******************************************************
-     * All AccessibleRoles
-     *
-     * We shouldn't have to do this since it requires us
-     * to synchronize the allAccessibleRoles array when
-     * the AccessibleRoles class interface changes. However,
-     * there is no Accessibility API method to get all
-     * AccessibleRoles
-     ******************************************************
-     */
-    private AccessibleRole [] allAccessibleRoles = {
-    /**
-     * Object is used to alert the user about something.
-     */
-    AccessibleRole.ALERT,
-
-    /**
-     * The header for a column of data.
-     */
-    AccessibleRole.COLUMN_HEADER,
-
-    /**
-     * Object that can be drawn into and is used to trap
-     * events.
-     * @see #FRAME
-     * @see #GLASS_PANE
-     * @see #LAYERED_PANE
-     */
-    AccessibleRole.CANVAS,
-
-    /**
-     * A list of choices the user can select from.  Also optionally
-     * allows the user to enter a choice of their own.
-     */
-    AccessibleRole.COMBO_BOX,
-
-    /**
-     * An iconified internal frame in a DESKTOP_PANE.
-     * @see #DESKTOP_PANE
-     * @see #INTERNAL_FRAME
-     */
-    AccessibleRole.DESKTOP_ICON,
-
-    /**
-     * A frame-like object that is clipped by a desktop pane.  The
-     * desktop pane, internal frame, and desktop icon objects are
-     * often used to create multiple document interfaces within an
-     * application.
-     * @see #DESKTOP_ICON
-     * @see #DESKTOP_PANE
-     * @see #FRAME
-     */
-    AccessibleRole.INTERNAL_FRAME,
-
-    /**
-     * A pane that supports internal frames and
-     * iconified versions of those internal frames.
-     * @see #DESKTOP_ICON
-     * @see #INTERNAL_FRAME
-     */
-    AccessibleRole.DESKTOP_PANE,
-
-    /**
-     * A specialized pane whose primary use is inside a DIALOG
-     * @see #DIALOG
-     */
-    AccessibleRole.OPTION_PANE,
-
-    /**
-     * A top level window with no title or border.
-     * @see #FRAME
-     * @see #DIALOG
-     */
-    AccessibleRole.WINDOW,
-
-    /**
-     * A top level window with a title bar, border, menu bar, etc.  It is
-     * often used as the primary window for an application.
-     * @see #DIALOG
-     * @see #CANVAS
-     * @see #WINDOW
-     */
-    AccessibleRole.FRAME,
-
-    /**
-     * A top level window with title bar and a border.  A dialog is similar
-     * to a frame, but it has fewer properties and is often used as a
-     * secondary window for an application.
-     * @see #FRAME
-     * @see #WINDOW
-     */
-    AccessibleRole.DIALOG,
-
-    /**
-     * A specialized dialog that lets the user choose a color.
-     */
-    AccessibleRole.COLOR_CHOOSER,
-
-
-    /**
-     * A pane that allows the user to navigate through
-     * and select the contents of a directory.  May be used
-     * by a file chooser.
-     * @see #FILE_CHOOSER
-     */
-    AccessibleRole.DIRECTORY_PANE,
-
-    /**
-     * A specialized dialog that displays the files in the directory
-     * and lets the user select a file, browse a different directory,
-     * or specify a filename.  May use the directory pane to show the
-     * contents of a directory.
-     * @see #DIRECTORY_PANE
-     */
-    AccessibleRole.FILE_CHOOSER,
-
-    /**
-     * An object that fills up space in a user interface.  It is often
-     * used in interfaces to tweak the spacing between components,
-     * but serves no other purpose.
-     */
-    AccessibleRole.FILLER,
-
-    /**
-     * A hypertext anchor
-     */
-    // AccessibleRole.HYPERLINK,
-
-    /**
-     * A small fixed size picture, typically used to decorate components.
-     */
-    AccessibleRole.ICON,
-
-    /**
-     * An object used to present an icon or short string in an interface.
-     */
-    AccessibleRole.LABEL,
-
-    /**
-     * A specialized pane that has a glass pane and a layered pane as its
-     * children.
-     * @see #GLASS_PANE
-     * @see #LAYERED_PANE
-     */
-    AccessibleRole.ROOT_PANE,
-
-    /**
-     * A pane that is guaranteed to be painted on top
-     * of all panes beneath it.
-     * @see #ROOT_PANE
-     * @see #CANVAS
-     */
-    AccessibleRole.GLASS_PANE,
-
-    /**
-     * A specialized pane that allows its children to be drawn in layers,
-     * providing a form of stacking order.  This is usually the pane that
-     * holds the menu bar as well as the pane that contains most of the
-     * visual components in a window.
-     * @see #GLASS_PANE
-     * @see #ROOT_PANE
-     */
-    AccessibleRole.LAYERED_PANE,
-
-    /**
-     * An object that presents a list of objects to the user and allows the
-     * user to select one or more of them.  A list is usually contained
-     * within a scroll pane.
-     * @see #SCROLL_PANE
-     * @see #LIST_ITEM
-     */
-    AccessibleRole.LIST,
-
-    /**
-     * An object that presents an element in a list.  A list is usually
-     * contained within a scroll pane.
-     * @see #SCROLL_PANE
-     * @see #LIST
-     */
-    AccessibleRole.LIST_ITEM,
-
-    /**
-     * An object usually drawn at the top of the primary dialog box of
-     * an application that contains a list of menus the user can choose
-     * from.  For example, a menu bar might contain menus for "File,"
-     * "Edit," and "Help."
-     * @see #MENU
-     * @see #POPUP_MENU
-     * @see #LAYERED_PANE
-     */
-    AccessibleRole.MENU_BAR,
-
-    /**
-     * A temporary window that is usually used to offer the user a
-     * list of choices, and then hides when the user selects one of
-     * those choices.
-     * @see #MENU
-     * @see #MENU_ITEM
-     */
-    AccessibleRole.POPUP_MENU,
-
-    /**
-     * An object usually found inside a menu bar that contains a list
-     * of actions the user can choose from.  A menu can have any object
-     * as its children, but most often they are menu items, other menus,
-     * or rudimentary objects such as radio buttons, check boxes, or
-     * separators.  For example, an application may have an "Edit" menu
-     * that contains menu items for "Cut" and "Paste."
-     * @see #MENU_BAR
-     * @see #MENU_ITEM
-     * @see #SEPARATOR
-     * @see #RADIO_BUTTON
-     * @see #CHECK_BOX
-     * @see #POPUP_MENU
-     */
-    AccessibleRole.MENU,
-
-    /**
-     * An object usually contained in a menu that presents an action
-     * the user can choose.  For example, the "Cut" menu item in an
-     * "Edit" menu would be an action the user can select to cut the
-     * selected area of text in a document.
-     * @see #MENU_BAR
-     * @see #SEPARATOR
-     * @see #POPUP_MENU
-     */
-    AccessibleRole.MENU_ITEM,
-
-    /**
-     * An object usually contained in a menu to provide a visual
-     * and logical separation of the contents in a menu.  For example,
-     * the "File" menu of an application might contain menu items for
-     * "Open," "Close," and "Exit," and will place a separator between
-     * "Close" and "Exit" menu items.
-     * @see #MENU
-     * @see #MENU_ITEM
-     */
-    AccessibleRole.SEPARATOR,
-
-    /**
-     * An object that presents a series of panels (or page tabs), one at a
-     * time, through some mechanism provided by the object.  The most common
-     * mechanism is a list of tabs at the top of the panel.  The children of
-     * a page tab list are all page tabs.
-     * @see #PAGE_TAB
-     */
-    AccessibleRole.PAGE_TAB_LIST,
-
-    /**
-     * An object that is a child of a page tab list.  Its sole child is
-     * the panel that is to be presented to the user when the user
-     * selects the page tab from the list of tabs in the page tab list.
-     * @see #PAGE_TAB_LIST
-     */
-    AccessibleRole.PAGE_TAB,
-
-    /**
-     * A generic container that is often used to group objects.
-     */
-    AccessibleRole.PANEL,
-
-    /**
-     * An object used to indicate how much of a task has been completed.
-     */
-    AccessibleRole.PROGRESS_BAR,
-
-    /**
-     * A text object used for passwords, or other places where the
-     * text contents is not shown visibly to the user
-     */
-    AccessibleRole.PASSWORD_TEXT,
-
-    /**
-     * An object the user can manipulate to tell the application to do
-     * something.
-     * @see #CHECK_BOX
-     * @see #TOGGLE_BUTTON
-     * @see #RADIO_BUTTON
-     */
-    AccessibleRole.PUSH_BUTTON,
-
-    /**
-     * A specialized push button that can be checked or unchecked, but
-     * does not provide a separate indicator for the current state.
-     * @see #PUSH_BUTTON
-     * @see #CHECK_BOX
-     * @see #RADIO_BUTTON
-     */
-    AccessibleRole.TOGGLE_BUTTON,
-
-    /**
-     * A choice that can be checked or unchecked and provides a
-     * separate indicator for the current state.
-     * @see #PUSH_BUTTON
-     * @see #TOGGLE_BUTTON
-     * @see #RADIO_BUTTON
-     */
-    AccessibleRole.CHECK_BOX,
-
-    /**
-     * A specialized check box that will cause other radio buttons in the
-     * same group to become unchecked when this one is checked.
-     * @see #PUSH_BUTTON
-     * @see #TOGGLE_BUTTON
-     * @see #CHECK_BOX
-     */
-    AccessibleRole.RADIO_BUTTON,
-
-    /**
-     * The header for a row of data.
-     */
-    AccessibleRole.ROW_HEADER,
-
-    /**
-     * An object that allows a user to incrementally view a large amount
-     * of information.  Its children can include scroll bars and a viewport.
-     * @see #SCROLL_BAR
-     * @see #VIEWPORT
-     */
-    AccessibleRole.SCROLL_PANE,
-
-    /**
-     * An object usually used to allow a user to incrementally view a
-     * large amount of data.  Usually used only by a scroll pane.
-     * @see #SCROLL_PANE
-     */
-    AccessibleRole.SCROLL_BAR,
-
-    /**
-     * An object usually used in a scroll pane.  It represents the portion
-     * of the entire data that the user can see.  As the user manipulates
-     * the scroll bars, the contents of the viewport can change.
-     * @see #SCROLL_PANE
-     */
-    AccessibleRole.VIEWPORT,
-
-    /**
-     * An object that allows the user to select from a bounded range.  For
-     * example, a slider might be used to select a number between 0 and 100.
-     */
-    AccessibleRole.SLIDER,
-
-    /**
-     * A specialized panel that presents two other panels at the same time.
-     * Between the two panels is a divider the user can manipulate to make
-     * one panel larger and the other panel smaller.
-     */
-    AccessibleRole.SPLIT_PANE,
-
-    /**
-     * An object used to present information in terms of rows and columns.
-     * An example might include a spreadsheet application.
-     */
-    AccessibleRole.TABLE,
-
-    /**
-     * An object that presents text to the user.  The text is usually
-     * editable by the user as opposed to a label.
-     * @see #LABEL
-     */
-    AccessibleRole.TEXT,
-
-    /**
-     * An object used to present hierarchical information to the user.
-     * The individual nodes in the tree can be collapsed and expanded
-     * to provide selective disclosure of the tree's contents.
-     */
-    AccessibleRole.TREE,
-
-    /**
-     * A bar or palette usually composed of push buttons or toggle buttons.
-     * It is often used to provide the most frequently used functions for an
-     * application.
-     */
-    AccessibleRole.TOOL_BAR,
-
-    /**
-     * An object that provides information about another object.  The
-     * accessibleDescription property of the tool tip is often displayed
-     * to the user in a small "help bubble" when the user causes the
-     * mouse to hover over the object associated with the tool tip.
-     */
-    AccessibleRole.TOOL_TIP,
-
-    /**
-     * An AWT component, but nothing else is known about it.
-     * @see #SWING_COMPONENT
-     * @see #UNKNOWN
-     */
-    AccessibleRole.AWT_COMPONENT,
-
-    /**
-     * A Swing component, but nothing else is known about it.
-     * @see #AWT_COMPONENT
-     * @see #UNKNOWN
-     */
-    AccessibleRole.SWING_COMPONENT,
-
-    /**
-     * The object contains some Accessible information, but its role is
-     * not known.
-     * @see #AWT_COMPONENT
-     * @see #SWING_COMPONENT
-     */
-    AccessibleRole.UNKNOWN,
-
-    // These roles are only available in JDK 1.4
-
-    /**
-     * A STATUS_BAR is an simple component that can contain
-     * multiple labels of status information to the user.
-     AccessibleRole.STATUS_BAR,
-
-     /**
-     * A DATE_EDITOR is a component that allows users to edit
-     * java.util.Date and java.util.Time objects
-     AccessibleRole.DATE_EDITOR,
-
-     /**
-     * A SPIN_BOX is a simple spinner component and its main use
-     * is for simple numbers.
-     AccessibleRole.SPIN_BOX,
-
-     /**
-     * A FONT_CHOOSER is a component that lets the user pick various
-     * attributes for fonts.
-     AccessibleRole.FONT_CHOOSER,
-
-     /**
-     * A GROUP_BOX is a simple container that contains a border
-     * around it and contains components inside it.
-     AccessibleRole.GROUP_BOX
-
-     /**
-     * Since JDK 1.5
-     *
-     * A text header
-
-     AccessibleRole.HEADER,
-
-     /**
-     * A text footer
-
-     AccessibleRole.FOOTER,
-
-     /**
-     * A text paragraph
-
-     AccessibleRole.PARAGRAPH,
-
-     /**
-     * A ruler is an object used to measure distance
-
-     AccessibleRole.RULER,
-
-     /**
-     * A role indicating the object acts as a formula for
-     * calculating a value.  An example is a formula in
-     * a spreadsheet cell.
-     AccessibleRole.EDITBAR
-    */
-    };
-
-    /**
-     * This class implements accessibility support for the
-     * <code>JTree</code> child.  It provides an implementation of the
-     * Java Accessibility API appropriate to tree nodes.
-     *
-     * Copied from JTree.java to work around a JTree bug where
-     * ActiveDescendent PropertyChangeEvents contain the wrong
-     * parent.
-     */
-    /**
-     * This class in invoked on the EDT as its part of ActiveDescendant,
-     * hence the calls do not need to be specifically made on the EDT
-     */
-    private class AccessibleJTreeNode extends AccessibleContext
-        implements Accessible, AccessibleComponent, AccessibleSelection,
-                   AccessibleAction {
-
-        private JTree tree = null;
-        private TreeModel treeModel = null;
-        private Object obj = null;
-        private TreePath path = null;
-        private Accessible accessibleParent = null;
-        private int index = 0;
-        private boolean isLeaf = false;
-
-        /**
-         *  Constructs an AccessibleJTreeNode
-         */
-        AccessibleJTreeNode(JTree t, TreePath p, Accessible ap) {
-            tree = t;
-            path = p;
-            accessibleParent = ap;
-            if (t != null)
-                treeModel = t.getModel();
-            if (p != null) {
-                obj = p.getLastPathComponent();
-                if (treeModel != null && obj != null) {
-                    isLeaf = treeModel.isLeaf(obj);
-                }
-            }
-            debugString("AccessibleJTreeNode: name = "+getAccessibleName()+"; TreePath = "+p+"; parent = "+ap);
-        }
-
-        private TreePath getChildTreePath(int i) {
-            // Tree nodes can't be so complex that they have
-            // two sets of children -> we're ignoring that case
-            if (i < 0 || i >= getAccessibleChildrenCount() || path == null || treeModel == null) {
-                return null;
-            } else {
-                Object childObj = treeModel.getChild(obj, i);
-                Object[] objPath = path.getPath();
-                Object[] objChildPath = new Object[objPath.length+1];
-                java.lang.System.arraycopy(objPath, 0, objChildPath, 0, objPath.length);
-                objChildPath[objChildPath.length-1] = childObj;
-                return new TreePath(objChildPath);
-            }
-        }
-
-        /**
-         * Get the AccessibleContext associated with this tree node.
-         * In the implementation of the Java Accessibility API for
-         * this class, return this object, which is its own
-         * AccessibleContext.
-         *
-         * @return this object
-        */
-        public AccessibleContext getAccessibleContext() {
-            return this;
-        }
-
-        private AccessibleContext getCurrentAccessibleContext() {
-            Component c = getCurrentComponent();
-            if (c instanceof Accessible) {
-               return (c.getAccessibleContext());
-            } else {
-                return null;
-            }
-        }
-
-        private Component getCurrentComponent() {
-            debugString("AccessibleJTreeNode: getCurrentComponent");
-            // is the object visible?
-            // if so, get row, selected, focus & leaf state,
-            // and then get the renderer component and return it
-            if (tree != null && tree.isVisible(path)) {
-                TreeCellRenderer r = tree.getCellRenderer();
-                if (r == null) {
-                    debugString("  returning null 1");
-                    return null;
-                }
-                TreeUI ui = tree.getUI();
-                if (ui != null) {
-                    int row = ui.getRowForPath(tree, path);
-                    boolean selected = tree.isPathSelected(path);
-                    boolean expanded = tree.isExpanded(path);
-                    boolean hasFocus = false; // how to tell?? -PK
-                    Component retval = r.getTreeCellRendererComponent(tree, obj,
-                                                                      selected, expanded,
-                                                                      isLeaf, row, hasFocus);
-                    debugString("  returning = "+retval.getClass());
-                    return retval;
-                }
-            }
-            debugString("  returning null 2");
-            return null;
-        }
-
-        // AccessibleContext methods
-
-        /**
-         * Get the accessible name of this object.
-         *
-         * @return the localized name of the object; null if this
-         * object does not have a name
-         */
-        public String getAccessibleName() {
-            debugString("AccessibleJTreeNode: getAccessibleName");
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac != null) {
-                String name = ac.getAccessibleName();
-                if ((name != null) && (!name.isEmpty())) {
-                    String retval = ac.getAccessibleName();
-                    debugString("    returning "+retval);
-                    return retval;
-                } else {
-                    return null;
-                }
-            }
-            if ((accessibleName != null) && (accessibleName.isEmpty())) {
-                return accessibleName;
-            } else {
-                return null;
-            }
-        }
-
-        /**
-         * Set the localized accessible name of this object.
-         *
-         * @param s the new localized name of the object.
-         */
-        public void setAccessibleName(String s) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac != null) {
-                ac.setAccessibleName(s);
-            } else {
-                super.setAccessibleName(s);
-            }
-        }
-
-        //
-        // *** should check tooltip text for desc. (needs MouseEvent)
-        //
-        /**
-         * Get the accessible description of this object.
-         *
-         * @return the localized description of the object; null if
-         * this object does not have a description
-         */
-        public String getAccessibleDescription() {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac != null) {
-                return ac.getAccessibleDescription();
-            } else {
-                return super.getAccessibleDescription();
-            }
-        }
-
-        /**
-         * Set the accessible description of this object.
-         *
-         * @param s the new localized description of the object
-         */
-        public void setAccessibleDescription(String s) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac != null) {
-                ac.setAccessibleDescription(s);
-            } else {
-                super.setAccessibleDescription(s);
-            }
-        }
-
-        /**
-         * Get the role of this object.
-         *
-         * @return an instance of AccessibleRole describing the role of the object
-         * @see AccessibleRole
-         */
-        public AccessibleRole getAccessibleRole() {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac != null) {
-                return ac.getAccessibleRole();
-            } else {
-                return AccessibleRole.UNKNOWN;
-            }
-        }
-
-        /**
-         * Get the state set of this object.
-         *
-         * @return an instance of AccessibleStateSet containing the
-         * current state set of the object
-         * @see AccessibleState
-         */
-        public AccessibleStateSet getAccessibleStateSet() {
-            if (tree == null)
-                return null;
-            AccessibleContext ac = getCurrentAccessibleContext();
-            AccessibleStateSet states;
-            int row = tree.getUI().getRowForPath(tree,path);
-            int lsr = tree.getLeadSelectionRow();
-            if (ac != null) {
-                states = ac.getAccessibleStateSet();
-            } else {
-                states = new AccessibleStateSet();
-            }
-            // need to test here, 'cause the underlying component
-            // is a cellRenderer, which is never showing...
-            if (isShowing()) {
-                states.add(AccessibleState.SHOWING);
-            } else if (states.contains(AccessibleState.SHOWING)) {
-                states.remove(AccessibleState.SHOWING);
-            }
-            if (isVisible()) {
-                states.add(AccessibleState.VISIBLE);
-            } else if (states.contains(AccessibleState.VISIBLE)) {
-                states.remove(AccessibleState.VISIBLE);
-            }
-            if (tree.isPathSelected(path)){
-                states.add(AccessibleState.SELECTED);
-            }
-            if (lsr == row) {
-                states.add(AccessibleState.ACTIVE);
-            }
-            if (!isLeaf) {
-                states.add(AccessibleState.EXPANDABLE);
-            }
-            if (tree.isExpanded(path)) {
-                states.add(AccessibleState.EXPANDED);
-            } else {
-                states.add(AccessibleState.COLLAPSED);
-            }
-            if (tree.isEditable()) {
-                states.add(AccessibleState.EDITABLE);
-            }
-            return states;
-        }
-
-        /**
-         * Get the Accessible parent of this object.
-         *
-         * @return the Accessible parent of this object; null if this
-         * object does not have an Accessible parent
-         */
-        public Accessible getAccessibleParent() {
-            // someone wants to know, so we need to create our parent
-            // if we don't have one (hey, we're a talented kid!)
-            if (accessibleParent == null && path != null) {
-                Object[] objPath = path.getPath();
-                if (objPath.length > 1) {
-                    Object objParent = objPath[objPath.length-2];
-                    if (treeModel != null) {
-                        index = treeModel.getIndexOfChild(objParent, obj);
-                    }
-                    Object[] objParentPath = new Object[objPath.length-1];
-                    java.lang.System.arraycopy(objPath, 0, objParentPath,
-                                               0, objPath.length-1);
-                    TreePath parentPath = new TreePath(objParentPath);
-                    accessibleParent = new AccessibleJTreeNode(tree,
-                                                               parentPath,
-                                                               null);
-                    this.setAccessibleParent(accessibleParent);
-                } else if (treeModel != null) {
-                    accessibleParent = tree; // we're the top!
-                    index = 0; // we're an only child!
-                    this.setAccessibleParent(accessibleParent);
-                }
-            }
-            return accessibleParent;
-        }
-
-        /**
-         * Get the index of this object in its accessible parent.
-         *
-         * @return the index of this object in its parent; -1 if this
-         * object does not have an accessible parent.
-         * @see #getAccessibleParent
-         */
-        public int getAccessibleIndexInParent() {
-            // index is invalid 'till we have an accessibleParent...
-            if (accessibleParent == null) {
-                getAccessibleParent();
-            }
-            if (path != null) {
-                Object[] objPath = path.getPath();
-                if (objPath.length > 1) {
-                    Object objParent = objPath[objPath.length-2];
-                    if (treeModel != null) {
-                        index = treeModel.getIndexOfChild(objParent, obj);
-                    }
-                }
-            }
-            return index;
-        }
-
-        /**
-         * Returns the number of accessible children in the object.
-         *
-         * @return the number of accessible children in the object.
-         */
-        public int getAccessibleChildrenCount() {
-            // Tree nodes can't be so complex that they have
-            // two sets of children -> we're ignoring that case
-            if (obj != null && treeModel != null) {
-                return treeModel.getChildCount(obj);
-            }
-            return 0;
-        }
-
-        /**
-         * Return the specified Accessible child of the object.
-         *
-         * @param i zero-based index of child
-         * @return the Accessible child of the object
-         */
-        public Accessible getAccessibleChild(int i) {
-            // Tree nodes can't be so complex that they have
-            // two sets of children -> we're ignoring that case
-            if (i < 0 || i >= getAccessibleChildrenCount() || path == null || treeModel == null) {
-                return null;
-            } else {
-                Object childObj = treeModel.getChild(obj, i);
-                Object[] objPath = path.getPath();
-                Object[] objChildPath = new Object[objPath.length+1];
-                java.lang.System.arraycopy(objPath, 0, objChildPath, 0, objPath.length);
-                objChildPath[objChildPath.length-1] = childObj;
-                TreePath childPath = new TreePath(objChildPath);
-                return new AccessibleJTreeNode(tree, childPath, this);
-            }
-        }
-
-        /**
-         * Gets the locale of the component. If the component does not have
-         * a locale, then the locale of its parent is returned.
-         *
-         * @return This component's locale. If this component does not have
-         * a locale, the locale of its parent is returned.
-         * @exception IllegalComponentStateException
-         * If the Component does not have its own locale and has not yet
-         * been added to a containment hierarchy such that the locale can be
-         * determined from the containing parent.
-         * @see #setLocale
-         */
-        public Locale getLocale() {
-            if (tree == null)
-                return null;
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac != null) {
-                return ac.getLocale();
-            } else {
-                return tree.getLocale();
-            }
-        }
-
-        /**
-         * Add a PropertyChangeListener to the listener list.
-         * The listener is registered for all properties.
-         *
-         * @param l  The PropertyChangeListener to be added
-         */
-        public void addPropertyChangeListener(PropertyChangeListener l) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac != null) {
-                ac.addPropertyChangeListener(l);
-            } else {
-                super.addPropertyChangeListener(l);
-            }
-        }
-
-        /**
-         * Remove a PropertyChangeListener from the listener list.
-         * This removes a PropertyChangeListener that was registered
-         * for all properties.
-         *
-         * @param l  The PropertyChangeListener to be removed
-         */
-        public void removePropertyChangeListener(PropertyChangeListener l) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac != null) {
-                ac.removePropertyChangeListener(l);
-            } else {
-                super.removePropertyChangeListener(l);
-            }
-        }
-
-        /**
-         * Get the AccessibleAction associated with this object.  In the
-         * implementation of the Java Accessibility API for this class,
-         * return this object, which is responsible for implementing the
-         * AccessibleAction interface on behalf of itself.
-         *
-         * @return this object
-         */
-        public AccessibleAction getAccessibleAction() {
-            return this;
-        }
-
-        /**
-         * Get the AccessibleComponent associated with this object.  In the
-         * implementation of the Java Accessibility API for this class,
-         * return this object, which is responsible for implementing the
-         * AccessibleComponent interface on behalf of itself.
-         *
-         * @return this object
-         */
-        public AccessibleComponent getAccessibleComponent() {
-            return this; // to override getBounds()
-        }
-
-        /**
-         * Get the AccessibleSelection associated with this object if one
-         * exists.  Otherwise return null.
-         *
-         * @return the AccessibleSelection, or null
-         */
-        public AccessibleSelection getAccessibleSelection() {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac != null && isLeaf) {
-                return getCurrentAccessibleContext().getAccessibleSelection();
-            } else {
-                return this;
-            }
-        }
-
-        /**
-         * Get the AccessibleText associated with this object if one
-         * exists.  Otherwise return null.
-         *
-         * @return the AccessibleText, or null
-         */
-        public AccessibleText getAccessibleText() {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac != null) {
-                return getCurrentAccessibleContext().getAccessibleText();
-            } else {
-                return null;
-            }
-        }
-
-        /**
-         * Get the AccessibleValue associated with this object if one
-         * exists.  Otherwise return null.
-         *
-         * @return the AccessibleValue, or null
-         */
-        public AccessibleValue getAccessibleValue() {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac != null) {
-                return getCurrentAccessibleContext().getAccessibleValue();
-            } else {
-                return null;
-            }
-        }
-
-
-            // AccessibleComponent methods
-
-        /**
-         * Get the background color of this object.
-         *
-         * @return the background color, if supported, of the object;
-         * otherwise, null
-         */
-        public Color getBackground() {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                return ((AccessibleComponent) ac).getBackground();
-            } else {
-                Component c = getCurrentComponent();
-                if (c != null) {
-                    return c.getBackground();
-                } else {
-                    return null;
-                }
-            }
-        }
-
-        /**
-         * Set the background color of this object.
-         *
-         * @param c the new Color for the background
-         */
-        public void setBackground(Color c) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                ((AccessibleComponent) ac).setBackground(c);
-            } else {
-                Component cp = getCurrentComponent();
-                if (    cp != null) {
-                    cp.setBackground(c);
-                }
-            }
-        }
-
-
-        /**
-         * Get the foreground color of this object.
-         *
-         * @return the foreground color, if supported, of the object;
-         * otherwise, null
-         */
-        public Color getForeground() {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                return ((AccessibleComponent) ac).getForeground();
-            } else {
-                Component c = getCurrentComponent();
-                if (c != null) {
-                    return c.getForeground();
-                } else {
-                    return null;
-                }
-            }
-        }
-
-        public void setForeground(Color c) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                ((AccessibleComponent) ac).setForeground(c);
-            } else {
-                Component cp = getCurrentComponent();
-                if (cp != null) {
-                    cp.setForeground(c);
-                }
-            }
-        }
-
-        public Cursor getCursor() {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                return ((AccessibleComponent) ac).getCursor();
-            } else {
-                Component c = getCurrentComponent();
-                if (c != null) {
-                    return c.getCursor();
-                } else {
-                    Accessible ap = getAccessibleParent();
-                    if (ap instanceof AccessibleComponent) {
-                        return ((AccessibleComponent) ap).getCursor();
-                    } else {
-                        return null;
-                    }
-                }
-            }
-        }
-
-        public void setCursor(Cursor c) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                ((AccessibleComponent) ac).setCursor(c);
-            } else {
-                Component cp = getCurrentComponent();
-                if (cp != null) {
-                    cp.setCursor(c);
-                }
-            }
-        }
-
-        public Font getFont() {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                return ((AccessibleComponent) ac).getFont();
-            } else {
-                Component c = getCurrentComponent();
-                if (c != null) {
-                    return c.getFont();
-                } else {
-                    return null;
-                }
-            }
-        }
-
-        public void setFont(Font f) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                ((AccessibleComponent) ac).setFont(f);
-            } else {
-                Component c = getCurrentComponent();
-                if (c != null) {
-                    c.setFont(f);
-                }
-            }
-        }
-
-        public FontMetrics getFontMetrics(Font f) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                return ((AccessibleComponent) ac).getFontMetrics(f);
-            } else {
-                Component c = getCurrentComponent();
-                if (c != null) {
-                    return c.getFontMetrics(f);
-                } else {
-                    return null;
-                }
-            }
-        }
-
-        public boolean isEnabled() {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                return ((AccessibleComponent) ac).isEnabled();
-            } else {
-                Component c = getCurrentComponent();
-                if (c != null) {
-                    return c.isEnabled();
-                } else {
-                    return false;
-                }
-            }
-        }
-
-        public void setEnabled(boolean b) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                ((AccessibleComponent) ac).setEnabled(b);
-            } else {
-                Component c = getCurrentComponent();
-                if (c != null) {
-                    c.setEnabled(b);
-                }
-            }
-        }
-
-        public boolean isVisible() {
-            if (tree == null)
-                return false;
-            Rectangle pathBounds = tree.getPathBounds(path);
-            Rectangle parentBounds = tree.getVisibleRect();
-            if ( pathBounds != null && parentBounds != null &&
-                 parentBounds.intersects(pathBounds) ) {
-                return true;
-            } else {
-                return false;
-            }
-        }
-
-        public void setVisible(boolean b) {
-        }
-
-        public boolean isShowing() {
-            return (tree.isShowing() && isVisible());
-        }
-
-        public boolean contains(Point p) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                Rectangle r = ((AccessibleComponent) ac).getBounds();
-                return r.contains(p);
-            } else {
-                Component c = getCurrentComponent();
-                if (c != null) {
-                    Rectangle r = c.getBounds();
-                    return r.contains(p);
-                } else {
-                    return getBounds().contains(p);
-                }
-            }
-        }
-
-        public Point getLocationOnScreen() {
-            if (tree != null) {
-                Point treeLocation = tree.getLocationOnScreen();
-                Rectangle pathBounds = tree.getPathBounds(path);
-                if (treeLocation != null && pathBounds != null) {
-                    Point nodeLocation = new Point(pathBounds.x,
-                                                   pathBounds.y);
-                    nodeLocation.translate(treeLocation.x, treeLocation.y);
-                    return nodeLocation;
-                } else {
-                    return null;
-                }
-            } else {
-                return null;
-            }
-        }
-
-        private Point getLocationInJTree() {
-            Rectangle r = tree.getPathBounds(path);
-            if (r != null) {
-                return r.getLocation();
-            } else {
-                return null;
-            }
-        }
-
-        public Point getLocation() {
-            Rectangle r = getBounds();
-            if (r != null) {
-                return r.getLocation();
-            } else {
-                return null;
-            }
-        }
-
-        public void setLocation(Point p) {
-        }
-
-        public Rectangle getBounds() {
-            if (tree == null)
-                return null;
-            Rectangle r = tree.getPathBounds(path);
-            Accessible parent = getAccessibleParent();
-            if (parent instanceof AccessibleJTreeNode) {
-                Point parentLoc = ((AccessibleJTreeNode) parent).getLocationInJTree();
-                if (parentLoc != null && r != null) {
-                    r.translate(-parentLoc.x, -parentLoc.y);
-                } else {
-                    return null;        // not visible!
-                }
-            }
-            return r;
-        }
-
-        public void setBounds(Rectangle r) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                ((AccessibleComponent) ac).setBounds(r);
-            } else {
-                Component c = getCurrentComponent();
-                if (c != null) {
-                    c.setBounds(r);
-                }
-            }
-        }
-
-        public Dimension getSize() {
-            return getBounds().getSize();
-        }
-
-        public void setSize (Dimension d) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                ((AccessibleComponent) ac).setSize(d);
-            } else {
-                Component c = getCurrentComponent();
-                if (c != null) {
-                    c.setSize(d);
-                }
-            }
-        }
-
-        /**
-        * Returns the <code>Accessible</code> child, if one exists,
-        * contained at the local coordinate <code>Point</code>.
-        * Otherwise returns <code>null</code>.
-        *
-        * @param p point in local coordinates of this
-        *    <code>Accessible</code>
-        * @return the <code>Accessible</code>, if it exists,
-        *    at the specified location; else <code>null</code>
-        */
-        public Accessible getAccessibleAt(Point p) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                return ((AccessibleComponent) ac).getAccessibleAt(p);
-            } else {
-                return null;
-            }
-        }
-
-        public boolean isFocusTraversable() {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                return ((AccessibleComponent) ac).isFocusTraversable();
-            } else {
-                Component c = getCurrentComponent();
-                if (c != null) {
-                    return c.isFocusable();
-                } else {
-                    return false;
-                }
-            }
-        }
-
-        public void requestFocus() {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                ((AccessibleComponent) ac).requestFocus();
-            } else {
-                Component c = getCurrentComponent();
-                if (c != null) {
-                    c.requestFocus();
-                }
-            }
-        }
-
-        public void addFocusListener(FocusListener l) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                ((AccessibleComponent) ac).addFocusListener(l);
-            } else {
-                Component c = getCurrentComponent();
-                if (c != null) {
-                    c.addFocusListener(l);
-                }
-            }
-        }
-
-        public void removeFocusListener(FocusListener l) {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac instanceof AccessibleComponent) {
-                ((AccessibleComponent) ac).removeFocusListener(l);
-            } else {
-                Component c = getCurrentComponent();
-                if (c != null) {
-                    c.removeFocusListener(l);
-                }
-            }
-        }
-
-            // AccessibleSelection methods
-
-        /**
-         * Returns the number of items currently selected.
-         * If no items are selected, the return value will be 0.
-         *
-         * @return the number of items currently selected.
-         */
-        public int getAccessibleSelectionCount() {
-            int count = 0;
-            int childCount = getAccessibleChildrenCount();
-            for (int i = 0; i < childCount; i++) {
-                TreePath childPath = getChildTreePath(i);
-                if (tree.isPathSelected(childPath)) {
-                    count++;
-                }
-            }
-            return count;
-        }
-
-        /**
-         * Returns an Accessible representing the specified selected item
-         * in the object.  If there isn't a selection, or there are
-         * fewer items selected than the integer passed in, the return
-         * value will be null.
-         *
-         * @param i the zero-based index of selected items
-         * @return an Accessible containing the selected item
-         */
-        public Accessible getAccessibleSelection(int i) {
-            int childCount = getAccessibleChildrenCount();
-            if (i < 0 || i >= childCount) {
-                return null;        // out of range
-            }
-            int count = 0;
-            for (int j = 0; j < childCount && i >= count; j++) {
-                TreePath childPath = getChildTreePath(j);
-                if (tree.isPathSelected(childPath)) {
-                    if (count == i) {
-                        return new AccessibleJTreeNode(tree, childPath, this);
-                    } else {
-                        count++;
-                    }
-                }
-            }
-            return null;
-        }
-
-        /**
-         * Returns true if the current child of this object is selected.
-         *
-         * @param i the zero-based index of the child in this Accessible
-         * object.
-         * @see AccessibleContext#getAccessibleChild
-         */
-        public boolean isAccessibleChildSelected(int i) {
-            int childCount = getAccessibleChildrenCount();
-            if (i < 0 || i >= childCount) {
-                return false;       // out of range
-            } else {
-                TreePath childPath = getChildTreePath(i);
-                return tree.isPathSelected(childPath);
-            }
-        }
-
-         /**
-         * Adds the specified selected item in the object to the object's
-         * selection.  If the object supports multiple selections,
-         * the specified item is added to any existing selection, otherwise
-         * it replaces any existing selection in the object.  If the
-         * specified item is already selected, this method has no effect.
-         *
-         * @param i the zero-based index of selectable items
-         */
-        public void addAccessibleSelection(int i) {
-            if (tree == null)
-                return;
-            TreeModel model = tree.getModel();
-            if (model != null) {
-                if (i >= 0 && i < getAccessibleChildrenCount()) {
-                    TreePath path = getChildTreePath(i);
-                    tree.addSelectionPath(path);
-                }
-            }
-        }
-
-        /**
-         * Removes the specified selected item in the object from the
-         * object's
-         * selection.  If the specified item isn't currently selected, this
-         * method has no effect.
-         *
-         * @param i the zero-based index of selectable items
-         */
-        public void removeAccessibleSelection(int i) {
-            if (tree == null)
-                return;
-            TreeModel model = tree.getModel();
-            if (model != null) {
-                if (i >= 0 && i < getAccessibleChildrenCount()) {
-                    TreePath path = getChildTreePath(i);
-                    tree.removeSelectionPath(path);
-                }
-            }
-        }
-
-        /**
-         * Clears the selection in the object, so that nothing in the
-         * object is selected.
-         */
-        public void clearAccessibleSelection() {
-            int childCount = getAccessibleChildrenCount();
-            for (int i = 0; i < childCount; i++) {
-                removeAccessibleSelection(i);
-            }
-        }
-
-        /**
-         * Causes every selected item in the object to be selected
-         * if the object supports multiple selections.
-         */
-        public void selectAllAccessibleSelection() {
-            if (tree == null)
-                return;
-            TreeModel model = tree.getModel();
-            if (model != null) {
-                int childCount = getAccessibleChildrenCount();
-                TreePath path;
-                for (int i = 0; i < childCount; i++) {
-                    path = getChildTreePath(i);
-                    tree.addSelectionPath(path);
-                }
-            }
-        }
-
-            // AccessibleAction methods
-
-        /**
-         * Returns the number of accessible actions available in this
-         * tree node.  If this node is not a leaf, there is at least
-         * one action (toggle expand), in addition to any available
-         * on the object behind the TreeCellRenderer.
-         *
-         * @return the number of Actions in this object
-         */
-        public int getAccessibleActionCount() {
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (ac != null) {
-                AccessibleAction aa = ac.getAccessibleAction();
-                if (aa != null) {
-                    return (aa.getAccessibleActionCount() + (isLeaf ? 0 : 1));
-                }
-            }
-            return isLeaf ? 0 : 1;
-        }
-
-        /**
-         * Return a description of the specified action of the tree node.
-         * If this node is not a leaf, there is at least one action
-         * description (toggle expand), in addition to any available
-         * on the object behind the TreeCellRenderer.
-         *
-         * @param i zero-based index of the actions
-         * @return a description of the action
-         */
-        public String getAccessibleActionDescription(int i) {
-            if (i < 0 || i >= getAccessibleActionCount()) {
-                return null;
-            }
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (i == 0) {
-                // TIGER - 4766636
-                // return AccessibleAction.TOGGLE_EXPAND;
-                return "toggle expand";
-            } else if (ac != null) {
-                AccessibleAction aa = ac.getAccessibleAction();
-                if (aa != null) {
-                    return aa.getAccessibleActionDescription(i - 1);
-                }
-            }
-            return null;
-        }
-
-        /**
-         * Perform the specified Action on the tree node.  If this node
-         * is not a leaf, there is at least one action which can be
-         * done (toggle expand), in addition to any available on the
-         * object behind the TreeCellRenderer.
-         *
-         * @param i zero-based index of actions
-         * @return true if the the action was performed; else false.
-         */
-        public boolean doAccessibleAction(int i) {
-            if (i < 0 || i >= getAccessibleActionCount()) {
-                return false;
-            }
-            AccessibleContext ac = getCurrentAccessibleContext();
-            if (i == 0) {
-                if (tree.isExpanded(path)) {
-                    tree.collapsePath(path);
-                } else {
-                    tree.expandPath(path);
-                }
-                return true;
-            } else if (ac != null) {
-                AccessibleAction aa = ac.getAccessibleAction();
-                if (aa != null) {
-                    return aa.doAccessibleAction(i - 1);
-                }
-            }
-            return false;
-        }
-
-    } // inner class AccessibleJTreeNode
-
-    /**
-     * A helper class to perform {@code Callable} objects on the event dispatch thread appropriate
-     * for the provided {@code AccessibleContext}.
-     */
-    private static class InvocationUtils {
-
-        /**
-         * Invokes a {@code Callable} in the {@code AppContext} of the given {@code Accessible}
-         * and waits for it to finish blocking the caller thread.
-         *
-         * @param callable   the {@code Callable} to invoke
-         * @param accessible the {@code Accessible} which would be used to find the right context
-         *                   for the task execution
-         * @param <T> type parameter for the result value
-         *
-         * @return the result of the {@code Callable} execution
-         */
-        public static <T> T invokeAndWait(final Callable<T> callable,
-                                          final Accessible accessible) {
-            if (accessible instanceof Component) {
-                return invokeAndWait(callable, (Component)accessible);
-            }
-            if (accessible instanceof AccessibleContext) {
-                // This case also covers the Translator
-                return invokeAndWait(callable, (AccessibleContext)accessible);
-            }
-            throw new RuntimeException("Unmapped Accessible used to dispatch event: " + accessible);
-        }
-
-        /**
-         * Invokes a {@code Callable} in the {@code AppContext} of the given {@code Component}
-         * and waits for it to finish blocking the caller thread.
-         *
-         * @param callable  the {@code Callable} to invoke
-         * @param component the {@code Component} which would be used to find the right context
-         *                  for the task execution
-         * @param <T> type parameter for the result value
-         *
-         * @return the result of the {@code Callable} execution
-         */
-        public static <T> T invokeAndWait(final Callable<T> callable,
-                                          final Component component) {
-            return invokeAndWait(callable, SunToolkit.targetToAppContext(component));
-        }
-
-        /**
-         * Invokes a {@code Callable} in the {@code AppContext} mapped to the given {@code AccessibleContext}
-         * and waits for it to finish blocking the caller thread.
-         *
-         * @param callable the {@code Callable} to invoke
-         * @param accessibleContext the {@code AccessibleContext} which would be used to determine the right
-         *                          context for the task execution.
-         * @param <T> type parameter for the result value
-         *
-         * @return the result of the {@code Callable} execution
-         */
-        public static <T> T invokeAndWait(final Callable<T> callable,
-                                          final AccessibleContext accessibleContext) {
-            AppContext targetContext = AWTAccessor.getAccessibleContextAccessor()
-                    .getAppContext(accessibleContext);
-            if (targetContext != null) {
-                return invokeAndWait(callable, targetContext);
-            } else {
-                // Normally this should not happen, unmapped context provided and
-                // the target AppContext is unknown.
-
-                // Try to recover in case the context is a translator.
-                if (accessibleContext instanceof Translator) {
-                    Object source = ((Translator)accessibleContext).getSource();
-                    if (source instanceof Component) {
-                        return invokeAndWait(callable, (Component)source);
-                    }
-                }
-            }
-            throw new RuntimeException("Unmapped AccessibleContext used to dispatch event: " + accessibleContext);
-        }
-
-        private static <T> T invokeAndWait(final Callable<T> callable,
-                                           final AppContext targetAppContext) {
-            final CallableWrapper<T> wrapper = new CallableWrapper<T>(callable);
-            try {
-                invokeAndWait(wrapper, targetAppContext);
-                T result = wrapper.getResult();
-                updateAppContextMap(result, targetAppContext);
-                return result;
-            } catch (final Exception e) {
-                throw new RuntimeException(e);
-            }
-        }
-
-        private static void invokeAndWait(final Runnable runnable,
-                                        final AppContext appContext)
-                throws InterruptedException, InvocationTargetException {
-
-            EventQueue eq = SunToolkit.getSystemEventQueueImplPP(appContext);
-            Object lock = new Object();
-            Toolkit source = Toolkit.getDefaultToolkit();
-            InvocationEvent event =
-                    new InvocationEvent(source, runnable, lock, true);
-            synchronized (lock) {
-                eq.postEvent(event);
-                lock.wait();
-            }
-
-            Throwable eventThrowable = event.getThrowable();
-            if (eventThrowable != null) {
-                throw new InvocationTargetException(eventThrowable);
-            }
-        }
-
-        /**
-         * Maps the {@code AccessibleContext} to the {@code AppContext} which should be used
-         * to dispatch events related to the {@code AccessibleContext}
-         * @param accessibleContext the {@code AccessibleContext} for the mapping
-         * @param targetContext the {@code AppContext} for the mapping
-         */
-        public static void registerAccessibleContext(final AccessibleContext accessibleContext,
-                                                     final AppContext targetContext) {
-            if (accessibleContext != null) {
-                AWTAccessor.getAccessibleContextAccessor().setAppContext(accessibleContext, targetContext);
-            }
-        }
-
-        private static <T> void updateAppContextMap(final T accessibleContext,
-                                                    final AppContext targetContext) {
-            if (accessibleContext instanceof AccessibleContext) {
-                registerAccessibleContext((AccessibleContext)accessibleContext, targetContext);
-            }
-        }
-
-        private static class CallableWrapper<T> implements Runnable {
-            private final Callable<T> callable;
-            private volatile T object;
-            private Exception e;
-
-            CallableWrapper(final Callable<T> callable) {
-                this.callable = callable;
-            }
-
-            public void run() {
-                try {
-                    if (callable != null) {
-                        object = callable.call();
-                    }
-                } catch (final Exception e) {
-                    this.e = e;
-                }
-            }
-
-            T getResult() throws Exception {
-                if (e != null)
-                    throw e;
-                return object;
-            }
-        }
-    }
-}
--- a/jdk/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/ProviderImpl.java	Tue Aug 25 13:40:07 2015 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2015, 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.java.accessibility;
-
-import javax.accessibility.AccessibilityProvider;
-
-/* This class provided methods to identify and activate the mapping from the
- * JavaAccessBridge API to the Java Accessibility API.
- */
-public final class ProviderImpl extends AccessibilityProvider {
-    /**
-     * Typically the service name returned by the name() method would be a simple
-     * name such as JavaAccessBridge, but the following name is used for compatibility
-     * with prior versions of ${user.home}/.accessibility.properties and
-     * ${java.home}/conf/accessibility.properties where the text on the
-     * assistive.technologies= line is a fully qualified class name. As of Java 9
-     * class names are no longer used to identify assistive technology implementations.
-     * If the properties file exists the installer will not replace it thus the
-     * need for compatibility.
-     */
-    private final String name = "com.sun.java.accessibility.AccessBridge";
-
-    public ProviderImpl() {}
-
-    public String getName() {
-        return name;
-    }
-
-    public void activate() {
-        /**
-         * Note that the AccessBridge is instantiated here rather than in the
-         * constructor.  If the caller determines that this object is named
-         * "com.sun.java.accessibility.AccessBridge" then the caller will call
-         * start to instantiate the AccessBridge which will in turn activate it.
-         */
-        new AccessBridge();
-    }
-
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,7170 @@
+/*
+ * Copyright (c) 2005, 2015, 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.java.accessibility.internal;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.*;
+import java.lang.*;
+import java.lang.reflect.*;
+
+import java.beans.*;
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.tree.*;
+import javax.swing.table.*;
+import javax.swing.plaf.TreeUI;
+
+import javax.accessibility.*;
+import com.sun.java.accessibility.util.*;
+import sun.awt.AWTAccessor;
+import sun.awt.AppContext;
+import sun.awt.SunToolkit;
+
+import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CountDownLatch;
+
+/*
+ * Note: This class has to be public.  It's loaded from the VM like this:
+ *       Class.forName(atName).newInstance();
+ */
+@jdk.Exported(false)
+final public class AccessBridge {
+
+    private static AccessBridge theAccessBridge;
+    private ObjectReferences references;
+    private EventHandler eventHandler;
+
+    // Maps AccessibleRoles strings to AccessibleRoles.
+    private ConcurrentHashMap<String,AccessibleRole> accessibleRoleMap = new ConcurrentHashMap<>();
+
+    /**
+       If the object's role is in the following array getVirtualAccessibleName
+       will use the extended search algorithm.
+    */
+    private ArrayList<AccessibleRole> extendedVirtualNameSearchRoles = new ArrayList<>();
+    /**
+       If the role of the object's parent is in the following array
+       getVirtualAccessibleName will NOT use the extended search
+       algorithm even if the object's role is in the
+       extendedVirtualNameSearchRoles array.
+    */
+    private ArrayList<AccessibleRole> noExtendedVirtualNameSearchParentRoles = new ArrayList<>();
+
+    private static native boolean isSysWow();
+
+
+    /**
+     * Load DLLs
+     */
+    static {
+        // Load the appropriate DLLs
+        boolean is32on64 = false;
+        if (System.getProperty("os.arch").equals("x86")) {
+            // 32 bit JRE
+            // Load jabsysinfo.dll so can determine Win bitness
+            java.security.AccessController.doPrivileged(
+                new java.security.PrivilegedAction<Void>() {
+                    public Void run() {
+                        System.loadLibrary("jabsysinfo");
+                        return null;
+                    }
+                }, null, new java.lang.RuntimePermission("loadLibrary.jabsysinfo")
+            );
+            if (isSysWow()) {
+                // 32 bit JRE on 64 bit OS
+                is32on64 = true;
+                java.security.AccessController.doPrivileged(
+                    new java.security.PrivilegedAction<Void>() {
+                        public Void run() {
+                            System.loadLibrary("javaaccessbridge-32");
+                            return null;
+                        }
+                    }, null, new java.lang.RuntimePermission("loadLibrary.javaaccessbridge-32")
+                );
+            }
+        }
+        if (!is32on64) {
+            // 32 bit JRE on 32 bit OS or 64 bit JRE on 64 bit OS
+            java.security.AccessController.doPrivileged(
+                new java.security.PrivilegedAction<Void>() {
+                    public Void run() {
+                        System.loadLibrary("javaaccessbridge");
+                        return null;
+                    }
+                }, null, new java.lang.RuntimePermission("loadLibrary.javaaccessbridge")
+            );
+        }
+    }
+
+    /**
+     * AccessBridge constructor
+     *
+     * Note: This constructor has to be public.  It's called from the VM like this:
+     *       Class.forName(atName).newInstance();
+     */
+    public AccessBridge() {
+        theAccessBridge = this;
+        references = new ObjectReferences();
+
+        // initialize shutdown hook
+        Runtime runTime = Runtime.getRuntime();
+        shutdownHook hook = new shutdownHook();
+        runTime.addShutdownHook(new Thread(hook));
+
+        // initialize AccessibleRole map
+        initAccessibleRoleMap();
+
+        // determine which version of the JDK is running
+        String version = getJavaVersionProperty();
+        debugString("JDK version = "+version);
+
+        // initialize the methods that map HWNDs and Java top-level
+        // windows
+        initHWNDcalls();
+
+        // is this a JVM we can use?
+        // install JDK 1.2 and later Swing ToolKit listener
+        EventQueueMonitor.isGUIInitialized();
+
+        // start the Java event handler
+        eventHandler = new EventHandler(this);
+
+        // register for menu selection events
+        MenuSelectionManager.defaultManager().addChangeListener(eventHandler);
+
+        // register as a NativeWindowHandler
+        addNativeWindowHandler(new DefaultNativeWindowHandler());
+
+        // start in a new thread
+        Thread abthread = new Thread(new dllRunner());
+        abthread.setDaemon(true);
+        abthread.start();
+        debugString("AccessBridge started");
+    }
+
+    /*
+     * adaptor to run the AccessBridge DLL
+     */
+    private class dllRunner implements Runnable {
+        public void run() {
+            runDLL();
+        }
+    }
+
+    /*
+     * shutdown hook
+     */
+    private class shutdownHook implements Runnable {
+
+        public void run() {
+            debugString("***** shutdownHook: shutting down...");
+            javaShutdown();
+        }
+    }
+
+
+    /*
+     * Initialize the hashtable that maps Strings to AccessibleRoles.
+     */
+    private void initAccessibleRoleMap() {
+        /*
+         * Initialize the AccessibleRoles map. This code uses methods in
+         * java.lang.reflect.* to build the map.
+         */
+        try {
+            Class<?> clAccessibleRole = Class.forName ("javax.accessibility.AccessibleRole");
+            if (null != clAccessibleRole) {
+                AccessibleRole roleUnknown = AccessibleRole.UNKNOWN;
+                Field [] fields = clAccessibleRole.getFields ();
+                int i = 0;
+                for (i = 0; i < fields.length; i ++) {
+                    Field f = fields [i];
+                    if (javax.accessibility.AccessibleRole.class == f.getType ()) {
+                        AccessibleRole nextRole = (AccessibleRole) (f.get (roleUnknown));
+                        String nextRoleString = nextRole.toDisplayString (Locale.US);
+                        accessibleRoleMap.put (nextRoleString, nextRole);
+                    }
+                }
+            }
+        } catch (Exception e) {}
+
+    /*
+      Build the extendedVirtualNameSearchRoles array list.  I chose this method
+      because some of the Accessible Roles that need to be added to it are not
+      available in all versions of the J2SE that we want to support.
+    */
+    extendedVirtualNameSearchRoles.add (AccessibleRole.COMBO_BOX);
+    try {
+        /*
+          Added in J2SE 1.4
+        */
+        extendedVirtualNameSearchRoles.add (AccessibleRole.DATE_EDITOR);
+    } catch (NoSuchFieldError e) {}
+    extendedVirtualNameSearchRoles.add (AccessibleRole.LIST);
+    extendedVirtualNameSearchRoles.add (AccessibleRole.PASSWORD_TEXT);
+    extendedVirtualNameSearchRoles.add (AccessibleRole.SLIDER);
+    try {
+        /*
+          Added in J2SE 1.3
+        */
+        extendedVirtualNameSearchRoles.add (AccessibleRole.SPIN_BOX);
+    } catch (NoSuchFieldError e) {}
+    extendedVirtualNameSearchRoles.add (AccessibleRole.TABLE);
+    extendedVirtualNameSearchRoles.add (AccessibleRole.TEXT);
+    extendedVirtualNameSearchRoles.add (AccessibleRole.UNKNOWN);
+
+    noExtendedVirtualNameSearchParentRoles.add (AccessibleRole.TABLE);
+    noExtendedVirtualNameSearchParentRoles.add (AccessibleRole.TOOL_BAR);
+    }
+
+    /**
+     * start the AccessBridge DLL running in its own thread
+     */
+    private native void runDLL();
+
+    /**
+     * debugging output (goes to OutputDebugStr())
+     */
+    private native void sendDebugString(String debugStr);
+
+    /**
+     * debugging output (goes to OutputDebugStr())
+     */
+    private void debugString(String debugStr) {
+    sendDebugString(debugStr);
+    }
+
+    /* ===== utility methods ===== */
+
+    /**
+     * decrement the reference to the object (called by native code)
+     */
+    private void decrementReference(Object o) {
+    references.decrement(o);
+    }
+
+    /**
+     * get the java.version property from the JVM
+     */
+    private String getJavaVersionProperty() {
+        String s = System.getProperty("java.version");
+        if (s != null) {
+            references.increment(s);
+            return s;
+        }
+        return null;
+    }
+
+    /* ===== HWND/Java window mapping methods ===== */
+
+    // Java toolkit methods for mapping HWNDs to Java components
+    private Method javaGetComponentFromNativeWindowHandleMethod;
+    private Method javaGetNativeWindowHandleFromComponentMethod;
+
+    // native jawt methods for mapping HWNDs to Java components
+    private native int jawtGetNativeWindowHandleFromComponent(Component comp);
+
+    private native Component jawtGetComponentFromNativeWindowHandle(int handle);
+
+    Toolkit toolkit;
+
+    /**
+     * map an HWND to an AWT Component
+     */
+    private void initHWNDcalls() {
+        Class<?> integerParemter[] = new Class<?>[1];
+        integerParemter[0] = Integer.TYPE;
+        Class<?> componentParemter[] = new Class<?>[1];
+        try {
+            componentParemter[0] = Class.forName("java.awt.Component");
+        } catch (ClassNotFoundException e) {
+            debugString("Exception: " + e.toString());
+        }
+        toolkit = Toolkit.getDefaultToolkit();
+        return;
+    }
+
+    // native window handler interface
+    private interface NativeWindowHandler {
+        public Accessible getAccessibleFromNativeWindowHandle(int nativeHandle);
+    }
+
+    // hash table of native window handle to AccessibleContext mappings
+    static private ConcurrentHashMap<Integer,AccessibleContext> windowHandleToContextMap = new ConcurrentHashMap<>();
+
+    // hash table of AccessibleContext to native window handle mappings
+    static private ConcurrentHashMap<AccessibleContext,Integer> contextToWindowHandleMap = new ConcurrentHashMap<>();
+
+    /*
+     * adds a virtual window handler to our hash tables
+     */
+    static private void registerVirtualFrame(final Accessible a,
+                                             Integer nativeWindowHandle ) {
+        if (a != null) {
+            AccessibleContext ac = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+                @Override
+                public AccessibleContext call() throws Exception {
+                    return a.getAccessibleContext();
+                }
+            }, a);
+            windowHandleToContextMap.put(nativeWindowHandle, ac);
+            contextToWindowHandleMap.put(ac, nativeWindowHandle);
+        }
+    }
+
+    /*
+     * removes a virtual window handler to our hash tables
+     */
+    static private void revokeVirtualFrame(final Accessible a,
+                                           Integer nativeWindowHandle ) {
+        AccessibleContext ac = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+            @Override
+            public AccessibleContext call() throws Exception {
+                return a.getAccessibleContext();
+            }
+        }, a);
+        windowHandleToContextMap.remove(nativeWindowHandle);
+        contextToWindowHandleMap.remove(ac);
+    }
+
+    // vector of native window handlers
+    private static Vector<NativeWindowHandler> nativeWindowHandlers = new Vector<>();
+
+    /*
+    * adds a native window handler to our list
+    */
+    private static void addNativeWindowHandler(NativeWindowHandler handler) {
+        if (handler == null) {
+            throw new IllegalArgumentException();
+        }
+        nativeWindowHandlers.addElement(handler);
+    }
+
+    /*
+     * removes a native window handler to our list
+     */
+    private static boolean removeNativeWindowHandler(NativeWindowHandler handler) {
+        if (handler == null) {
+            throw new IllegalArgumentException();
+        }
+        return nativeWindowHandlers.removeElement(handler);
+    }
+
+    /**
+     * verifies that a native window handle is a Java window
+     */
+    private boolean isJavaWindow(int nativeHandle) {
+        AccessibleContext ac = getContextFromNativeWindowHandle(nativeHandle);
+        if (ac != null) {
+            saveContextToWindowHandleMapping(ac, nativeHandle);
+            return true;
+        }
+        return false;
+    }
+
+    /*
+     * saves the mapping between an AccessibleContext and a window handle
+     */
+    private void saveContextToWindowHandleMapping(AccessibleContext ac,
+                                                  int nativeHandle) {
+        debugString("saveContextToWindowHandleMapping...");
+        if (ac == null) {
+            return;
+        }
+        if (! contextToWindowHandleMap.containsKey(ac)) {
+            debugString("saveContextToWindowHandleMapping: ac = "+ac+"; handle = "+nativeHandle);
+            contextToWindowHandleMap.put(ac, nativeHandle);
+        }
+    }
+
+    /**
+     * maps a native window handle to an Accessible Context
+     */
+    private AccessibleContext getContextFromNativeWindowHandle(int nativeHandle) {
+        // First, look for the Accessible in our hash table of
+        // virtual window handles.
+        AccessibleContext ac = windowHandleToContextMap.get(nativeHandle);
+        if(ac!=null) {
+            saveContextToWindowHandleMapping(ac, nativeHandle);
+            return ac;
+        }
+
+        // Next, look for the native window handle in our vector
+        // of native window handles.
+        int numHandlers = nativeWindowHandlers.size();
+        for (int i = 0; i < numHandlers; i++) {
+            NativeWindowHandler nextHandler = nativeWindowHandlers.elementAt(i);
+            final Accessible a = nextHandler.getAccessibleFromNativeWindowHandle(nativeHandle);
+            if (a != null) {
+                ac = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+                    @Override
+                    public AccessibleContext call() throws Exception {
+                        return a.getAccessibleContext();
+                    }
+                }, a);
+                saveContextToWindowHandleMapping(ac, nativeHandle);
+                return ac;
+            }
+        }
+        // Not found.
+        return null;
+    }
+
+    /**
+     * maps an AccessibleContext to a native window handle
+     *     returns 0 on error
+     */
+    private int getNativeWindowHandleFromContext(AccessibleContext ac) {
+    debugString("getNativeWindowHandleFromContext: ac = "+ac);
+        try {
+            return contextToWindowHandleMap.get(ac);
+        } catch (Exception ex) {
+            return 0;
+        }
+    }
+
+    private class DefaultNativeWindowHandler implements NativeWindowHandler {
+        /*
+        * returns the Accessible associated with a native window
+        */
+        public Accessible getAccessibleFromNativeWindowHandle(int nativeHandle) {
+            final Component c = jawtGetComponentFromNativeWindowHandle(nativeHandle);
+            if (c instanceof Accessible) {
+                AccessibleContext ac = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+                    @Override
+                    public AccessibleContext call() throws Exception {
+                        return c.getAccessibleContext();
+                    }
+                }, c);
+                saveContextToWindowHandleMapping(ac, nativeHandle);
+                return (Accessible)c;
+            } else {
+                return null;
+            }
+        }
+    }
+
+    /* ===== AccessibleContext methods =====*/
+
+    /*
+     * returns the inner-most AccessibleContext in parent at Point(x, y)
+     */
+    private AccessibleContext getAccessibleContextAt(int x, int y,
+                                                    AccessibleContext parent) {
+        if (parent == null) {
+            return null;
+        }
+        if (windowHandleToContextMap != null &&
+            windowHandleToContextMap.containsValue(getRootAccessibleContext(parent))) {
+            // Path for applications that register their top-level
+            // windows with the AccessBridge (e.g., StarOffice 6.1)
+            return getAccessibleContextAt_1(x, y, parent);
+        } else {
+            // Path for applications that do not register
+            // their top-level windows with the AccessBridge
+            // (e.g., Swing/AWT applications)
+            return getAccessibleContextAt_2(x, y, parent);
+        }
+    }
+
+    /*
+     * returns the root accessible context
+     */
+    private AccessibleContext getRootAccessibleContext(final AccessibleContext ac) {
+        if (ac == null) {
+            return null;
+        }
+        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+            @Override
+            public AccessibleContext call() throws Exception {
+                Accessible parent = ac.getAccessibleParent();
+                if (parent == null) {
+                    return ac;
+                }
+                Accessible tmp = parent.getAccessibleContext().getAccessibleParent();
+                while (tmp != null) {
+                    parent = tmp;
+                    tmp = parent.getAccessibleContext().getAccessibleParent();
+                }
+                return parent.getAccessibleContext();
+            }
+        }, ac);
+    }
+
+    /*
+     * StarOffice version that does not use the EventQueueMonitor
+     */
+    private AccessibleContext getAccessibleContextAt_1(final int x, final int y,
+                                                      final AccessibleContext parent) {
+        debugString(" : getAccessibleContextAt_1 called");
+        debugString("   -> x = " + x + " y = " + y + " parent = " + parent);
+
+        if (parent == null) return null;
+            final AccessibleComponent acmp = InvocationUtils.invokeAndWait(new Callable<AccessibleComponent>() {
+                @Override
+                public AccessibleComponent call() throws Exception {
+                    return parent.getAccessibleComponent();
+                }
+            }, parent);
+        if (acmp!=null) {
+            final Point loc = InvocationUtils.invokeAndWait(new Callable<Point>() {
+                @Override
+                public Point call() throws Exception {
+                    return acmp.getLocation();
+                }
+            }, parent);
+            final Accessible a = InvocationUtils.invokeAndWait(new Callable<Accessible>() {
+                @Override
+                public Accessible call() throws Exception {
+                    return acmp.getAccessibleAt(new Point(x - loc.x, y - loc.y));
+                }
+            }, parent);
+            if (a != null) {
+                AccessibleContext foundAC = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+                    @Override
+                    public AccessibleContext call() throws Exception {
+                        return a.getAccessibleContext();
+                    }
+                }, parent);
+                if (foundAC != null) {
+                    if (foundAC != parent) {
+                        // recurse down into the child
+                        return getAccessibleContextAt_1(x - loc.x, y - loc.y,
+                                                        foundAC);
+                    } else
+                        return foundAC;
+                }
+            }
+        }
+        return parent;
+    }
+
+    /*
+     * AWT/Swing version
+     */
+    private AccessibleContext getAccessibleContextAt_2(final int x, final int y,
+                                                      AccessibleContext parent) {
+        debugString("getAccessibleContextAt_2 called");
+        debugString("   -> x = " + x + " y = " + y + " parent = " + parent);
+
+        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+            @Override
+            public AccessibleContext call() throws Exception {
+                Accessible a = EventQueueMonitor.getAccessibleAt(new Point(x, y));
+                if (a != null) {
+                    AccessibleContext childAC = a.getAccessibleContext();
+                    if (childAC != null) {
+                        debugString("   returning childAC = " + childAC);
+                        return childAC;
+                    }
+                }
+                return null;
+            }
+        }, parent);
+    }
+
+    /**
+     * returns the Accessible that has focus
+     */
+    private AccessibleContext getAccessibleContextWithFocus() {
+        Component c = AWTEventMonitor.getComponentWithFocus();
+        if (c != null) {
+            final Accessible a = Translator.getAccessible(c);
+            if (a != null) {
+                AccessibleContext ac = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+                    @Override
+                    public AccessibleContext call() throws Exception {
+                        return a.getAccessibleContext();
+                    }
+                }, c);
+                if (ac != null) {
+                    return ac;
+                }
+            }
+        }
+        return null;
+    }
+
+    /**
+     * returns the AccessibleName from an AccessibleContext
+     */
+    private String getAccessibleNameFromContext(final AccessibleContext ac) {
+        debugString("***** ac = "+ac.getClass());
+        if (ac != null) {
+            String s = InvocationUtils.invokeAndWait(new Callable<String>() {
+                @Override
+                public String call() throws Exception {
+                    return ac.getAccessibleName();
+                }
+            }, ac);
+            if (s != null) {
+                references.increment(s);
+                debugString("Returning AccessibleName from Context: " + s);
+                return s;
+            } else {
+                return null;
+            }
+        } else {
+            debugString("getAccessibleNameFromContext; ac = null!");
+            return null;
+        }
+    }
+
+    /**
+     * Returns an AccessibleName for a component using an algorithm optimized
+     * for the JAWS screen reader.  This method is only intended for JAWS. All
+     * other uses are entirely optional.
+     */
+    private String getVirtualAccessibleNameFromContext(final AccessibleContext ac) {
+        if (null != ac) {
+            /*
+            Step 1:
+            =======
+            Determine if we can obtain the Virtual Accessible Name from the
+            Accessible Name or Accessible Description of the object.
+            */
+            String nameString = InvocationUtils.invokeAndWait(new Callable<String>() {
+                @Override
+                public String call() throws Exception {
+                    return ac.getAccessibleName();
+                }
+            }, ac);
+            if ( ( null != nameString ) && ( 0 != nameString.length () ) ) {
+                debugString ("bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleName.");
+                references.increment (nameString);
+                return nameString;
+            }
+            String descriptionString = InvocationUtils.invokeAndWait(new Callable<String>() {
+                @Override
+                public String call() throws Exception {
+                    return ac.getAccessibleDescription();
+                }
+            }, ac);
+            if ( ( null != descriptionString ) && ( 0 != descriptionString.length () ) ) {
+                debugString ("bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleDescription.");
+                references.increment (descriptionString);
+                return descriptionString;
+            }
+
+            debugString ("The Virtual Accessible Name was not found using AccessibleContext::getAccessibleDescription. or getAccessibleName");
+            /*
+            Step 2:
+            =======
+            Decide whether the extended name search algorithm should be
+            used for this object.
+            */
+            boolean bExtendedSearch = false;
+            AccessibleRole role = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
+                @Override
+                public AccessibleRole call() throws Exception {
+                    return ac.getAccessibleRole();
+                }
+            }, ac);
+            AccessibleContext parentContext = null;
+            AccessibleRole parentRole = AccessibleRole.UNKNOWN;
+
+            if ( extendedVirtualNameSearchRoles.contains (role) ) {
+                parentContext = getAccessibleParentFromContext (ac);
+                if ( null != parentContext ) {
+                    final AccessibleContext parentContextInnerTemp = parentContext;
+                    parentRole = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
+                        @Override
+                        public AccessibleRole call() throws Exception {
+                            return parentContextInnerTemp.getAccessibleRole();
+                        }
+                    }, ac);
+                    if ( AccessibleRole.UNKNOWN != parentRole ) {
+                        bExtendedSearch = true;
+                        if ( noExtendedVirtualNameSearchParentRoles.contains (parentRole) ) {
+                            bExtendedSearch = false;
+                        }
+                    }
+                }
+            }
+
+            if (false == bExtendedSearch) {
+                debugString ("bk -- getVirtualAccessibleNameFromContext will not use the extended name search algorithm.  role = " + role.toDisplayString (Locale.US) );
+                /*
+                Step 3:
+                =======
+                We have determined that we should not use the extended name
+                search algorithm for this object (we must obtain the name of
+                the object from the object itself and not from neighboring
+                objects).  However the object name cannot be obtained from
+                the Accessible Name or Accessible Description of the object.
+
+                Handle several special cases here that might yield a value for
+                the Virtual Accessible Name.  Return null if the object does
+                not match the criteria for any of these special cases.
+                */
+                if (AccessibleRole.LABEL == role) {
+                    /*
+                    Does the label support the Accessible Text Interface?
+                    */
+                    final AccessibleText at = InvocationUtils.invokeAndWait(new Callable<AccessibleText>() {
+                        @Override
+                        public AccessibleText call() throws Exception {
+                            return ac.getAccessibleText();
+                        }
+                    }, ac);
+                    if (null != at) {
+                        int charCount = InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                            @Override
+                            public Integer call() throws Exception {
+                                return at.getCharCount();
+                            }
+                        }, ac);
+                        String text = getAccessibleTextRangeFromContext (ac, 0, charCount);
+                        if (null != text) {
+                            debugString ("bk -- The Virtual Accessible Name was obtained from the Accessible Text of the LABEL object.");
+                            references.increment (text);
+                            return text;
+                        }
+                    }
+                    /*
+                    Does the label support the Accessible Icon Interface?
+                    */
+                    debugString ("bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information.");
+                    final AccessibleIcon [] ai = InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() {
+                        @Override
+                        public AccessibleIcon[] call() throws Exception {
+                            return ac.getAccessibleIcon();
+                        }
+                    }, ac);
+                    if ( (null != ai) && (ai.length > 0) ) {
+                        String iconDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
+                            @Override
+                            public String call() throws Exception {
+                                return ai[0].getAccessibleIconDescription();
+                            }
+                        }, ac);
+                        if (iconDescription != null){
+                            debugString ("bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the LABEL object.");
+                            references.increment (iconDescription);
+                            return iconDescription;
+                        }
+                    } else {
+                        parentContext = getAccessibleParentFromContext (ac);
+                        if ( null != parentContext ) {
+                            final AccessibleContext parentContextInnerTemp = parentContext;
+                            parentRole = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
+                                @Override
+                                public AccessibleRole call() throws Exception {
+                                    return parentContextInnerTemp.getAccessibleRole();
+                                }
+                            }, ac);
+                            if ( AccessibleRole.TABLE == parentRole ) {
+                                int indexInParent = InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                                    @Override
+                                    public Integer call() throws Exception {
+                                        return ac.getAccessibleIndexInParent();
+                                    }
+                                }, ac);
+                                final AccessibleContext acTableCell = getAccessibleChildFromContext (parentContext, indexInParent);
+                                debugString ("bk -- Making a second attempt to obtain the Virtual Accessible Name from the Accessible Icon information for the Table Cell.");
+                                if (acTableCell != null) {
+                                    final AccessibleIcon [] aiRet =InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() {
+                                        @Override
+                                        public AccessibleIcon[] call() throws Exception {
+                                            return acTableCell.getAccessibleIcon();
+                                        }
+                                    }, ac);
+                                    if ( (null != aiRet) && (aiRet.length > 0) ) {
+                                        String iconDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
+                                            @Override
+                                            public String call() throws Exception {
+                                                return aiRet[0].getAccessibleIconDescription();
+                                            }
+                                        }, ac);
+                                        if (iconDescription != null){
+                                            debugString ("bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the Table Cell object.");
+                                            references.increment (iconDescription);
+                                            return iconDescription;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                } else if ( (AccessibleRole.TOGGLE_BUTTON == role) ||
+                            (AccessibleRole.PUSH_BUTTON == role) ) {
+                    /*
+                    Does the button support the Accessible Icon Interface?
+                    */
+                    debugString ("bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information.");
+                    final AccessibleIcon [] ai = InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() {
+                        @Override
+                        public AccessibleIcon[] call() throws Exception {
+                            return ac.getAccessibleIcon();
+                        }
+                    }, ac);
+                    if ( (null != ai) && (ai.length > 0) ) {
+                        String iconDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
+                            @Override
+                            public String call() throws Exception {
+                                return ai[0].getAccessibleIconDescription();
+                            }
+                        }, ac);
+                        if (iconDescription != null){
+                            debugString ("bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the TOGGLE_BUTTON or PUSH_BUTTON object.");
+                            references.increment (iconDescription);
+                            return iconDescription;
+                        }
+                    }
+                } else if ( AccessibleRole.CHECK_BOX == role ) {
+                    /*
+                    NOTE: The only case I know of in which a check box does not
+                    have a name is when that check box is contained in a table.
+
+                    In this case it would be appropriate to use the display string
+                    of the check box object as the name (in US English the display
+                    string is typically either "true" or "false").
+
+                    I am using the AccessibleValue interface to obtain the display
+                    string of the check box.  If the Accessible Value is 1, I am
+                    returning Boolean.TRUE.toString (),  If the Accessible Value is
+                    0, I am returning Boolean.FALSE.toString ().  If the Accessible
+                    Value is some other number, I will return the display string of
+                    the current numerical value of the check box.
+                    */
+                    final AccessibleValue av = InvocationUtils.invokeAndWait(new Callable<AccessibleValue>() {
+                        @Override
+                        public AccessibleValue call() throws Exception {
+                            return ac.getAccessibleValue();
+                        }
+                    }, ac);
+                    if ( null != av ) {
+                        nameString = null;
+                        Number value = InvocationUtils.invokeAndWait(new Callable<Number>() {
+                            @Override
+                            public Number call() throws Exception {
+                                return av.getCurrentAccessibleValue();
+                            }
+                        }, ac);
+                        if ( null != value ) {
+                            if ( 1 == value.intValue () ) {
+                                nameString = Boolean.TRUE.toString ();
+                            } else if ( 0 == value.intValue () ) {
+                                nameString = Boolean.FALSE.toString ();
+                            } else {
+                                nameString = value.toString ();
+                            }
+                            if ( null != nameString ) {
+                                references.increment (nameString);
+                                return nameString;
+                            }
+                        }
+                    }
+                }
+                return null;
+            }
+
+            /*
+            +
+            Beginning of the extended name search
+            +
+            */
+            final AccessibleContext parentContextOuterTemp = parentContext;
+            String parentName = InvocationUtils.invokeAndWait(new Callable<String>() {
+                @Override
+                public String call() throws Exception {
+                    return parentContextOuterTemp.getAccessibleName();
+                }
+            }, ac);
+            String parentDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
+                @Override
+                public String call() throws Exception {
+                    return parentContextOuterTemp.getAccessibleDescription();
+                }
+            }, ac);
+
+            /*
+            Step 4:
+            =======
+            Special case for Slider Bar objects.
+            */
+            if ( (AccessibleRole.SLIDER == role) &&
+                 (AccessibleRole.PANEL == parentRole) &&
+                 (null != parentName) ) {
+                debugString ("bk -- The Virtual Accessible Name was obtained from the Accessible Name of the SLIDER object's parent object.");
+                references.increment (parentName);
+                return parentName;
+            }
+
+            boolean bIsEditCombo = false;
+
+            AccessibleContext testContext = ac;
+            /*
+            Step 5:
+            =======
+            Special case for Edit Combo Boxes
+            */
+            if ( (AccessibleRole.TEXT == role) &&
+                 (AccessibleRole.COMBO_BOX == parentRole) ) {
+                bIsEditCombo = true;
+                if (null != parentName) {
+                    debugString ("bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Name of the object's parent object.");
+                    references.increment (parentName);
+                    return parentName;
+                } else if (null != parentDescription) {
+                    debugString ("bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Description of the object's parent object.");
+                    references.increment (parentDescription);
+                    return parentDescription;
+                }
+                testContext = parentContext;
+                parentRole = AccessibleRole.UNKNOWN;
+                parentContext = getAccessibleParentFromContext (testContext);
+                if ( null != parentContext ) {
+                    final AccessibleContext parentContextInnerTemp = parentContext;
+                    parentRole = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
+                        @Override
+                        public AccessibleRole call() throws Exception {
+                            return parentContextInnerTemp.getAccessibleRole();
+                        }
+                    }, ac);
+                }
+            }
+
+            /*
+            Step 6:
+            =======
+            Attempt to get the Virtual Accessible Name of the object using the
+            Accessible Relation Set Info (the LABELED_BY Accessible Relation).
+            */
+            {
+                final AccessibleContext parentContextTempInner = parentContext;
+                AccessibleRelationSet ars = InvocationUtils.invokeAndWait(new Callable<AccessibleRelationSet>() {
+                    @Override
+                    public AccessibleRelationSet call() throws Exception {
+                        return parentContextTempInner.getAccessibleRelationSet();
+                    }
+                }, ac);
+                if ( ars != null && (ars.size () > 0) && (ars.contains (AccessibleRelation.LABELED_BY)) ) {
+                    AccessibleRelation labeledByRelation = ars.get (AccessibleRelation.LABELED_BY);
+                    if (labeledByRelation != null) {
+                        Object [] targets = labeledByRelation.getTarget ();
+                        Object o = targets [0];
+                        if (o instanceof Accessible) {
+                            AccessibleContext labelContext = ((Accessible)o).getAccessibleContext ();
+                            if (labelContext != null) {
+                                String labelName = labelContext.getAccessibleName ();
+                                String labelDescription = labelContext.getAccessibleDescription ();
+                                if (null != labelName) {
+                                    debugString ("bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Name Case.");
+                                    references.increment (labelName);
+                                    return labelName;
+                                } else if (null != labelDescription) {
+                                    debugString ("bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Description Case.");
+                                    references.increment (labelDescription);
+                                    return labelDescription;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            //Note: add AccessibleContext to use InvocationUtils.invokeAndWait
+            /*
+            Step 7:
+            =======
+            Search for a label object that is positioned either just to the left
+            or just above the object and get the Accessible Name of the Label
+            object.
+            */
+            int testIndexMax = 0;
+            int testX = 0;
+            int testY = 0;
+            int testWidth = 0;
+            int testHeight = 0;
+            int targetX = 0;
+            int targetY = 0;
+            final AccessibleContext tempContext = testContext;
+            int testIndex = InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                @Override
+                public Integer call() throws Exception {
+                    return tempContext.getAccessibleIndexInParent();
+                }
+            }, ac);
+            if ( null != parentContext ) {
+                final AccessibleContext parentContextInnerTemp = parentContext;
+                testIndexMax =  InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                    @Override
+                    public Integer call() throws Exception {
+                        return parentContextInnerTemp.getAccessibleChildrenCount() - 1;
+                    }
+                }, ac);
+            }
+            testX = getAccessibleXcoordFromContext (testContext);
+            testY = getAccessibleYcoordFromContext (testContext);
+            testWidth = getAccessibleWidthFromContext (testContext);
+            testHeight = getAccessibleHeightFromContext (testContext);
+            targetX = testX + 2;
+            targetY = testY + 2;
+
+            int childIndex = testIndex - 1;
+            /*Accessible child = null;
+            AccessibleContext childContext = null;
+            AccessibleRole childRole = AccessibleRole.UNKNOWN;*/
+            int childX = 0;
+            int childY = 0;
+            int childWidth = 0;
+            int childHeight = 0;
+            String childName = null;
+            String childDescription = null;
+            while (childIndex >= 0) {
+                final int childIndexTemp = childIndex;
+                final AccessibleContext parentContextInnerTemp = parentContext;
+                final Accessible child  =  InvocationUtils.invokeAndWait(new Callable<Accessible>() {
+                    @Override
+                    public Accessible call() throws Exception {
+                        return parentContextInnerTemp.getAccessibleChild(childIndexTemp);
+                    }
+                }, ac);
+                if ( null != child ) {
+                    final AccessibleContext childContext = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+                        @Override
+                        public AccessibleContext call() throws Exception {
+                            return child.getAccessibleContext();
+                        }
+                    }, ac);
+                    if ( null != childContext ) {
+                        AccessibleRole childRole = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
+                            @Override
+                            public AccessibleRole call() throws Exception {
+                                return childContext.getAccessibleRole();
+                            }
+                        }, ac);
+                        if ( AccessibleRole.LABEL == childRole ) {
+                            childX = getAccessibleXcoordFromContext (childContext);
+                            childY = getAccessibleYcoordFromContext (childContext);
+                            childWidth = getAccessibleWidthFromContext (childContext);
+                            childHeight = getAccessibleHeightFromContext (childContext);
+                            if ( (childX < testX) &&
+                                 ((childY <= targetY) && (targetY <= (childY + childHeight))) ) {
+                                childName = InvocationUtils.invokeAndWait(new Callable<String>() {
+                                    @Override
+                                    public String call() throws Exception {
+                                        return childContext.getAccessibleName();
+                                    }
+                                }, ac);
+                                if ( null != childName ) {
+                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object.");
+                                    references.increment (childName);
+                                    return childName;
+                                }
+                                childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
+                                    @Override
+                                    public String call() throws Exception {
+                                        return childContext.getAccessibleDescription();
+                                    }
+                                }, ac);
+                                if ( null != childDescription ) {
+                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object.");
+                                    references.increment (childDescription);
+                                    return childDescription;
+                                }
+                            } else if ( (childY < targetY) &&
+                                        ((childX <= targetX) && (targetX <= (childX + childWidth))) ) {
+                                childName = InvocationUtils.invokeAndWait(new Callable<String>() {
+                                    @Override
+                                    public String call() throws Exception {
+                                        return childContext.getAccessibleName();
+                                    }
+                                }, ac);
+                                if ( null != childName ) {
+                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object.");
+                                    references.increment (childName);
+                                    return childName;
+                                }
+                                childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
+                                    @Override
+                                    public String call() throws Exception {
+                                        return childContext.getAccessibleDescription();
+                                    }
+                                }, ac);
+                                if ( null != childDescription ) {
+                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object.");
+                                    references.increment (childDescription);
+                                    return childDescription;
+                                }
+                            }
+                        }
+                    }
+                }
+                childIndex --;
+            }
+            childIndex = testIndex + 1;
+            while (childIndex <= testIndexMax) {
+                final int childIndexTemp = childIndex;
+                final AccessibleContext parentContextInnerTemp = parentContext;
+                final Accessible child  =  InvocationUtils.invokeAndWait(new Callable<Accessible>() {
+                    @Override
+                    public Accessible call() throws Exception {
+                        return parentContextInnerTemp.getAccessibleChild(childIndexTemp);
+                    }
+                }, ac);
+                if ( null != child ) {
+                    final AccessibleContext childContext = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+                        @Override
+                        public AccessibleContext call() throws Exception {
+                            return child.getAccessibleContext();
+                        }
+                    }, ac);
+                    if ( null != childContext ) {
+                        AccessibleRole childRole = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
+                            @Override
+                            public AccessibleRole call() throws Exception {
+                                return childContext.getAccessibleRole();
+                            }
+                        }, ac);
+                        if ( AccessibleRole.LABEL == childRole ) {
+                            childX = getAccessibleXcoordFromContext (childContext);
+                            childY = getAccessibleYcoordFromContext (childContext);
+                            childWidth = getAccessibleWidthFromContext (childContext);
+                            childHeight = getAccessibleHeightFromContext (childContext);
+                            if ( (childX < testX) &&
+                                 ((childY <= targetY) && (targetY <= (childY + childHeight))) ) {
+                                childName = InvocationUtils.invokeAndWait(new Callable<String>() {
+                                    @Override
+                                    public String call() throws Exception {
+                                        return childContext.getAccessibleName();
+                                    }
+                                }, ac);
+                                if ( null != childName ) {
+                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object.");
+                                    references.increment (childName);
+                                    return childName;
+                                }
+                                childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
+                                    @Override
+                                    public String call() throws Exception {
+                                        return childContext.getAccessibleDescription();
+                                    }
+                                }, ac);
+                                if ( null != childDescription ) {
+                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object.");
+                                    references.increment (childDescription);
+                                    return childDescription;
+                                }
+                            } else if ( (childY < targetY) &&
+                                        ((childX <= targetX) && (targetX <= (childX + childWidth))) ) {
+                                childName = InvocationUtils.invokeAndWait(new Callable<String>() {
+                                    @Override
+                                    public String call() throws Exception {
+                                        return childContext.getAccessibleName();
+                                    }
+                                }, ac);
+                                if ( null != childName ) {
+                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object.");
+                                    references.increment (childName);
+                                    return childName;
+                                }
+                                childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
+                                    @Override
+                                    public String call() throws Exception {
+                                        return childContext.getAccessibleDescription();
+                                    }
+                                }, ac);
+                                if ( null != childDescription ) {
+                                    debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object.");
+                                    references.increment (childDescription);
+                                    return childDescription;
+                                }
+                            }
+                        }
+                    }
+                }
+                childIndex ++;
+            }
+            /*
+            Step 8:
+            =======
+            Special case for combo boxes and text objects, based on a
+            similar special case I found in some of our internal JAWS code.
+
+            Search for a button object that is positioned either just to the left
+            or just above the object and get the Accessible Name of the button
+            object.
+            */
+            if ( (AccessibleRole.TEXT == role) ||
+                 (AccessibleRole.COMBO_BOX == role) ||
+                 (bIsEditCombo) ) {
+                childIndex = testIndex - 1;
+                while (childIndex >= 0) {
+                    final int childIndexTemp = childIndex;
+                    final AccessibleContext parentContextInnerTemp = parentContext;
+                    final Accessible child = InvocationUtils.invokeAndWait(new Callable<Accessible>() {
+                        @Override
+                        public Accessible call() throws Exception {
+                            return parentContextInnerTemp.getAccessibleChild(childIndexTemp);
+                        }
+                    }, ac);
+                    if ( null != child ) {
+                        final AccessibleContext childContext = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+                            @Override
+                            public AccessibleContext call() throws Exception {
+                                return child.getAccessibleContext();
+                            }
+                        }, ac);
+                        if ( null != childContext ) {
+                            AccessibleRole childRole = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
+                                @Override
+                                public AccessibleRole call() throws Exception {
+                                    return childContext.getAccessibleRole();
+                                }
+                            }, ac);
+                            if ( ( AccessibleRole.PUSH_BUTTON == childRole ) ||
+                                 ( AccessibleRole.TOGGLE_BUTTON == childRole )) {
+                                childX = getAccessibleXcoordFromContext (childContext);
+                                childY = getAccessibleYcoordFromContext (childContext);
+                                childWidth = getAccessibleWidthFromContext (childContext);
+                                childHeight = getAccessibleHeightFromContext (childContext);
+                                if ( (childX < testX) &&
+                                     ((childY <= targetY) && (targetY <= (childY + childHeight))) ) {
+                                    childName = InvocationUtils.invokeAndWait(new Callable<String>() {
+                                        @Override
+                                        public String call() throws Exception {
+                                            return childContext.getAccessibleName();
+                                        }
+                                    }, ac);
+                                    if ( null != childName ) {
+                                        debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
+                                        references.increment (childName);
+                                        return childName;
+                                    }
+                                    childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
+                                        @Override
+                                        public String call() throws Exception {
+                                            return childContext.getAccessibleDescription();
+                                        }
+                                    }, ac);
+                                    if ( null != childDescription ) {
+                                        debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
+                                        references.increment (childDescription);
+                                        return childDescription;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    childIndex --;
+                }
+                childIndex = testIndex + 1;
+                while (childIndex <= testIndexMax) {
+                    final int childIndexTemp = childIndex;
+                    final AccessibleContext parentContextInnerTemp = parentContext;
+                    final Accessible child  =  InvocationUtils.invokeAndWait(new Callable<Accessible>() {
+                        @Override
+                        public Accessible call() throws Exception {
+                            return parentContextInnerTemp.getAccessibleChild(childIndexTemp);
+                        }
+                    }, ac);
+                    if ( null != child ) {
+                        final AccessibleContext childContext = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+                            @Override
+                            public AccessibleContext call() throws Exception {
+                                return child.getAccessibleContext();
+                            }
+                        }, ac);
+                        if ( null != childContext ) {
+                            AccessibleRole childRole = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
+                                @Override
+                                public AccessibleRole call() throws Exception {
+                                    return childContext.getAccessibleRole();
+                                }
+                            }, ac);
+                            if ( ( AccessibleRole.PUSH_BUTTON == childRole ) ||
+                                    ( AccessibleRole.TOGGLE_BUTTON == childRole ) ) {
+                                childX = getAccessibleXcoordFromContext (childContext);
+                                childY = getAccessibleYcoordFromContext (childContext);
+                                childWidth = getAccessibleWidthFromContext (childContext);
+                                childHeight = getAccessibleHeightFromContext (childContext);
+                                if ( (childX < testX) &&
+                                     ((childY <= targetY) && (targetY <= (childY + childHeight))) ) {
+                                    childName = InvocationUtils.invokeAndWait(new Callable<String>() {
+                                        @Override
+                                        public String call() throws Exception {
+                                            return childContext.getAccessibleName();
+                                        }
+                                    }, ac);
+                                    if ( null != childName ) {
+                                        debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
+                                        references.increment (childName);
+                                        return childName;
+                                    }
+                                    childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
+                                        @Override
+                                        public String call() throws Exception {
+                                            return childContext.getAccessibleDescription();
+                                        }
+                                    }, ac);
+                                    if ( null != childDescription ) {
+                                        debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
+                                        references.increment (childDescription);
+                                        return childDescription;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    childIndex ++;
+                }
+            }
+            return null;
+        } else {
+            debugString ("AccessBridge::getVirtualAccessibleNameFromContext error - ac == null.");
+            return null;
+        }
+    }
+
+    /**
+     * returns the AccessibleDescription from an AccessibleContext
+     */
+    private String getAccessibleDescriptionFromContext(final AccessibleContext ac) {
+        if (ac != null) {
+            String s = InvocationUtils.invokeAndWait(new Callable<String>() {
+                @Override
+                public String call() throws Exception {
+                    return ac.getAccessibleDescription();
+                }
+            }, ac);
+            if (s != null) {
+                references.increment(s);
+                debugString("Returning AccessibleDescription from Context: " + s);
+                return s;
+            }
+        } else {
+            debugString("getAccessibleDescriptionFromContext; ac = null");
+        }
+        return null;
+    }
+
+    /**
+     * returns the AccessibleRole from an AccessibleContext
+     */
+    private String getAccessibleRoleStringFromContext(final AccessibleContext ac) {
+        if (ac != null) {
+            AccessibleRole role = InvocationUtils.invokeAndWait(new Callable<AccessibleRole>() {
+                @Override
+                public AccessibleRole call() throws Exception {
+                    return ac.getAccessibleRole();
+                }
+            }, ac);
+            if (role != null) {
+                String s = role.toDisplayString(Locale.US);
+                if (s != null) {
+                    references.increment(s);
+                    debugString("Returning AccessibleRole from Context: " + s);
+                    return s;
+                }
+            }
+        } else {
+            debugString("getAccessibleRoleStringFromContext; ac = null");
+        }
+        return null;
+    }
+
+    /**
+     * return the AccessibleRole from an AccessibleContext in the en_US locale
+     */
+    private String getAccessibleRoleStringFromContext_en_US(final AccessibleContext ac) {
+        return getAccessibleRoleStringFromContext(ac);
+    }
+
+    /**
+     * return the AccessibleStates from an AccessibleContext
+     */
+    private String getAccessibleStatesStringFromContext(final AccessibleContext ac) {
+        if (ac != null) {
+            AccessibleStateSet stateSet = InvocationUtils.invokeAndWait(new Callable<AccessibleStateSet>() {
+                @Override
+                public AccessibleStateSet call() throws Exception {
+                    return ac.getAccessibleStateSet();
+                }
+            }, ac);
+            if (stateSet != null) {
+                String s = stateSet.toString();
+                if (s != null &&
+                    s.indexOf(AccessibleState.MANAGES_DESCENDANTS.toDisplayString(Locale.US)) == -1) {
+                    // Indicate whether this component manages its own
+                    // children
+                    AccessibleRole role = ac.getAccessibleRole();
+                    if (role == AccessibleRole.LIST ||
+                        role == AccessibleRole.TABLE ||
+                        role == AccessibleRole.TREE) {
+                        s += ",";
+                        s += AccessibleState.MANAGES_DESCENDANTS.toDisplayString(Locale.US);
+                    }
+                    references.increment(s);
+                    debugString("Returning AccessibleStateSet from Context: " + s);
+                    return s;
+                }
+            }
+        } else {
+            debugString("getAccessibleStatesStringFromContext; ac = null");
+        }
+        return null;
+    }
+
+    /**
+     * returns the AccessibleStates from an AccessibleContext in the en_US locale
+     */
+    private String getAccessibleStatesStringFromContext_en_US(final AccessibleContext ac) {
+        if (ac != null) {
+            AccessibleStateSet stateSet = InvocationUtils.invokeAndWait(new Callable<AccessibleStateSet>() {
+                @Override
+                public AccessibleStateSet call() throws Exception {
+                    return ac.getAccessibleStateSet();
+                }
+            }, ac);
+            if (stateSet != null) {
+                String s = "";
+                AccessibleState[] states = stateSet.toArray();
+                if (states != null && states.length > 0) {
+                    s = states[0].toDisplayString(Locale.US);
+                    for (int i = 1; i < states.length; i++) {
+                        s = s + "," + states[i].toDisplayString(Locale.US);
+                    }
+                }
+                references.increment(s);
+                debugString("Returning AccessibleStateSet en_US from Context: " + s);
+                return s;
+            }
+        }
+        debugString("getAccessibleStatesStringFromContext; ac = null");
+        return null;
+    }
+
+    /**
+     * returns the AccessibleParent from an AccessibleContext
+     */
+    private AccessibleContext getAccessibleParentFromContext(final AccessibleContext ac) {
+        if (ac==null)
+            return null;
+        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+            @Override
+            public AccessibleContext call() throws Exception {
+                Accessible a = ac.getAccessibleParent();
+                if (a != null) {
+                    AccessibleContext apc = a.getAccessibleContext();
+                    if (apc != null) {
+                        return apc;
+                    }
+                }
+                return null;
+            }
+        }, ac);
+    }
+
+    /**
+     * returns the AccessibleIndexInParent from an AccessibleContext
+     */
+    private int getAccessibleIndexInParentFromContext(final AccessibleContext ac) {
+        if (ac==null)
+            return -1;
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                return ac.getAccessibleIndexInParent();
+            }
+        }, ac);
+    }
+
+    /**
+     * returns the AccessibleChild count from an AccessibleContext
+     */
+    private int getAccessibleChildrenCountFromContext(final AccessibleContext ac) {
+        if (ac==null)
+            return -1;
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                return ac.getAccessibleChildrenCount();
+            }
+        }, ac);
+    }
+
+    /**
+     * returns the AccessibleChild Context from an AccessibleContext
+     */
+    private AccessibleContext getAccessibleChildFromContext(final AccessibleContext ac, final int index) {
+
+        if (ac == null) {
+            return null;
+        }
+
+        final JTable table = InvocationUtils.invokeAndWait(new Callable<JTable>() {
+            @Override
+            public JTable call() throws Exception {
+                // work-around for AccessibleJTable.getCurrentAccessibleContext returning
+                // wrong renderer component when cell contains more than one component
+                Accessible parent = ac.getAccessibleParent();
+                if (parent != null) {
+                    int indexInParent = ac.getAccessibleIndexInParent();
+                    Accessible child =
+                            parent.getAccessibleContext().getAccessibleChild(indexInParent);
+                    if (child instanceof JTable) {
+                        return (JTable) child;
+                    }
+                }
+                return null;
+            }
+        }, ac);
+
+        if (table == null) {
+            return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+                @Override
+                public AccessibleContext call() throws Exception {
+                    Accessible a = ac.getAccessibleChild(index);
+                    if (a != null) {
+                        return a.getAccessibleContext();
+                    }
+                    return null;
+                }
+            }, ac);
+        }
+
+        final AccessibleTable at = getAccessibleTableFromContext(ac);
+
+        final int row = getAccessibleTableRow(at, index);
+        final int column = getAccessibleTableColumn(at, index);
+
+        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+            @Override
+            public AccessibleContext call() throws Exception {
+                TableCellRenderer renderer = table.getCellRenderer(row, column);
+                if (renderer == null) {
+                    Class<?> columnClass = table.getColumnClass(column);
+                    renderer = table.getDefaultRenderer(columnClass);
+                }
+                Component component =
+                        renderer.getTableCellRendererComponent(table, table.getValueAt(row, column),
+                                false, false, row, column);
+                if (component instanceof Accessible) {
+                    return component.getAccessibleContext();
+                }
+                return null;
+            }
+        }, ac);
+    }
+
+    /**
+     * returns the AccessibleComponent bounds on screen from an AccessibleContext
+     */
+    private Rectangle getAccessibleBoundsOnScreenFromContext(final AccessibleContext ac) {
+        if(ac==null)
+            return null;
+        return InvocationUtils.invokeAndWait(new Callable<Rectangle>() {
+            @Override
+            public Rectangle call() throws Exception {
+                AccessibleComponent acmp = ac.getAccessibleComponent();
+                if (acmp != null) {
+                    Rectangle r = acmp.getBounds();
+                    if (r != null) {
+                        try {
+                            Point p = acmp.getLocationOnScreen();
+                            if (p != null) {
+                                r.x = p.x;
+                                r.y = p.y;
+                                return r;
+                            }
+                        } catch (Exception e) {
+                            return null;
+                        }
+                    }
+                }
+                return null;
+            }
+        }, ac);
+    }
+
+    /**
+     * returns the AccessibleComponent x-coord from an AccessibleContext
+     */
+    private int getAccessibleXcoordFromContext(AccessibleContext ac) {
+        if (ac != null) {
+            Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
+            if (r != null) {
+                debugString(" - Returning Accessible x coord from Context: " + r.x);
+                return r.x;
+            }
+        } else {
+            debugString("getAccessibleXcoordFromContext ac = null");
+        }
+        return -1;
+    }
+
+    /**
+     * returns the AccessibleComponent y-coord from an AccessibleContext
+     */
+    private int getAccessibleYcoordFromContext(AccessibleContext ac) {
+        debugString("getAccessibleYcoordFromContext() called");
+        if (ac != null) {
+            Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
+            if (r != null) {
+                return r.y;
+            }
+        } else {
+        debugString("getAccessibleYcoordFromContext; ac = null");
+        }
+        return -1;
+    }
+
+    /**
+     * returns the AccessibleComponent height from an AccessibleContext
+     */
+    private int getAccessibleHeightFromContext(AccessibleContext ac) {
+        if (ac != null) {
+            Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
+            if (r != null) {
+                return r.height;
+            }
+        } else {
+            debugString("getAccessibleHeightFromContext; ac = null");
+        }
+        return -1;
+    }
+
+    /**
+     * returns the AccessibleComponent width from an AccessibleContext
+     */
+    private int getAccessibleWidthFromContext(AccessibleContext ac) {
+        if (ac != null) {
+            Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
+            if (r != null) {
+                return r.width;
+            }
+        } else {
+            debugString("getAccessibleWidthFromContext; ac = null");
+        }
+        return -1;
+    }
+
+
+    /**
+     * returns the AccessibleComponent from an AccessibleContext
+     */
+    private AccessibleComponent getAccessibleComponentFromContext(AccessibleContext ac) {
+        if (ac != null) {
+            AccessibleComponent acmp = ac.getAccessibleComponent();
+            if (acmp != null) {
+                debugString("Returning AccessibleComponent Context");
+                return acmp;
+            }
+        } else {
+            debugString("getAccessibleComponentFromContext; ac = null");
+        }
+        return null;
+    }
+
+    /**
+     * returns the AccessibleAction from an AccessibleContext
+     */
+    private AccessibleAction getAccessibleActionFromContext(final AccessibleContext ac) {
+        debugString("Returning AccessibleAction Context");
+        return ac == null ? null : InvocationUtils.invokeAndWait(new Callable<AccessibleAction>() {
+            @Override
+            public AccessibleAction call() throws Exception {
+                return ac.getAccessibleAction();
+            }
+        }, ac);
+    }
+
+    /**
+     * returns the AccessibleSelection from an AccessibleContext
+     */
+    private AccessibleSelection getAccessibleSelectionFromContext(final AccessibleContext ac) {
+        return ac == null ? null : InvocationUtils.invokeAndWait(new Callable<AccessibleSelection>() {
+            @Override
+            public AccessibleSelection call() throws Exception {
+                return ac.getAccessibleSelection();
+            }
+        }, ac);
+    }
+
+    /**
+     * return the AccessibleText from an AccessibleContext
+     */
+    private AccessibleText getAccessibleTextFromContext(final AccessibleContext ac) {
+        return ac == null ? null : InvocationUtils.invokeAndWait(new Callable<AccessibleText>() {
+            @Override
+            public AccessibleText call() throws Exception {
+                return ac.getAccessibleText();
+            }
+        }, ac);
+    }
+
+    /**
+     * return the AccessibleComponent from an AccessibleContext
+     */
+    private AccessibleValue getAccessibleValueFromContext(final AccessibleContext ac) {
+        return ac == null ? null : InvocationUtils.invokeAndWait(new Callable<AccessibleValue>() {
+            @Override
+            public AccessibleValue call() throws Exception {
+                return ac.getAccessibleValue();
+            }
+        }, ac);
+    }
+
+    /* ===== AccessibleText methods ===== */
+
+    /**
+     * returns the bounding rectangle for the text cursor
+     * XXX
+     */
+    private Rectangle getCaretLocation(final AccessibleContext ac) {
+    debugString("getCaretLocation");
+        if (ac==null)
+            return null;
+        return InvocationUtils.invokeAndWait(new Callable<Rectangle>() {
+            @Override
+            public Rectangle call() throws Exception {
+                // workaround for JAAPI not returning cursor bounding rectangle
+                Rectangle r = null;
+                Accessible parent = ac.getAccessibleParent();
+                if (parent instanceof Accessible) {
+                    int indexInParent = ac.getAccessibleIndexInParent();
+                    Accessible child =
+                            parent.getAccessibleContext().getAccessibleChild(indexInParent);
+
+                    if (child instanceof JTextComponent) {
+                        JTextComponent text = (JTextComponent) child;
+                        try {
+                            r = text.modelToView(text.getCaretPosition());
+                            if (r != null) {
+                                Point p = text.getLocationOnScreen();
+                                r.translate(p.x, p.y);
+                            }
+                        } catch (BadLocationException ble) {
+                        }
+                    }
+                }
+                return r;
+            }
+        }, ac);
+    }
+
+    /**
+     * returns the x-coordinate for the text cursor rectangle
+     */
+    private int getCaretLocationX(AccessibleContext ac) {
+        Rectangle r = getCaretLocation(ac);
+        if (r != null) {
+            return r.x;
+        } else {
+            return -1;
+        }
+    }
+
+    /**
+     * returns the y-coordinate for the text cursor rectangle
+     */
+    private int getCaretLocationY(AccessibleContext ac) {
+        Rectangle r = getCaretLocation(ac);
+        if (r != null) {
+            return r.y;
+        } else {
+            return -1;
+        }
+    }
+
+    /**
+     * returns the height for the text cursor rectangle
+     */
+    private int getCaretLocationHeight(AccessibleContext ac) {
+        Rectangle r = getCaretLocation(ac);
+        if (r != null) {
+            return r.height;
+        } else {
+            return -1;
+        }
+    }
+
+    /**
+     * returns the width for the text cursor rectangle
+     */
+    private int getCaretLocationWidth(AccessibleContext ac) {
+        Rectangle r = getCaretLocation(ac);
+        if (r != null) {
+            return r.width;
+        } else {
+            return -1;
+        }
+    }
+
+    /**
+     * returns the character count from an AccessibleContext
+     */
+    private int getAccessibleCharCountFromContext(final AccessibleContext ac) {
+        if (ac==null)
+            return -1;
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                AccessibleText at = ac.getAccessibleText();
+                if (at != null) {
+                    return at.getCharCount();
+                }
+                return -1;
+            }
+        }, ac);
+    }
+
+    /**
+     * returns the caret position from an AccessibleContext
+     */
+    private int getAccessibleCaretPositionFromContext(final AccessibleContext ac) {
+        if (ac==null)
+            return -1;
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                AccessibleText at = ac.getAccessibleText();
+                if (at != null) {
+                    return at.getCaretPosition();
+                }
+                return -1;
+            }
+        }, ac);
+    }
+
+    /**
+     * Return the index at a specific point from an AccessibleContext
+     * Point(x, y) is in screen coordinates.
+     */
+    private int getAccessibleIndexAtPointFromContext(final AccessibleContext ac,
+                                                    final int x, final int y) {
+        debugString("getAccessibleIndexAtPointFromContext: x = "+x+"; y = "+y);
+        if (ac==null)
+            return -1;
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                AccessibleText at = ac.getAccessibleText();
+                AccessibleComponent acomp = ac.getAccessibleComponent();
+                if (at != null && acomp != null) {
+                    // Convert x and y from screen coordinates to
+                    // local coordinates.
+                    try {
+                        Point p = acomp.getLocationOnScreen();
+                        int x1, y1;
+                        if (p != null) {
+                            x1 = x - p.x;
+                            if (x1 < 0) {
+                                x1 = 0;
+                            }
+                            y1 = y - p.y;
+                            if (y1 < 0) {
+                                y1 = 0;
+                            }
+
+                            Point newPoint = new Point(x1, y1);
+                            int indexAtPoint = at.getIndexAtPoint(new Point(x1, y1));
+                            return indexAtPoint;
+                        }
+                    } catch (Exception e) {
+                    }
+                }
+                return -1;
+            }
+        }, ac);
+    }
+
+    /**
+     * return the letter at a specific point from an AccessibleContext
+     */
+    private String getAccessibleLetterAtIndexFromContext(final AccessibleContext ac, final int index) {
+        if (ac != null) {
+            String s = InvocationUtils.invokeAndWait(new Callable<String>() {
+                @Override
+                public String call() throws Exception {
+                    AccessibleText at = ac.getAccessibleText();
+                    if (at == null) return null;
+                    return at.getAtIndex(AccessibleText.CHARACTER, index);
+                }
+            }, ac);
+            if (s != null) {
+                references.increment(s);
+                return s;
+            }
+        } else {
+            debugString("getAccessibleLetterAtIndexFromContext; ac = null");
+        }
+        return null;
+    }
+
+    /**
+     * return the word at a specific point from an AccessibleContext
+     */
+    private String getAccessibleWordAtIndexFromContext(final AccessibleContext ac, final int index) {
+        if (ac != null) {
+            String s = InvocationUtils.invokeAndWait(new Callable<String>() {
+                @Override
+                public String call() throws Exception {
+                    AccessibleText at = ac.getAccessibleText();
+                    if (at == null) return null;
+                    return at.getAtIndex(AccessibleText.WORD, index);
+                }
+            }, ac);
+            if (s != null) {
+                references.increment(s);
+                return s;
+            }
+        } else {
+            debugString("getAccessibleWordAtIndexFromContext; ac = null");
+        }
+        return null;
+    }
+
+    /**
+     * return the sentence at a specific point from an AccessibleContext
+     */
+    private String getAccessibleSentenceAtIndexFromContext(final AccessibleContext ac, final int index) {
+        if (ac != null) {
+            String s = InvocationUtils.invokeAndWait(new Callable<String>() {
+                @Override
+                public String call() throws Exception {
+                    AccessibleText at = ac.getAccessibleText();
+                    if (at == null) return null;
+                    return at.getAtIndex(AccessibleText.SENTENCE, index);
+                }
+            }, ac);
+            if (s != null) {
+                references.increment(s);
+                return s;
+            }
+        } else {
+            debugString("getAccessibleSentenceAtIndexFromContext; ac = null");
+        }
+        return null;
+    }
+
+    /**
+     * return the text selection start from an AccessibleContext
+     */
+    private int getAccessibleTextSelectionStartFromContext(final AccessibleContext ac) {
+        if (ac == null) return -1;
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                AccessibleText at = ac.getAccessibleText();
+                if (at != null) {
+                    return at.getSelectionStart();
+                }
+                return -1;
+            }
+        }, ac);
+    }
+
+    /**
+     * return the text selection end from an AccessibleContext
+     */
+    private int getAccessibleTextSelectionEndFromContext(final AccessibleContext ac) {
+        if (ac == null)
+            return -1;
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                AccessibleText at = ac.getAccessibleText();
+                if (at != null) {
+                    return at.getSelectionEnd();
+                }
+                return -1;
+            }
+        }, ac);
+    }
+
+    /**
+     * return the selected text from an AccessibleContext
+     */
+    private String getAccessibleTextSelectedTextFromContext(final AccessibleContext ac) {
+        if (ac != null) {
+            String s = InvocationUtils.invokeAndWait(new Callable<String>() {
+                @Override
+                public String call() throws Exception {
+                    AccessibleText at = ac.getAccessibleText();
+                    if (at == null) return null;
+                    return at.getSelectedText();
+                }
+            }, ac);
+            if (s != null) {
+                references.increment(s);
+                return s;
+            }
+        } else {
+            debugString("getAccessibleTextSelectedTextFromContext; ac = null");
+        }
+        return null;
+    }
+
+    /**
+     * return the attribute string at a given index from an AccessibleContext
+     */
+    private String getAccessibleAttributesAtIndexFromContext(final AccessibleContext ac,
+                                                             final int index) {
+        if (ac == null)
+            return null;
+        AttributeSet as = InvocationUtils.invokeAndWait(new Callable<AttributeSet>() {
+            @Override
+            public AttributeSet call() throws Exception {
+                AccessibleText at = ac.getAccessibleText();
+                if (at != null) {
+                    return at.getCharacterAttribute(index);
+                }
+                return null;
+            }
+        }, ac);
+        String s = expandStyleConstants(as);
+        if (s != null) {
+            references.increment(s);
+            return s;
+        }
+        return null;
+    }
+
+    /**
+     * Get line info: left index of line
+     *
+     * algorithm:  cast back, doubling each time,
+     *             'till find line boundaries
+     *
+     * return -1 if we can't get the info (e.g. index or at passed in
+     * is bogus; etc.)
+     */
+    private int getAccessibleTextLineLeftBoundsFromContext(final AccessibleContext ac,
+                                                          final int index) {
+        if (ac == null)
+            return -1;
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                AccessibleText at = ac.getAccessibleText();
+                if (at != null) {
+                    int lineStart;
+                    int offset;
+                    Rectangle charRect;
+                    Rectangle indexRect = at.getCharacterBounds(index);
+                    int textLen = at.getCharCount();
+                    if (indexRect == null) {
+                        return -1;
+                    }
+                    // find the start of the line
+                    //
+                    offset = 1;
+                    lineStart = index - offset < 0 ? 0 : index - offset;
+                    charRect = at.getCharacterBounds(lineStart);
+                    // slouch behind beginning of line
+                    while (charRect != null
+                            && charRect.y >= indexRect.y
+                            && lineStart > 0) {
+                        offset = offset << 1;
+                        lineStart = index - offset < 0 ? 0 : index - offset;
+                        charRect = at.getCharacterBounds(lineStart);
+                    }
+                    if (lineStart == 0) {    // special case: we're on the first line!
+                        // we found it!
+                    } else {
+                        offset = offset >> 1;   // know boundary within last expansion
+                        // ground forward to beginning of line
+                        while (offset > 0) {
+                            charRect = at.getCharacterBounds(lineStart + offset);
+                            if (charRect.y < indexRect.y) { // still before line
+                                lineStart += offset;
+                            } else {
+                                // leave lineStart alone, it's close!
+                            }
+                            offset = offset >> 1;
+                        }
+                        // subtract one 'cause we're already too far...
+                        lineStart += 1;
+                    }
+                    return lineStart;
+                }
+                return -1;
+            }
+        }, ac);
+    }
+
+    /**
+     * Get line info: right index of line
+     *
+     * algorithm:  cast back, doubling each time,
+     *             'till find line boundaries
+     *
+     * return -1 if we can't get the info (e.g. index or at passed in
+     * is bogus; etc.)
+     */
+    private int getAccessibleTextLineRightBoundsFromContext(final AccessibleContext ac, final int index) {
+        if(ac == null)
+            return -1;
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                AccessibleText at = ac.getAccessibleText();
+                if (at != null) {
+                    int lineEnd;
+                    int offset;
+                    Rectangle charRect;
+                    Rectangle indexRect = at.getCharacterBounds(index);
+                    int textLen = at.getCharCount();
+                    if (indexRect == null) {
+                        return -1;
+                    }
+                    // find the end of the line
+                    //
+                    offset = 1;
+                    lineEnd = index + offset > textLen - 1
+                            ? textLen - 1 : index + offset;
+                    charRect = at.getCharacterBounds(lineEnd);
+                    // push past end of line
+                    while (charRect != null &&
+                            charRect.y <= indexRect.y &&
+                            lineEnd < textLen - 1) {
+                        offset = offset << 1;
+                        lineEnd = index + offset > textLen - 1
+                                ? textLen - 1 : index + offset;
+                        charRect = at.getCharacterBounds(lineEnd);
+                    }
+                    if (lineEnd == textLen - 1) {    // special case: on the last line!
+                        // we found it!
+                    } else {
+                        offset = offset >> 1;   // know boundary within last expansion
+                        // pull back to end of line
+                        while (offset > 0) {
+                            charRect = at.getCharacterBounds(lineEnd - offset);
+                            if (charRect.y > indexRect.y) { // still beyond line
+                                lineEnd -= offset;
+                            } else {
+                                // leave lineEnd alone, it's close!
+                            }
+                            offset = offset >> 1;
+                        }
+                        // subtract one 'cause we're already too far...
+                        lineEnd -= 1;
+                    }
+                    return lineEnd;
+                }
+                return -1;
+            }
+        }, ac);
+    }
+
+    /**
+     * Get a range of text; null if indicies are bogus
+     */
+    private String getAccessibleTextRangeFromContext(final AccessibleContext ac,
+                                                    final int start, final int end) {
+        String s = InvocationUtils.invokeAndWait(new Callable<String>() {
+            @Override
+            public String call() throws Exception {
+                if (ac != null) {
+                    AccessibleText at = ac.getAccessibleText();
+                    if (at != null) {
+                        // start - end is inclusive
+                        if (start > end) {
+                            return null;
+                        }
+                        if (end >= at.getCharCount()) {
+                            return null;
+                        }
+                        StringBuffer buf = new StringBuffer(end - start + 1);
+                        for (int i = start; i <= end; i++) {
+                            buf.append(at.getAtIndex(AccessibleText.CHARACTER, i));
+                        }
+                        return buf.toString();
+                    }
+                }
+                return null;
+            }
+        }, ac);
+        if (s != null) {
+            references.increment(s);
+            return s;
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * return the AttributeSet object at a given index from an AccessibleContext
+     */
+    private AttributeSet getAccessibleAttributeSetAtIndexFromContext(final AccessibleContext ac,
+                                                                    final int index) {
+        return InvocationUtils.invokeAndWait(new Callable<AttributeSet>() {
+            @Override
+            public AttributeSet call() throws Exception {
+                if (ac != null) {
+                    AccessibleText at = ac.getAccessibleText();
+                    if (at != null) {
+                        AttributeSet as = at.getCharacterAttribute(index);
+                        if (as != null) {
+                            AccessBridge.this.references.increment(as);
+                            return as;
+                        }
+                    }
+                }
+                return null;
+            }
+        }, ac);
+    }
+
+
+    /**
+     * return the bounding rectangle at index from an AccessibleContext
+     */
+    private Rectangle getAccessibleTextRectAtIndexFromContext(final AccessibleContext ac,
+                                                        final int index) {
+        // want to do this in global coords, so need to combine w/ac global coords
+        Rectangle r = InvocationUtils.invokeAndWait(new Callable<Rectangle>() {
+            @Override
+            public Rectangle call() throws Exception {
+                // want to do this in global coords, so need to combine w/ac global coords
+                if (ac != null) {
+                    AccessibleText at = ac.getAccessibleText();
+                    if (at != null) {
+                        Rectangle rect = at.getCharacterBounds(index);
+                        if (rect != null) {
+                            String s = at.getAtIndex(AccessibleText.CHARACTER, index);
+                            if (s != null && s.equals("\n")) {
+                                rect.width = 0;
+                            }
+                            return rect;
+                        }
+                    }
+                }
+                return null;
+            }
+        }, ac);
+        Rectangle acRect = getAccessibleBoundsOnScreenFromContext(ac);
+        if (r != null && acRect != null) {
+            r.translate(acRect.x, acRect.y);
+            return r;
+        }
+        return null;
+    }
+
+    /**
+     * return the AccessibleText character x-coord at index from an AccessibleContext
+     */
+    private int getAccessibleXcoordTextRectAtIndexFromContext(AccessibleContext ac, int index) {
+        if (ac != null) {
+            Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
+            if (r != null) {
+                return r.x;
+            }
+        } else {
+            debugString("getAccessibleXcoordTextRectAtIndexFromContext; ac = null");
+        }
+        return -1;
+    }
+
+    /**
+     * return the AccessibleText character y-coord at index from an AccessibleContext
+     */
+    private int getAccessibleYcoordTextRectAtIndexFromContext(AccessibleContext ac, int index) {
+        if (ac != null) {
+            Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
+            if (r != null) {
+                return r.y;
+            }
+        } else {
+            debugString("getAccessibleYcoordTextRectAtIndexFromContext; ac = null");
+        }
+        return -1;
+    }
+
+    /**
+     * return the AccessibleText character height at index from an AccessibleContext
+     */
+    private int getAccessibleHeightTextRectAtIndexFromContext(AccessibleContext ac, int index) {
+        if (ac != null) {
+            Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
+            if (r != null) {
+                return r.height;
+            }
+        } else {
+            debugString("getAccessibleHeightTextRectAtIndexFromContext; ac = null");
+        }
+        return -1;
+    }
+
+    /**
+     * return the AccessibleText character width at index from an AccessibleContext
+     */
+    private int getAccessibleWidthTextRectAtIndexFromContext(AccessibleContext ac, int index) {
+        if (ac != null) {
+            Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
+            if (r != null) {
+                return r.width;
+            }
+        } else {
+            debugString("getAccessibleWidthTextRectAtIndexFromContext; ac = null");
+        }
+        return -1;
+    }
+
+    /* ===== AttributeSet methods for AccessibleText ===== */
+
+    /**
+     * return the bold setting from an AttributeSet
+     */
+    private boolean getBoldFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            return StyleConstants.isBold(as);
+        } else {
+            debugString("getBoldFromAttributeSet; as = null");
+        }
+        return false;
+    }
+
+    /**
+     * return the italic setting from an AttributeSet
+     */
+    private boolean getItalicFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            return StyleConstants.isItalic(as);
+        } else {
+            debugString("getItalicFromAttributeSet; as = null");
+        }
+        return false;
+    }
+
+    /**
+     * return the underline setting from an AttributeSet
+     */
+    private boolean getUnderlineFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            return StyleConstants.isUnderline(as);
+        } else {
+            debugString("getUnderlineFromAttributeSet; as = null");
+        }
+        return false;
+    }
+
+    /**
+     * return the strikethrough setting from an AttributeSet
+     */
+    private boolean getStrikethroughFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            return StyleConstants.isStrikeThrough(as);
+        } else {
+            debugString("getStrikethroughFromAttributeSet; as = null");
+        }
+        return false;
+    }
+
+    /**
+     * return the superscript setting from an AttributeSet
+     */
+    private boolean getSuperscriptFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            return StyleConstants.isSuperscript(as);
+        } else {
+            debugString("getSuperscriptFromAttributeSet; as = null");
+        }
+        return false;
+    }
+
+    /**
+     * return the subscript setting from an AttributeSet
+     */
+    private boolean getSubscriptFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            return StyleConstants.isSubscript(as);
+        } else {
+            debugString("getSubscriptFromAttributeSet; as = null");
+        }
+        return false;
+    }
+
+    /**
+     * return the background color from an AttributeSet
+     */
+    private String getBackgroundColorFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            String s = StyleConstants.getBackground(as).toString();
+            if (s != null) {
+                references.increment(s);
+                return s;
+            }
+        } else {
+            debugString("getBackgroundColorFromAttributeSet; as = null");
+        }
+        return null;
+    }
+
+    /**
+     * return the foreground color from an AttributeSet
+     */
+    private String getForegroundColorFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            String s = StyleConstants.getForeground(as).toString();
+            if (s != null) {
+                references.increment(s);
+                return s;
+            }
+        } else {
+            debugString("getForegroundColorFromAttributeSet; as = null");
+        }
+        return null;
+    }
+
+    /**
+     * return the font family from an AttributeSet
+     */
+    private String getFontFamilyFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            String s = StyleConstants.getFontFamily(as).toString();
+            if (s != null) {
+                references.increment(s);
+                return s;
+            }
+        } else {
+            debugString("getFontFamilyFromAttributeSet; as = null");
+        }
+        return null;
+    }
+
+    /**
+     * return the font size from an AttributeSet
+     */
+    private int getFontSizeFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            return StyleConstants.getFontSize(as);
+        } else {
+            debugString("getFontSizeFromAttributeSet; as = null");
+        }
+        return -1;
+    }
+
+    /**
+     * return the alignment from an AttributeSet
+     */
+    private int getAlignmentFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            return StyleConstants.getAlignment(as);
+        } else {
+            debugString("getAlignmentFromAttributeSet; as = null");
+        }
+        return -1;
+    }
+
+    /**
+     * return the BiDi level from an AttributeSet
+     */
+    private int getBidiLevelFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            return StyleConstants.getBidiLevel(as);
+        } else {
+            debugString("getBidiLevelFromAttributeSet; as = null");
+        }
+        return -1;
+    }
+
+
+    /**
+     * return the first line indent from an AttributeSet
+     */
+    private float getFirstLineIndentFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            return StyleConstants.getFirstLineIndent(as);
+        } else {
+            debugString("getFirstLineIndentFromAttributeSet; as = null");
+        }
+        return -1;
+    }
+
+    /**
+     * return the left indent from an AttributeSet
+     */
+    private float getLeftIndentFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            return StyleConstants.getLeftIndent(as);
+        } else {
+            debugString("getLeftIndentFromAttributeSet; as = null");
+        }
+        return -1;
+    }
+
+    /**
+     * return the right indent from an AttributeSet
+     */
+    private float getRightIndentFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            return StyleConstants.getRightIndent(as);
+        } else {
+            debugString("getRightIndentFromAttributeSet; as = null");
+        }
+        return -1;
+    }
+
+    /**
+     * return the line spacing from an AttributeSet
+     */
+    private float getLineSpacingFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            return StyleConstants.getLineSpacing(as);
+        } else {
+            debugString("getLineSpacingFromAttributeSet; as = null");
+        }
+        return -1;
+    }
+
+    /**
+     * return the space above from an AttributeSet
+     */
+    private float getSpaceAboveFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            return StyleConstants.getSpaceAbove(as);
+        } else {
+            debugString("getSpaceAboveFromAttributeSet; as = null");
+        }
+        return -1;
+    }
+
+    /**
+     * return the space below from an AttributeSet
+     */
+    private float getSpaceBelowFromAttributeSet(AttributeSet as) {
+        if (as != null) {
+            return StyleConstants.getSpaceBelow(as);
+        } else {
+            debugString("getSpaceBelowFromAttributeSet; as = null");
+        }
+        return -1;
+    }
+
+    /**
+     * Enumerate all StyleConstants in the AttributeSet
+     *
+     * We need to check explicitly, 'cause of the HTML package conversion
+     * mechanism (they may not be stored as StyleConstants, just translated
+     * to them when asked).
+     *
+     * (Use convenience methods where they are defined...)
+     *
+     * Not checking the following (which the IBM SNS guidelines says
+     * should be defined):
+     *    - ComponentElementName
+     *    - IconElementName
+     *    - NameAttribute
+     *    - ResolveAttribute
+     */
+    private String expandStyleConstants(AttributeSet as) {
+        Color c;
+        Object o;
+        String attrString = "";
+
+        // ---------- check for various Character Constants
+
+        attrString += "BidiLevel = " + StyleConstants.getBidiLevel(as);
+
+        final Component comp = StyleConstants.getComponent(as);
+        if (comp != null) {
+            if (comp instanceof Accessible) {
+                final AccessibleContext ac = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+                    @Override
+                    public AccessibleContext call() throws Exception {
+                        return comp.getAccessibleContext();
+                    }
+                }, comp);
+                if (ac != null) {
+                    attrString += "; Accessible Component = " + InvocationUtils.invokeAndWait(new Callable<String>() {
+                        @Override
+                        public String call() throws Exception {
+                            return ac.getAccessibleName();
+                        }
+                    }, ac);
+                } else {
+                    attrString += "; Innaccessible Component = " + comp;
+                }
+            } else {
+                attrString += "; Innaccessible Component = " + comp;
+            }
+        }
+
+        Icon i = StyleConstants.getIcon(as);
+        if (i != null) {
+            if (i instanceof ImageIcon) {
+                attrString += "; ImageIcon = " + ((ImageIcon) i).getDescription();
+            } else {
+                attrString += "; Icon = " + i;
+            }
+        }
+
+        attrString += "; FontFamily = " + StyleConstants.getFontFamily(as);
+
+        attrString += "; FontSize = " + StyleConstants.getFontSize(as);
+
+        if (StyleConstants.isBold(as)) {
+            attrString += "; bold";
+        }
+
+        if (StyleConstants.isItalic(as)) {
+            attrString += "; italic";
+        }
+
+        if (StyleConstants.isUnderline(as)) {
+            attrString += "; underline";
+        }
+
+        if (StyleConstants.isStrikeThrough(as)) {
+            attrString += "; strikethrough";
+        }
+
+        if (StyleConstants.isSuperscript(as)) {
+            attrString += "; superscript";
+        }
+
+        if (StyleConstants.isSubscript(as)) {
+            attrString += "; subscript";
+        }
+
+        c = StyleConstants.getForeground(as);
+        if (c != null) {
+            attrString += "; Foreground = " + c;
+        }
+
+        c = StyleConstants.getBackground(as);
+        if (c != null) {
+            attrString += "; Background = " + c;
+        }
+
+        attrString += "; FirstLineIndent = " + StyleConstants.getFirstLineIndent(as);
+
+        attrString += "; RightIndent = " + StyleConstants.getRightIndent(as);
+
+        attrString += "; LeftIndent = " + StyleConstants.getLeftIndent(as);
+
+        attrString += "; LineSpacing = " + StyleConstants.getLineSpacing(as);
+
+        attrString += "; SpaceAbove = " + StyleConstants.getSpaceAbove(as);
+
+        attrString += "; SpaceBelow = " + StyleConstants.getSpaceBelow(as);
+
+        attrString += "; Alignment = " + StyleConstants.getAlignment(as);
+
+        TabSet ts = StyleConstants.getTabSet(as);
+        if (ts != null) {
+            attrString += "; TabSet = " + ts;
+        }
+
+        return attrString;
+    }
+
+
+    /* ===== AccessibleValue methods ===== */
+
+    /**
+     * return the AccessibleValue current value from an AccessibleContext
+     * returned using a String 'cause the value is a java Number
+     *
+     */
+    private String getCurrentAccessibleValueFromContext(final AccessibleContext ac) {
+        if (ac != null) {
+            final Number value = InvocationUtils.invokeAndWait(new Callable<Number>() {
+                @Override
+                public Number call() throws Exception {
+                    AccessibleValue av = ac.getAccessibleValue();
+                    if (av == null) return null;
+                    return av.getCurrentAccessibleValue();
+                }
+            }, ac);
+            if (value != null) {
+                String s = value.toString();
+                if (s != null) {
+                    references.increment(s);
+                    return s;
+                }
+            }
+        } else {
+            debugString("getCurrentAccessibleValueFromContext; ac = null");
+        }
+        return null;
+    }
+
+    /**
+     * return the AccessibleValue maximum value from an AccessibleContext
+     * returned using a String 'cause the value is a java Number
+     *
+     */
+    private String getMaximumAccessibleValueFromContext(final AccessibleContext ac) {
+        if (ac != null) {
+            final Number value = InvocationUtils.invokeAndWait(new Callable<Number>() {
+                @Override
+                public Number call() throws Exception {
+                    AccessibleValue av = ac.getAccessibleValue();
+                    if (av == null) return null;
+                    return av.getMaximumAccessibleValue();
+                }
+            }, ac);
+            if (value != null) {
+                String s = value.toString();
+                if (s != null) {
+                    references.increment(s);
+                    return s;
+                }
+            }
+        } else {
+            debugString("getMaximumAccessibleValueFromContext; ac = null");
+        }
+        return null;
+    }
+
+    /**
+     * return the AccessibleValue minimum value from an AccessibleContext
+     * returned using a String 'cause the value is a java Number
+     *
+     */
+    private String getMinimumAccessibleValueFromContext(final AccessibleContext ac) {
+        if (ac != null) {
+            final Number value = InvocationUtils.invokeAndWait(new Callable<Number>() {
+                @Override
+                public Number call() throws Exception {
+                    AccessibleValue av = ac.getAccessibleValue();
+                    if (av == null) return null;
+                    return av.getMinimumAccessibleValue();
+                }
+            }, ac);
+            if (value != null) {
+                String s = value.toString();
+                if (s != null) {
+                    references.increment(s);
+                    return s;
+                }
+            }
+        } else {
+            debugString("getMinimumAccessibleValueFromContext; ac = null");
+        }
+        return null;
+    }
+
+
+    /* ===== AccessibleSelection methods ===== */
+
+    /**
+     * add to the AccessibleSelection of an AccessibleContext child i
+     *
+     */
+    private void addAccessibleSelectionFromContext(final AccessibleContext ac, final int i) {
+        try {
+            InvocationUtils.invokeAndWait(new Callable<Object>() {
+                @Override
+                public Object call() throws Exception {
+                    if (ac != null) {
+                        AccessibleSelection as = ac.getAccessibleSelection();
+                        if (as != null) {
+                            as.addAccessibleSelection(i);
+                        }
+                    }
+                    return null;
+                }
+            }, ac);
+        } catch(Exception e){}
+    }
+
+    /**
+     * clear all of the AccessibleSelection of an AccessibleContex
+     *
+     */
+    private void clearAccessibleSelectionFromContext(final AccessibleContext ac) {
+        try {
+            InvocationUtils.invokeAndWait(new Callable<Object>() {
+                @Override
+                public Object call() throws Exception {
+                    AccessibleSelection as = ac.getAccessibleSelection();
+                    if (as != null) {
+                        as.clearAccessibleSelection();
+                    }
+                    return null;
+                }
+            }, ac);
+        } catch(Exception e){}
+
+    }
+
+    /**
+     * get the AccessibleContext of the i-th AccessibleSelection of an AccessibleContext
+     *
+     */
+    private AccessibleContext getAccessibleSelectionFromContext(final AccessibleContext ac, final int i) {
+        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+            @Override
+            public AccessibleContext call() throws Exception {
+                if (ac != null) {
+                    AccessibleSelection as = ac.getAccessibleSelection();
+                    if (as != null) {
+                        Accessible a = as.getAccessibleSelection(i);
+                        if (a == null)
+                            return null;
+                        else
+                            return a.getAccessibleContext();
+                    }
+                }
+                return null;
+            }
+        }, ac);
+    }
+
+    /**
+     * get number of things selected in the AccessibleSelection of an AccessibleContext
+     *
+     */
+    private int getAccessibleSelectionCountFromContext(final AccessibleContext ac) {
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                if (ac != null) {
+                    AccessibleSelection as = ac.getAccessibleSelection();
+                    if (as != null) {
+                        return as.getAccessibleSelectionCount();
+                    }
+                }
+                return -1;
+            }
+        }, ac);
+    }
+
+    /**
+     * return true if the i-th child of the AccessibleSelection of an AccessibleContext is selected
+     *
+     */
+    private boolean isAccessibleChildSelectedFromContext(final AccessibleContext ac, final int i) {
+        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
+            @Override
+            public Boolean call() throws Exception {
+                if (ac != null) {
+                    AccessibleSelection as = ac.getAccessibleSelection();
+                    if (as != null) {
+                        return as.isAccessibleChildSelected(i);
+                    }
+                }
+                return false;
+            }
+        }, ac);
+    }
+
+    /**
+     * remove the i-th child from the AccessibleSelection of an AccessibleContext
+     *
+     */
+    private void removeAccessibleSelectionFromContext(final AccessibleContext ac, final int i) {
+        InvocationUtils.invokeAndWait(new Callable<Object>() {
+            @Override
+            public Object call() throws Exception {
+                if (ac != null) {
+                    AccessibleSelection as = ac.getAccessibleSelection();
+                    if (as != null) {
+                        as.removeAccessibleSelection(i);
+                    }
+                }
+                return null;
+            }
+        }, ac);
+    }
+
+    /**
+     * select all (if possible) of the children of the AccessibleSelection of an AccessibleContext
+     *
+     */
+    private void selectAllAccessibleSelectionFromContext(final AccessibleContext ac) {
+            InvocationUtils.invokeAndWait(new Callable<Object>() {
+                @Override
+                public Object call() throws Exception {
+                    if (ac != null) {
+                        AccessibleSelection as = ac.getAccessibleSelection();
+                        if (as != null) {
+                            as.selectAllAccessibleSelection();
+                        }
+                    }
+                    return null;
+                }
+            }, ac);
+    }
+
+    // ======== AccessibleTable ========
+
+    ConcurrentHashMap<AccessibleTable,AccessibleContext> hashtab = new ConcurrentHashMap<>();
+
+    /**
+     * returns the AccessibleTable for an AccessibleContext
+     */
+    private AccessibleTable getAccessibleTableFromContext(final AccessibleContext ac) {
+        return InvocationUtils.invokeAndWait(new Callable<AccessibleTable>() {
+            @Override
+            public AccessibleTable call() throws Exception {
+                if (ac != null) {
+                    AccessibleTable at = ac.getAccessibleTable();
+                    if (at != null) {
+                        AccessBridge.this.hashtab.put(at, ac);
+                        return at;
+                    }
+                }
+                return null;
+            }
+        }, ac);
+    }
+
+
+    /*
+     * returns the AccessibleContext that contains an AccessibleTable
+     */
+    private AccessibleContext getContextFromAccessibleTable(AccessibleTable at) {
+        return hashtab.get(at);
+    }
+
+    /*
+     * returns the row count for an AccessibleTable
+     */
+    private int getAccessibleTableRowCount(final AccessibleContext ac) {
+        debugString("##### getAccessibleTableRowCount");
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                if (ac != null) {
+                    AccessibleTable at = ac.getAccessibleTable();
+                    if (at != null) {
+                        return at.getAccessibleRowCount();
+                    }
+                }
+                return -1;
+            }
+        }, ac);
+    }
+
+    /*
+     * returns the column count for an AccessibleTable
+     */
+    private int getAccessibleTableColumnCount(final AccessibleContext ac) {
+        debugString("##### getAccessibleTableColumnCount");
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                if (ac != null) {
+                    AccessibleTable at = ac.getAccessibleTable();
+                    if (at != null) {
+                        return at.getAccessibleColumnCount();
+                    }
+                }
+                return -1;
+            }
+        }, ac);
+    }
+
+    /*
+     * returns the AccessibleContext for an AccessibleTable cell
+     */
+    private AccessibleContext getAccessibleTableCellAccessibleContext(final AccessibleTable at,
+                                                                      final int row, final int column) {
+        debugString("getAccessibleTableCellAccessibleContext: at = "+at.getClass());
+        if (at == null) return null;
+        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+            @Override
+            public AccessibleContext call() throws Exception {
+                if (!(at instanceof AccessibleContext)) {
+                    Accessible a = at.getAccessibleAt(row, column);
+                    if (a != null) {
+                        return a.getAccessibleContext();
+                    }
+                } else {
+                    // work-around for AccessibleJTable.getCurrentAccessibleContext returning
+                    // wrong renderer component when cell contains more than one component
+                    AccessibleContext ac = (AccessibleContext) at;
+                    Accessible parent = ac.getAccessibleParent();
+                    if (parent != null) {
+                        int indexInParent = ac.getAccessibleIndexInParent();
+                        Accessible child =
+                                parent.getAccessibleContext().getAccessibleChild(indexInParent);
+                        if (child instanceof JTable) {
+                            JTable table = (JTable) child;
+
+                            TableCellRenderer renderer = table.getCellRenderer(row, column);
+                            if (renderer == null) {
+                                Class<?> columnClass = table.getColumnClass(column);
+                                renderer = table.getDefaultRenderer(columnClass);
+                            }
+                            Component component =
+                                    renderer.getTableCellRendererComponent(table, table.getValueAt(row, column),
+                                            false, false, row, column);
+                            if (component instanceof Accessible) {
+                                return component.getAccessibleContext();
+                            }
+                        }
+                    }
+                }
+                return null;
+            }
+        }, getContextFromAccessibleTable(at));
+    }
+
+    /*
+     * returns the index of a cell at a given row and column in an AccessibleTable
+     */
+    private int getAccessibleTableCellIndex(final AccessibleTable at, int row, int column) {
+        debugString("##### getAccessibleTableCellIndex: at="+at);
+        if (at != null) {
+            int cellIndex = row *
+                InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                    @Override
+                    public Integer call() throws Exception {
+                        return at.getAccessibleColumnCount();
+                    }
+                }, getContextFromAccessibleTable(at)) +
+                column;
+            debugString("   ##### getAccessibleTableCellIndex="+cellIndex);
+            return cellIndex;
+        }
+        debugString(" ##### getAccessibleTableCellIndex FAILED");
+        return -1;
+    }
+
+    /*
+     * returns the row extent of a cell at a given row and column in an AccessibleTable
+     */
+    private int getAccessibleTableCellRowExtent(final AccessibleTable at, final int row, final int column) {
+        debugString("##### getAccessibleTableCellRowExtent");
+        if (at != null) {
+            int rowExtent = InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                                                              @Override
+                                                              public Integer call() throws Exception {
+                                                                  return at.getAccessibleRowExtentAt(row, column);
+                                                              }
+                                                          },
+                    getContextFromAccessibleTable(at));
+            debugString("   ##### getAccessibleTableCellRowExtent="+rowExtent);
+            return rowExtent;
+        }
+        debugString(" ##### getAccessibleTableCellRowExtent FAILED");
+        return -1;
+    }
+
+    /*
+     * returns the column extent of a cell at a given row and column in an AccessibleTable
+     */
+    private int getAccessibleTableCellColumnExtent(final AccessibleTable at, final int row, final int column) {
+        debugString("##### getAccessibleTableCellColumnExtent");
+        if (at != null) {
+            int columnExtent = InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                                                                 @Override
+                                                                 public Integer call() throws Exception {
+                                                                     return at.getAccessibleColumnExtentAt(row, column);
+                                                                 }
+                                                             },
+                    getContextFromAccessibleTable(at));
+            debugString("   ##### getAccessibleTableCellColumnExtent="+columnExtent);
+            return columnExtent;
+        }
+        debugString(" ##### getAccessibleTableCellColumnExtent FAILED");
+        return -1;
+    }
+
+    /*
+     * returns whether a cell is selected at a given row and column in an AccessibleTable
+     */
+    private boolean isAccessibleTableCellSelected(final AccessibleTable at, final int row,
+                         final int column) {
+        debugString("##### isAccessibleTableCellSelected: ["+row+"]["+column+"]");
+        if (at == null)
+            return false;
+        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
+            @Override
+            public Boolean call() throws Exception {
+                boolean isSelected = false;
+                Accessible a = at.getAccessibleAt(row, column);
+                if (a != null) {
+                    AccessibleContext ac = a.getAccessibleContext();
+                    if (ac == null)
+                        return false;
+                    AccessibleStateSet as = ac.getAccessibleStateSet();
+                    if (as != null) {
+                        isSelected = as.contains(AccessibleState.SELECTED);
+                    }
+                }
+                return isSelected;
+            }
+        }, getContextFromAccessibleTable(at));
+    }
+
+    /*
+     * returns an AccessibleTable that represents the row header in an
+     * AccessibleTable
+     */
+    private AccessibleTable getAccessibleTableRowHeader(final AccessibleContext ac) {
+        debugString(" #####  getAccessibleTableRowHeader called");
+        AccessibleTable at = InvocationUtils.invokeAndWait(new Callable<AccessibleTable>() {
+            @Override
+            public AccessibleTable call() throws Exception {
+                if (ac != null) {
+                    AccessibleTable at = ac.getAccessibleTable();
+                    if (at != null) {
+                        return at.getAccessibleRowHeader();
+                    }
+                }
+                return null;
+            }
+        }, ac);
+        if (at != null) {
+            hashtab.put(at, ac);
+        }
+        return at;
+    }
+
+    /*
+     * returns an AccessibleTable that represents the column header in an
+     * AccessibleTable
+     */
+    private AccessibleTable getAccessibleTableColumnHeader(final AccessibleContext ac) {
+    debugString("##### getAccessibleTableColumnHeader");
+        if (ac == null)
+            return null;
+        AccessibleTable at = InvocationUtils.invokeAndWait(new Callable<AccessibleTable>() {
+            @Override
+            public AccessibleTable call() throws Exception {
+                // workaround for getAccessibleColumnHeader NPE
+                // when the table header is null
+                Accessible parent = ac.getAccessibleParent();
+                if (parent != null) {
+                    int indexInParent = ac.getAccessibleIndexInParent();
+                    Accessible child =
+                            parent.getAccessibleContext().getAccessibleChild(indexInParent);
+                    if (child instanceof JTable) {
+                        JTable table = (JTable) child;
+                        if (table.getTableHeader() == null) {
+                            return null;
+                        }
+                    }
+                }
+                AccessibleTable at = ac.getAccessibleTable();
+                if (at != null) {
+                    return at.getAccessibleColumnHeader();
+                }
+                return null;
+            }
+        }, ac);
+        if (at != null) {
+            hashtab.put(at, ac);
+        }
+        return at;
+    }
+
+    /*
+     * returns the number of row headers in an AccessibleTable that represents
+     * the row header in an AccessibleTable
+     */
+    private int getAccessibleTableRowHeaderRowCount(AccessibleContext ac) {
+
+    debugString(" #####  getAccessibleTableRowHeaderRowCount called");
+        if (ac != null) {
+            final AccessibleTable atRowHeader = getAccessibleTableRowHeader(ac);
+            if (atRowHeader != null) {
+                return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                    @Override
+                    public Integer call() throws Exception {
+                        if (atRowHeader != null) {
+                            return atRowHeader.getAccessibleRowCount();
+                        }
+                        return -1;
+                    }
+                }, ac);
+            }
+        }
+        return -1;
+    }
+
+    /*
+     * returns the number of column headers in an AccessibleTable that represents
+     * the row header in an AccessibleTable
+     */
+    private int getAccessibleTableRowHeaderColumnCount(AccessibleContext ac) {
+        debugString(" #####  getAccessibleTableRowHeaderColumnCount called");
+        if (ac != null) {
+            final AccessibleTable atRowHeader = getAccessibleTableRowHeader(ac);
+            if (atRowHeader != null) {
+                return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                    @Override
+                    public Integer call() throws Exception {
+                        if (atRowHeader != null) {
+                            return atRowHeader.getAccessibleColumnCount();
+                        }
+                        return -1;
+                    }
+                }, ac);
+            }
+        }
+        debugString(" ##### getAccessibleTableRowHeaderColumnCount FAILED");
+        return -1;
+    }
+
+    /*
+     * returns the number of row headers in an AccessibleTable that represents
+     * the column header in an AccessibleTable
+     */
+    private int getAccessibleTableColumnHeaderRowCount(AccessibleContext ac) {
+
+    debugString("##### getAccessibleTableColumnHeaderRowCount");
+        if (ac != null) {
+            final AccessibleTable atColumnHeader = getAccessibleTableColumnHeader(ac);
+            if (atColumnHeader != null) {
+                return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                    @Override
+                    public Integer call() throws Exception {
+                        if (atColumnHeader != null) {
+                            return atColumnHeader.getAccessibleRowCount();
+                        }
+                        return -1;
+                    }
+                }, ac);
+            }
+        }
+        debugString(" ##### getAccessibleTableColumnHeaderRowCount FAILED");
+        return -1;
+    }
+
+    /*
+     * returns the number of column headers in an AccessibleTable that represents
+     * the column header in an AccessibleTable
+     */
+    private int getAccessibleTableColumnHeaderColumnCount(AccessibleContext ac) {
+
+    debugString("#####  getAccessibleTableColumnHeaderColumnCount");
+        if (ac != null) {
+            final AccessibleTable atColumnHeader = getAccessibleTableColumnHeader(ac);
+            if (atColumnHeader != null) {
+                return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                    @Override
+                    public Integer call() throws Exception {
+                        if (atColumnHeader != null) {
+                            return atColumnHeader.getAccessibleColumnCount();
+                        }
+                        return -1;
+                    }
+                }, ac);
+            }
+        }
+        debugString(" ##### getAccessibleTableColumnHeaderColumnCount FAILED");
+        return -1;
+    }
+
+    /*
+     * returns the description of a row header in an AccessibleTable
+     */
+    private AccessibleContext getAccessibleTableRowDescription(final AccessibleTable table,
+                                                              final int row) {
+        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+            @Override
+            public AccessibleContext call() throws Exception {
+                if (table != null) {
+                    Accessible a = table.getAccessibleRowDescription(row);
+                    if (a != null) {
+                        return a.getAccessibleContext();
+                    }
+                }
+                return null;
+            }
+        }, getContextFromAccessibleTable(table));
+    }
+
+    /*
+     * returns the description of a column header in an AccessibleTable
+     */
+    private AccessibleContext getAccessibleTableColumnDescription(final AccessibleTable at,
+                                                                 final int column) {
+        if (at == null)
+            return null;
+        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+            @Override
+            public AccessibleContext call() throws Exception {
+                Accessible a = at.getAccessibleColumnDescription(column);
+                if (a != null) {
+                    return a.getAccessibleContext();
+                }
+                return null;
+            }
+        }, getContextFromAccessibleTable(at));
+    }
+
+    /*
+     * returns the number of rows selected in an AccessibleTable
+     */
+    private int getAccessibleTableRowSelectionCount(final AccessibleTable at) {
+        if (at != null) {
+            return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                @Override
+                public Integer call() throws Exception {
+                    int[] selections = at.getSelectedAccessibleRows();
+                    if (selections != null)
+                        return selections.length;
+                    else
+                        return -1;
+                }
+            }, getContextFromAccessibleTable(at));
+        }
+        return -1;
+    }
+
+    /*
+     * returns the row number of the i-th selected row in an AccessibleTable
+     */
+    private int getAccessibleTableRowSelections(final AccessibleTable at, final int i) {
+        if (at != null) {
+            return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                @Override
+                public Integer call() throws Exception {
+                    int[] selections = at.getSelectedAccessibleRows();
+                    if (selections.length > i) {
+                        return selections[i];
+                    }
+                    return -1;
+                }
+            }, getContextFromAccessibleTable(at));
+        }
+        return -1;
+    }
+
+    /*
+     * returns whether a row is selected in an AccessibleTable
+     */
+    private boolean isAccessibleTableRowSelected(final AccessibleTable at,
+                                                 final int row) {
+        if (at == null)
+            return false;
+        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
+            @Override
+            public Boolean call() throws Exception {
+                return at.isAccessibleRowSelected(row);
+            }
+         }, getContextFromAccessibleTable(at));
+    }
+
+    /*
+     * returns whether a column is selected in an AccessibleTable
+     */
+    private boolean isAccessibleTableColumnSelected(final AccessibleTable at,
+                                                   final int column) {
+        if (at == null)
+            return false;
+        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
+            @Override
+            public Boolean call() throws Exception {
+                return at.isAccessibleColumnSelected(column);
+            }
+         }, getContextFromAccessibleTable(at));
+    }
+
+    /*
+     * returns the number of columns selected in an AccessibleTable
+     */
+    private int getAccessibleTableColumnSelectionCount(final AccessibleTable at) {
+        if (at == null)
+            return -1;
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                int[] selections = at.getSelectedAccessibleColumns();
+                if (selections != null)
+                    return selections.length;
+                else
+                    return -1;
+            }
+        }, getContextFromAccessibleTable(at));
+    }
+
+    /*
+     * returns the row number of the i-th selected row in an AccessibleTable
+     */
+    private int getAccessibleTableColumnSelections(final AccessibleTable at, final int i) {
+        if (at == null)
+            return -1;
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                int[] selections = at.getSelectedAccessibleColumns();
+                if (selections != null && selections.length > i) {
+                    return selections[i];
+                }
+                return -1;
+            }
+        }, getContextFromAccessibleTable(at));
+    }
+
+    /* ===== AccessibleExtendedTable (since 1.4) ===== */
+
+    /*
+     * returns the row number for a cell at a given index in an AccessibleTable
+     */
+    private int getAccessibleTableRow(final AccessibleTable at, int index) {
+        if (at == null)
+            return -1;
+        int colCount=InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                return at.getAccessibleColumnCount();
+            }
+        }, getContextFromAccessibleTable(at));
+        return index / colCount;
+    }
+
+    /*
+     * returns the column number for a cell at a given index in an AccessibleTable
+     */
+    private int getAccessibleTableColumn(final AccessibleTable at, int index) {
+        if (at == null)
+            return -1;
+        int colCount=InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                return at.getAccessibleColumnCount();
+            }
+        }, getContextFromAccessibleTable(at));
+        return index % colCount;
+    }
+
+    /*
+     * returns the index for a cell at a given row and column in an
+     * AccessibleTable
+     */
+    private int getAccessibleTableIndex(final AccessibleTable at, int row, int column) {
+        if (at == null)
+            return -1;
+        int colCount = InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                return at.getAccessibleColumnCount();
+            }
+         }, getContextFromAccessibleTable(at));
+        return row * colCount + column;
+    }
+
+    // ===== AccessibleRelationSet =====
+
+    /*
+     * returns the number of relations in the AccessibleContext's
+     * AccessibleRelationSet
+     */
+    private int getAccessibleRelationCount(final AccessibleContext ac) {
+        {
+            if (ac != null) {
+                AccessibleRelationSet ars = InvocationUtils.invokeAndWait(new Callable<AccessibleRelationSet>() {
+                    @Override
+                    public AccessibleRelationSet call() throws Exception {
+                        return ac.getAccessibleRelationSet();
+                    }
+                }, ac);
+                if (ars != null)
+                    return ars.size();
+            }
+        }
+        return 0;
+    }
+
+    /*
+     * returns the ith relation key in the AccessibleContext's
+     * AccessibleRelationSet
+     */
+    private String getAccessibleRelationKey(final AccessibleContext ac, final int i) {
+        return InvocationUtils.invokeAndWait(new Callable<String>() {
+            @Override
+            public String call() throws Exception {
+                if (ac != null) {
+                    AccessibleRelationSet ars = ac.getAccessibleRelationSet();
+                    if (ars != null) {
+                        AccessibleRelation[] relations = ars.toArray();
+                        if (relations != null && i >= 0 && i < relations.length) {
+                            return relations[i].getKey();
+                        }
+                    }
+                }
+                return null;
+            }
+        }, ac);
+    }
+
+    /*
+     * returns the number of targets in a relation in the AccessibleContext's
+     * AccessibleRelationSet
+     */
+    private int getAccessibleRelationTargetCount(final AccessibleContext ac, final int i) {
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                if (ac != null) {
+                    AccessibleRelationSet ars = ac.getAccessibleRelationSet();
+                    if (ars != null) {
+                        AccessibleRelation[] relations = ars.toArray();
+                        if (relations != null && i >= 0 && i < relations.length) {
+                            Object[] targets = relations[i].getTarget();
+                            return targets.length;
+                        }
+                    }
+                }
+                return -1;
+            }
+        }, ac);
+    }
+
+    /*
+     * returns the jth target in the ith relation in the AccessibleContext's
+     * AccessibleRelationSet
+     */
+    private AccessibleContext getAccessibleRelationTarget(final AccessibleContext ac,
+                                                         final int i, final int j) {
+        debugString("***** getAccessibleRelationTarget");
+        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+            @Override
+            public AccessibleContext call() throws Exception {
+                if (ac != null) {
+                    AccessibleRelationSet ars = ac.getAccessibleRelationSet();
+                    if (ars != null) {
+                        AccessibleRelation[] relations = ars.toArray();
+                        if (relations != null && i >= 0 && i < relations.length) {
+                            Object[] targets = relations[i].getTarget();
+                            if (targets != null && j >= 0 & j < targets.length) {
+                                Object o = targets[j];
+                                if (o instanceof Accessible) {
+                                    return ((Accessible) o).getAccessibleContext();
+                                }
+                            }
+                        }
+                    }
+                }
+                return null;
+            }
+        }, ac);
+    }
+
+    // ========= AccessibleHypertext =========
+
+    private Map<AccessibleHypertext, AccessibleContext> hyperTextContextMap = new WeakHashMap<>();
+    private Map<AccessibleHyperlink, AccessibleContext> hyperLinkContextMap = new WeakHashMap<>();
+
+    /*
+     * Returns the AccessibleHypertext
+     */
+    private AccessibleHypertext getAccessibleHypertext(final AccessibleContext ac) {
+        debugString("getAccessibleHyperlink");
+        if (ac==null)
+            return null;
+        AccessibleHypertext hypertext = InvocationUtils.invokeAndWait(new Callable<AccessibleHypertext>() {
+            @Override
+            public AccessibleHypertext call() throws Exception {
+                AccessibleText at = ac.getAccessibleText();
+                if (!(at instanceof AccessibleHypertext)) {
+                    return null;
+                }
+                return ((AccessibleHypertext) at);
+            }
+        }, ac);
+        hyperTextContextMap.put(hypertext, ac);
+        return hypertext;
+    }
+
+    /*
+     * Returns the number of AccessibleHyperlinks
+     */
+    private int getAccessibleHyperlinkCount(AccessibleContext ac) {
+        debugString("getAccessibleHyperlinkCount");
+        if (ac == null) {
+            return 0;
+        }
+        final AccessibleHypertext hypertext = getAccessibleHypertext(ac);
+        if (hypertext == null) {
+            return 0;
+        }
+        //return hypertext.getLinkCount();
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                return hypertext.getLinkCount();
+            }
+        }, ac);
+    }
+
+    /*
+     * Returns the hyperlink at the specified index
+     */
+    private AccessibleHyperlink getAccessibleHyperlink(final AccessibleHypertext hypertext, final int i) {
+        debugString("getAccessibleHyperlink");
+        if (hypertext == null) {
+            return null;
+        }
+        AccessibleContext ac = hyperTextContextMap.get(hypertext);
+        if ( i < 0 || i >=
+             InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                 @Override
+                 public Integer call() throws Exception {
+                     return hypertext.getLinkCount();
+                 }
+             }, ac) ) {
+            return null;
+        }
+        AccessibleHyperlink acLink = InvocationUtils.invokeAndWait(new Callable<AccessibleHyperlink>() {
+            @Override
+            public AccessibleHyperlink call() throws Exception {
+                AccessibleHyperlink link = hypertext.getLink(i);
+                if (link == null || (!link.isValid())) {
+                    return null;
+                }
+                return link;
+            }
+        }, ac);
+        hyperLinkContextMap.put(acLink, ac);
+        return acLink;
+    }
+
+    /*
+     * Returns the hyperlink object description
+     */
+    private String getAccessibleHyperlinkText(final AccessibleHyperlink link) {
+        debugString("getAccessibleHyperlinkText");
+        if (link == null) {
+            return null;
+        }
+        return InvocationUtils.invokeAndWait(new Callable<String>() {
+            @Override
+            public String call() throws Exception {
+                Object o = link.getAccessibleActionDescription(0);
+                if (o != null) {
+                    return o.toString();
+                }
+                return null;
+            }
+        }, hyperLinkContextMap.get(link));
+    }
+
+    /*
+     * Returns the hyperlink URL
+     */
+    private String getAccessibleHyperlinkURL(final AccessibleHyperlink link) {
+        debugString("getAccessibleHyperlinkURL");
+        if (link == null) {
+            return null;
+        }
+        return InvocationUtils.invokeAndWait(new Callable<String>() {
+            @Override
+            public String call() throws Exception {
+                Object o = link.getAccessibleActionObject(0);
+                if (o != null) {
+                    return o.toString();
+                } else {
+                    return null;
+                }
+            }
+        }, hyperLinkContextMap.get(link));
+    }
+
+    /*
+     * Returns the start index of the hyperlink text
+     */
+    private int getAccessibleHyperlinkStartIndex(final AccessibleHyperlink link) {
+        debugString("getAccessibleHyperlinkStartIndex");
+        if (link == null) {
+            return -1;
+        }
+        return  InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                return link.getStartIndex();
+            }
+        }, hyperLinkContextMap.get(link));
+    }
+
+    /*
+     * Returns the end index of the hyperlink text
+     */
+    private int getAccessibleHyperlinkEndIndex(final AccessibleHyperlink link) {
+        debugString("getAccessibleHyperlinkEndIndex");
+        if (link == null) {
+            return -1;
+        }
+        return  InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                return link.getEndIndex();
+            }
+        }, hyperLinkContextMap.get(link));
+    }
+
+    /*
+     * Returns the index into an array of hyperlinks that
+     * is associated with this character index, or -1 if there
+     * is no hyperlink associated with this index.
+     */
+    private int getAccessibleHypertextLinkIndex(final AccessibleHypertext hypertext, final int charIndex) {
+        debugString("getAccessibleHypertextLinkIndex: charIndex = "+charIndex);
+        if (hypertext == null) {
+            return -1;
+        }
+        int linkIndex = InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                return hypertext.getLinkIndex(charIndex);
+            }
+        }, hyperTextContextMap.get(hypertext));
+        debugString("getAccessibleHypertextLinkIndex returning "+linkIndex);
+        return linkIndex;
+    }
+
+    /*
+     * Actives the hyperlink
+     */
+    private boolean activateAccessibleHyperlink(final AccessibleContext ac,
+                                                final AccessibleHyperlink link) {
+        //debugString("activateAccessibleHyperlink: link = "+link.getClass());
+        if (link == null) {
+            return false;
+        }
+        boolean retval = InvocationUtils.invokeAndWait(new Callable<Boolean>() {
+            @Override
+            public Boolean call() throws Exception {
+                return link.doAccessibleAction(0);
+            }
+        }, ac);
+        debugString("activateAccessibleHyperlink: returning = "+retval);
+        return retval;
+    }
+
+
+    // ============ AccessibleKeyBinding =============
+
+    /*
+     * returns the component mnemonic
+     */
+    private KeyStroke getMnemonic(final AccessibleContext ac) {
+        if (ac == null)
+            return null;
+        return InvocationUtils.invokeAndWait(new Callable<KeyStroke>() {
+            @Override
+            public KeyStroke call() throws Exception {
+                AccessibleComponent comp = ac.getAccessibleComponent();
+                if (!(comp instanceof AccessibleExtendedComponent)) {
+                    return null;
+                }
+                AccessibleExtendedComponent aec = (AccessibleExtendedComponent) comp;
+                if (aec != null) {
+                    AccessibleKeyBinding akb = aec.getAccessibleKeyBinding();
+                    if (akb != null) {
+                        Object o = akb.getAccessibleKeyBinding(0);
+                        if (o instanceof KeyStroke) {
+                            return (KeyStroke) o;
+                        }
+                    }
+                }
+                return null;
+            }
+        }, ac);
+    }
+
+    /*
+     * returns the JMenuItem accelerator
+     */
+    private KeyStroke getAccelerator(final AccessibleContext ac) {
+        // workaround for getAccessibleKeyBinding not returning the
+        // JMenuItem accelerator
+        if (ac == null)
+            return null;
+        return InvocationUtils.invokeAndWait(new Callable<KeyStroke>() {
+            @Override
+            public KeyStroke call() throws Exception {
+                Accessible parent = ac.getAccessibleParent();
+                if (parent instanceof Accessible) {
+                    int indexInParent = ac.getAccessibleIndexInParent();
+                    Accessible child =
+                            parent.getAccessibleContext().getAccessibleChild(indexInParent);
+                    if (child instanceof JMenuItem) {
+                        JMenuItem menuItem = (JMenuItem) child;
+                        if (menuItem == null)
+                            return null;
+                        KeyStroke keyStroke = menuItem.getAccelerator();
+                        return keyStroke;
+                    }
+                }
+                return null;
+            }
+        }, ac);
+    }
+
+    /*
+     * returns 1-24 to indicate which F key is being used for a shortcut or 0 otherwise
+     */
+    private int fKeyNumber(KeyStroke keyStroke) {
+        if (keyStroke == null)
+            return 0;
+        int fKey = 0;
+        String keyText = KeyEvent.getKeyText(keyStroke.getKeyCode());
+        if (keyText != null && (keyText.length() == 2 || keyText.length() == 3)) {
+            String prefix = keyText.substring(0, 1);
+            if (prefix.equals("F")) {
+                try {
+                    int suffix = Integer.parseInt(keyText.substring(1));
+                    if (suffix >= 1 && suffix <= 24) {
+                        fKey = suffix;
+                    }
+                } catch (Exception e) { // ignore NumberFormatException
+                }
+            }
+        }
+        return fKey;
+    }
+
+    /*
+     * returns one of several important control characters or 0 otherwise
+     */
+    private int controlCode(KeyStroke keyStroke) {
+        if (keyStroke == null)
+            return 0;
+        int code = keyStroke.getKeyCode();
+        switch (code) {
+            case KeyEvent.VK_BACK_SPACE:
+            case KeyEvent.VK_DELETE:
+            case KeyEvent.VK_DOWN:
+            case KeyEvent.VK_END:
+            case KeyEvent.VK_HOME:
+            case KeyEvent.VK_INSERT:
+            case KeyEvent.VK_KP_DOWN:
+            case KeyEvent.VK_KP_LEFT:
+            case KeyEvent.VK_KP_RIGHT:
+            case KeyEvent.VK_KP_UP:
+            case KeyEvent.VK_LEFT:
+            case KeyEvent.VK_PAGE_DOWN:
+            case KeyEvent.VK_PAGE_UP:
+            case KeyEvent.VK_RIGHT:
+            case KeyEvent.VK_UP:
+                break;
+            default:
+                code = 0;
+                break;
+        }
+        return code;
+    }
+
+    /*
+     * returns the KeyStoke character
+     */
+    private char getKeyChar(KeyStroke keyStroke) {
+        // If the shortcut is an FKey return 1-24
+        if (keyStroke == null)
+            return 0;
+        int fKey = fKeyNumber(keyStroke);
+        if (fKey != 0) {
+            // return 0x00000001 through 0x00000018
+            debugString("   Shortcut is: F" + fKey);
+            return (char)fKey;
+        }
+        // If the accelerator is a control character, return it
+        int keyCode = controlCode(keyStroke);
+        if (keyCode != 0) {
+            debugString("   Shortcut is control character: " + Integer.toHexString(keyCode));
+            return (char)keyCode;
+        }
+        String keyText = KeyEvent.getKeyText(keyStroke.getKeyCode());
+        debugString("   Shortcut is: " + keyText);
+        if (keyText != null || keyText.length() > 0) {
+            CharSequence seq = keyText.subSequence(0, 1);
+            if (seq != null || seq.length() > 0) {
+                return seq.charAt(0);
+            }
+        }
+        return 0;
+    }
+
+    /*
+     * returns the KeyStroke modifiers as an int
+     */
+    private int getModifiers(KeyStroke keyStroke) {
+        if (keyStroke == null)
+            return 0;
+        debugString("In AccessBridge.getModifiers");
+        // modifiers is a bit strip where bits 0-7 indicate a traditional modifier
+        // such as Ctrl/Alt/Shift, bit 8 indicates an F key shortcut, and bit 9 indicates
+        // a control code shortcut such as the delete key.
+
+        int modifiers = 0;
+        // Is the shortcut an FKey?
+        if (fKeyNumber(keyStroke) != 0) {
+            modifiers |= 1 << 8;
+        }
+        // Is the shortcut a control code?
+        if (controlCode(keyStroke) != 0) {
+            modifiers |= 1 << 9;
+        }
+        // The following is needed in order to handle translated modifiers.
+        // getKeyModifiersText doesn't work because for example in German Strg is
+        // returned for Ctrl.
+
+        // There can be more than one modifier, e.g. if the modifier is ctrl + shift + B
+        // the toString text is "shift ctrl pressed B". Need to parse through that.
+        StringTokenizer st = new StringTokenizer(keyStroke.toString());
+        while (st.hasMoreTokens()) {
+            String text = st.nextToken();
+            // Meta+Ctrl+Alt+Shift
+            // 0-3 are shift, ctrl, meta, alt
+            // 4-7 are for Solaris workstations (though not being used)
+            if (text.startsWith("met")) {
+                debugString("   found meta");
+                modifiers |= ActionEvent.META_MASK;
+            }
+            if (text.startsWith("ctr")) {
+                debugString("   found ctrl");
+                modifiers |= ActionEvent.CTRL_MASK;
+            }
+            if (text.startsWith("alt")) {
+                debugString("   found alt");
+                modifiers |= ActionEvent.ALT_MASK;
+            }
+            if (text.startsWith("shi")) {
+                debugString("   found shift");
+                modifiers |= ActionEvent.SHIFT_MASK;
+            }
+        }
+        debugString("   returning modifiers: 0x" + Integer.toHexString(modifiers));
+        return modifiers;
+    }
+
+    /*
+     * returns the number of key bindings associated with this context
+     */
+    private int getAccessibleKeyBindingsCount(AccessibleContext ac) {
+        if (ac == null)
+            return 0;
+        int count = 0;
+
+        if (getMnemonic(ac) != null) {
+            count++;
+        }
+        if (getAccelerator(ac) != null) {
+            count++;
+        }
+        return count;
+    }
+
+    /*
+     * returns the key binding character at the specified index
+     */
+    private char getAccessibleKeyBindingChar(AccessibleContext ac, int index) {
+        if (ac == null)
+            return 0;
+        if((index == 0) && getMnemonic(ac)==null) {// special case when there is no mnemonic
+            KeyStroke keyStroke = getAccelerator(ac);
+            if (keyStroke != null) {
+                return getKeyChar(keyStroke);
+            }
+        }
+        if (index == 0) {   // mnemonic
+            KeyStroke keyStroke = getMnemonic(ac);
+            if (keyStroke != null) {
+                return getKeyChar(keyStroke);
+            }
+        } else if (index == 1) { // accelerator
+            KeyStroke keyStroke = getAccelerator(ac);
+            if (keyStroke != null) {
+                return getKeyChar(keyStroke);
+            }
+        }
+        return 0;
+    }
+
+    /*
+     * returns the key binding modifiers at the specified index
+     */
+    private int getAccessibleKeyBindingModifiers(AccessibleContext ac, int index) {
+        if (ac == null)
+            return 0;
+        if((index == 0) && getMnemonic(ac)==null) {// special case when there is no mnemonic
+            KeyStroke keyStroke = getAccelerator(ac);
+            if (keyStroke != null) {
+                return getModifiers(keyStroke);
+            }
+        }
+        if (index == 0) {   // mnemonic
+            KeyStroke keyStroke = getMnemonic(ac);
+            if (keyStroke != null) {
+                return getModifiers(keyStroke);
+            }
+        } else if (index == 1) { // accelerator
+            KeyStroke keyStroke = getAccelerator(ac);
+            if (keyStroke != null) {
+                return getModifiers(keyStroke);
+            }
+        }
+        return 0;
+    }
+
+    // ========== AccessibleIcon ============
+
+    /*
+     * return the number of icons associated with this context
+     */
+    private int getAccessibleIconsCount(final AccessibleContext ac) {
+        debugString("getAccessibleIconsCount");
+        if (ac == null) {
+            return 0;
+        }
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                AccessibleIcon[] ai = ac.getAccessibleIcon();
+                if (ai == null) {
+                    return 0;
+                }
+                return ai.length;
+            }
+        }, ac);
+    }
+
+    /*
+     * return icon description at the specified index
+     */
+    private String getAccessibleIconDescription(final AccessibleContext ac, final int index) {
+        debugString("getAccessibleIconDescription: index = "+index);
+        if (ac == null) {
+            return null;
+        }
+        return InvocationUtils.invokeAndWait(new Callable<String>() {
+            @Override
+            public String call() throws Exception {
+                AccessibleIcon[] ai = ac.getAccessibleIcon();
+                if (ai == null || index < 0 || index >= ai.length) {
+                    return null;
+                }
+                return ai[index].getAccessibleIconDescription();
+            }
+        }, ac);
+    }
+
+    /*
+     * return icon height at the specified index
+     */
+    private int getAccessibleIconHeight(final AccessibleContext ac, final int index) {
+        debugString("getAccessibleIconHeight: index = "+index);
+        if (ac == null) {
+            return 0;
+        }
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                AccessibleIcon[] ai = ac.getAccessibleIcon();
+                if (ai == null || index < 0 || index >= ai.length) {
+                    return 0;
+                }
+                return ai[index].getAccessibleIconHeight();
+            }
+        }, ac);
+    }
+
+    /*
+     * return icon width at the specified index
+     */
+    private int getAccessibleIconWidth(final AccessibleContext ac, final int index) {
+        debugString("getAccessibleIconWidth: index = "+index);
+        if (ac == null) {
+            return 0;
+        }
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                AccessibleIcon[] ai = ac.getAccessibleIcon();
+                if (ai == null || index < 0 || index >= ai.length) {
+                    return 0;
+                }
+                return ai[index].getAccessibleIconWidth();
+            }
+        }, ac);
+    }
+
+    // ========= AccessibleAction ===========
+
+    /*
+     * return the number of icons associated with this context
+     */
+    private int getAccessibleActionsCount(final AccessibleContext ac) {
+        debugString("getAccessibleActionsCount");
+        if (ac == null) {
+            return 0;
+        }
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                AccessibleAction aa = ac.getAccessibleAction();
+                if (aa == null)
+                    return 0;
+                return aa.getAccessibleActionCount();
+            }
+        }, ac);
+    }
+
+    /*
+     * return icon description at the specified index
+     */
+    private String getAccessibleActionName(final AccessibleContext ac, final int index) {
+        debugString("getAccessibleActionName: index = "+index);
+        if (ac == null) {
+            return null;
+        }
+        return InvocationUtils.invokeAndWait(new Callable<String>() {
+            @Override
+            public String call() throws Exception {
+                AccessibleAction aa = ac.getAccessibleAction();
+                if (aa == null) {
+                    return null;
+                }
+                return aa.getAccessibleActionDescription(index);
+            }
+        }, ac);
+    }
+    /*
+     * return icon description at the specified index
+     */
+    private boolean doAccessibleActions(final AccessibleContext ac, final String name) {
+        debugString("doAccessibleActions: action name = "+name);
+        if (ac == null || name == null) {
+            return false;
+        }
+        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
+            @Override
+            public Boolean call() throws Exception {
+                AccessibleAction aa = ac.getAccessibleAction();
+                if (aa == null) {
+                    return false;
+                }
+                int index = -1;
+                int numActions = aa.getAccessibleActionCount();
+                for (int i = 0; i < numActions; i++) {
+                    String actionName = aa.getAccessibleActionDescription(i);
+                    if (name.equals(actionName)) {
+                        index = i;
+                        break;
+                    }
+                }
+                if (index == -1) {
+                    return false;
+                }
+                boolean retval = aa.doAccessibleAction(index);
+                return retval;
+            }
+        }, ac);
+    }
+
+    /* ===== AT utility methods ===== */
+
+    /**
+     * Sets the contents of an AccessibleContext that
+     * implements AccessibleEditableText with the
+     * specified text string.
+     * Returns whether successful.
+     */
+    private boolean setTextContents(final AccessibleContext ac, final String text) {
+        debugString("setTextContents: ac = "+ac+"; text = "+text);
+
+        if (! (ac instanceof AccessibleEditableText)) {
+            debugString("   ac not instanceof AccessibleEditableText: "+ac);
+            return false;
+        }
+        if (text == null) {
+            debugString("   text is null");
+            return false;
+        }
+
+        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
+            @Override
+            public Boolean call() throws Exception {
+                // check whether the text field is editable
+                AccessibleStateSet ass = ac.getAccessibleStateSet();
+                if (!ass.contains(AccessibleState.ENABLED)) {
+                    return false;
+                }
+                ((AccessibleEditableText) ac).setTextContents(text);
+                return true;
+            }
+        }, ac);
+    }
+
+    /**
+     * Returns the Accessible Context of an Internal Frame object that is
+     * the ancestor of a given object.  If the object is an Internal Frame
+     * object or an Internal Frame ancestor object was found, returns the
+     * object's AccessibleContext.
+     * If there is no ancestor object that has an Accessible Role of
+     * Internal Frame, returns (AccessibleContext)0.
+     */
+    private AccessibleContext getInternalFrame (AccessibleContext ac) {
+        return getParentWithRole(ac, AccessibleRole.INTERNAL_FRAME.toString());
+    }
+
+    /**
+     * Returns the Accessible Context for the top level object in
+     * a Java Window.  This is same Accessible Context that is obtained
+     * from GetAccessibleContextFromHWND for that window.  Returns
+     * (AccessibleContext)0 on error.
+     */
+    private AccessibleContext getTopLevelObject (final AccessibleContext ac) {
+        debugString("getTopLevelObject; ac = "+ac);
+        if (ac == null) {
+            return null;
+        }
+        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+            @Override
+            public AccessibleContext call() throws Exception {
+                if (ac.getAccessibleRole() == AccessibleRole.DIALOG) {
+                    // return the dialog, not the parent window
+                    return ac;
+                }
+
+                Accessible parent = ac.getAccessibleParent();
+                if (parent == null) {
+                    return ac;
+                }
+                Accessible tmp = parent;
+                while (tmp != null && tmp.getAccessibleContext() != null) {
+                    AccessibleContext ac2 = tmp.getAccessibleContext();
+                    if (ac2 != null && ac2.getAccessibleRole() == AccessibleRole.DIALOG) {
+                        // return the dialog, not the parent window
+                        return ac2;
+                    }
+                    parent = tmp;
+                    tmp = parent.getAccessibleContext().getAccessibleParent();
+                }
+                return parent.getAccessibleContext();
+            }
+        }, ac);
+    }
+
+    /**
+     * Returns the parent AccessibleContext that has the specified AccessibleRole.
+     * Returns null on error or if the AccessibleContext does not exist.
+     */
+    private AccessibleContext getParentWithRole (final AccessibleContext ac,
+                                                 final String roleName) {
+        debugString("getParentWithRole; ac = "+ac);
+        debugString("role = "+roleName);
+        if (ac == null || roleName == null) {
+            return null;
+        }
+
+        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+            @Override
+            public AccessibleContext call() throws Exception {
+                AccessibleRole role = AccessBridge.this.accessibleRoleMap.get(roleName);
+                if (role == null) {
+                    return ac;
+                }
+
+                Accessible parent = ac.getAccessibleParent();
+                if (parent == null && ac.getAccessibleRole() == role) {
+                    return ac;
+                }
+
+                Accessible tmp = parent;
+                AccessibleContext tmp_ac = null;
+
+                while (tmp != null && (tmp_ac = tmp.getAccessibleContext()) != null) {
+                    AccessibleRole ar = tmp_ac.getAccessibleRole();
+                    if (ar == role) {
+                        // found
+                        return tmp_ac;
+                    }
+                    parent = tmp;
+                    tmp = parent.getAccessibleContext().getAccessibleParent();
+                }
+                // not found
+                return null;
+            }
+        }, ac);
+    }
+
+    /**
+     * Returns the parent AccessibleContext that has the specified AccessibleRole.
+     * Otherwise, returns the top level object for the Java Window.
+     * Returns (AccessibleContext)0 on error.
+     */
+    private AccessibleContext getParentWithRoleElseRoot (AccessibleContext ac,
+                                                         String roleName) {
+        AccessibleContext retval = getParentWithRole(ac, roleName);
+        if (retval == null) {
+            retval = getTopLevelObject(ac);
+        }
+        return retval;
+    }
+
+    /**
+     * Returns how deep in the object hierarchy a given object is.
+     * The top most object in the object hierarchy has an object depth of 0.
+     * Returns -1 on error.
+     */
+    private int getObjectDepth(final AccessibleContext ac) {
+        debugString("getObjectDepth: ac = "+ac);
+
+        if (ac == null) {
+            return -1;
+        }
+        return InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                int count = 0;
+                Accessible parent = ac.getAccessibleParent();
+                if (parent == null) {
+                    return count;
+                }
+                Accessible tmp = parent;
+                while (tmp != null && tmp.getAccessibleContext() != null) {
+                    parent = tmp;
+                    tmp = parent.getAccessibleContext().getAccessibleParent();
+                    count++;
+                }
+                return count;
+            }
+        }, ac);
+    }
+
+    /**
+     * Returns the Accessible Context of the current ActiveDescendent of an object.
+     * Returns (AccessibleContext)0 on error.
+     */
+    private AccessibleContext getActiveDescendent (final AccessibleContext ac) {
+        debugString("getActiveDescendent: ac = "+ac);
+        if (ac == null) {
+            return null;
+        }
+        // workaround for JTree bug where the only possible active
+        // descendent is the JTree root
+        final Accessible parent = InvocationUtils.invokeAndWait(new Callable<Accessible>() {
+            @Override
+            public Accessible call() throws Exception {
+                return ac.getAccessibleParent();
+            }
+        }, ac);
+
+        if (parent != null) {
+            Accessible child = InvocationUtils.invokeAndWait(new Callable<Accessible>() {
+                @Override
+                public Accessible call() throws Exception {
+                    int indexInParent = ac.getAccessibleIndexInParent();
+                    return parent.getAccessibleContext().getAccessibleChild(indexInParent);
+                }
+            }, ac);
+
+            if (child instanceof JTree) {
+                // return the selected node
+                final JTree tree = (JTree)child;
+                return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+                    @Override
+                    public AccessibleContext call() throws Exception {
+                        return new AccessibleJTreeNode(tree,
+                                tree.getSelectionPath(),
+                                null);
+                    }
+                }, child);
+            }
+        }
+
+        return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+            @Override
+            public AccessibleContext call() throws Exception {
+                AccessibleSelection as = ac.getAccessibleSelection();
+                if (as == null) {
+                    return null;
+                }
+                // assume single selection
+                if (as.getAccessibleSelectionCount() != 1) {
+                    return null;
+                }
+                Accessible a = as.getAccessibleSelection(0);
+                if (a == null) {
+                    return null;
+                }
+                return a.getAccessibleContext();
+            }
+        }, ac);
+    }
+
+
+    /**
+     * Additional methods for Teton
+     */
+
+    /**
+     * Gets the AccessibleName for a component based upon the JAWS algorithm.
+     * Returns whether successful.
+     *
+     * Bug ID 4916682 - Implement JAWS AccessibleName policy
+     */
+    private String getJAWSAccessibleName(final AccessibleContext ac) {
+        debugString("getJAWSAccessibleName");
+        if (ac == null) {
+            return null;
+        }
+        // placeholder
+        return InvocationUtils.invokeAndWait(new Callable<String>() {
+            @Override
+            public String call() throws Exception {
+                return ac.getAccessibleName();
+            }
+        }, ac);
+    }
+
+    /**
+     * Request focus for a component. Returns whether successful;
+     *
+     * Bug ID 4944757 - requestFocus method needed
+     */
+    private boolean requestFocus(final AccessibleContext ac) {
+        debugString("requestFocus");
+        if (ac == null) {
+            return false;
+        }
+        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
+            @Override
+            public Boolean call() throws Exception {
+                AccessibleComponent acomp = ac.getAccessibleComponent();
+                if (acomp == null) {
+                    return false;
+                }
+                acomp.requestFocus();
+                return ac.getAccessibleStateSet().contains(AccessibleState.FOCUSED);
+            }
+        }, ac);
+    }
+
+    /**
+     * Selects text between two indices.  Selection includes the
+     * text at the start index and the text at the end index. Returns
+     * whether successful;
+     *
+     * Bug ID 4944758 - selectTextRange method needed
+     */
+    private boolean selectTextRange(final AccessibleContext ac, final int startIndex, final int endIndex) {
+        debugString("selectTextRange: start = "+startIndex+"; end = "+endIndex);
+        if (ac == null) {
+            return false;
+        }
+        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
+            @Override
+            public Boolean call() throws Exception {
+                AccessibleText at = ac.getAccessibleText();
+                if (!(at instanceof AccessibleEditableText)) {
+                    return false;
+                }
+                ((AccessibleEditableText) at).selectText(startIndex, endIndex);
+
+                boolean result = at.getSelectionStart() == startIndex &&
+                        at.getSelectionEnd() == endIndex;
+                return result;
+            }
+        }, ac);
+    }
+
+    /**
+     * Set the caret to a text position. Returns whether successful;
+     *
+     * Bug ID 4944770 - setCaretPosition method needed
+     */
+    private boolean setCaretPosition(final AccessibleContext ac, final int position) {
+        debugString("setCaretPosition: position = "+position);
+        if (ac == null) {
+            return false;
+        }
+        return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
+            @Override
+            public Boolean call() throws Exception {
+                AccessibleText at = ac.getAccessibleText();
+                if (!(at instanceof AccessibleEditableText)) {
+                    return false;
+                }
+                ((AccessibleEditableText) at).selectText(position, position);
+                return at.getCaretPosition() == position;
+            }
+        }, ac);
+    }
+
+    /**
+     * Gets the number of visible children of an AccessibleContext.
+     *
+     * Bug ID 4944762- getVisibleChildren for list-like components needed
+     */
+    private int _visibleChildrenCount;
+    private AccessibleContext _visibleChild;
+    private int _currentVisibleIndex;
+    private boolean _foundVisibleChild;
+
+    private int getVisibleChildrenCount(AccessibleContext ac) {
+        debugString("getVisibleChildrenCount");
+        if (ac == null) {
+            return -1;
+        }
+        _visibleChildrenCount = 0;
+        _getVisibleChildrenCount(ac);
+        debugString("  _visibleChildrenCount = "+_visibleChildrenCount);
+        return _visibleChildrenCount;
+    }
+
+    /*
+     * Recursively descends AccessibleContext and gets the number
+     * of visible children
+     */
+    private void _getVisibleChildrenCount(final AccessibleContext ac) {
+        if (ac == null)
+            return;
+        int numChildren = InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                return ac.getAccessibleChildrenCount();
+            }
+        }, ac);
+        for (int i = 0; i < numChildren; i++) {
+            final int idx = i;
+            final AccessibleContext ac2 = InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+                @Override
+                public AccessibleContext call() throws Exception {
+                    Accessible a = ac.getAccessibleChild(idx);
+                    if (a != null)
+                        return a.getAccessibleContext();
+                    else
+                        return null;
+                }
+            }, ac);
+            if ( ac2 == null ||
+                 (!InvocationUtils.invokeAndWait(new Callable<Boolean>() {
+                     @Override
+                     public Boolean call() throws Exception {
+                         return ac2.getAccessibleStateSet().contains(AccessibleState.SHOWING);
+                     }
+                 }, ac))
+               ) {
+                continue;
+            }
+            _visibleChildrenCount++;
+
+            if (InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                @Override
+                public Integer call() throws Exception {
+                    return ac2.getAccessibleChildrenCount();
+                }
+            }, ac) > 0 ) {
+                _getVisibleChildrenCount(ac2);
+            }
+        }
+    }
+
+    /**
+     * Gets the visible child of an AccessibleContext at the
+     * specified index
+     *
+     * Bug ID 4944762- getVisibleChildren for list-like components needed
+     */
+    private AccessibleContext getVisibleChild(AccessibleContext ac, int index) {
+        debugString("getVisibleChild: index = "+index);
+        if (ac == null) {
+            return null;
+        }
+        _visibleChild = null;
+        _currentVisibleIndex = 0;
+        _foundVisibleChild = false;
+        _getVisibleChild(ac, index);
+
+        if (_visibleChild != null) {
+            debugString( "    getVisibleChild: found child = " +
+                         InvocationUtils.invokeAndWait(new Callable<String>() {
+                             @Override
+                             public String call() throws Exception {
+                                 return AccessBridge.this._visibleChild.getAccessibleName();
+                             }
+                         }, ac) );
+        }
+        return _visibleChild;
+    }
+
+    /*
+     * Recursively searchs AccessibleContext and finds the visible component
+     * at the specified index
+     */
+    private void _getVisibleChild(final AccessibleContext ac, final int index) {
+        if (_visibleChild != null) {
+            return;
+        }
+
+        int numChildren = InvocationUtils.invokeAndWait(new Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                return ac.getAccessibleChildrenCount();
+            }
+        }, ac);
+        for (int i = 0; i < numChildren; i++) {
+            final int idx=i;
+            final AccessibleContext ac2=InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
+                @Override
+                public AccessibleContext call() throws Exception {
+                    Accessible a = ac.getAccessibleChild(idx);
+                    if (a == null)
+                        return null;
+                    else
+                        return a.getAccessibleContext();
+                }
+            }, ac);
+            if (ac2 == null ||
+            (!InvocationUtils.invokeAndWait(new Callable<Boolean>() {
+                @Override
+                public Boolean call() throws Exception {
+                    return ac2.getAccessibleStateSet().contains(AccessibleState.SHOWING);
+                }
+            }, ac))) {
+                continue;
+            }
+            if (!_foundVisibleChild && _currentVisibleIndex == index) {
+            _visibleChild = ac2;
+            _foundVisibleChild = true;
+            return;
+            }
+            _currentVisibleIndex++;
+
+            if ( InvocationUtils.invokeAndWait(new Callable<Integer>() {
+                @Override
+                public Integer call() throws Exception {
+                    return ac2.getAccessibleChildrenCount();
+                }
+            }, ac) > 0 ) {
+                _getVisibleChild(ac2, index);
+            }
+        }
+    }
+
+
+    /* ===== Java object memory management code ===== */
+
+    /**
+     * Class to track object references to ensure the
+     * Java VM doesn't garbage collect them
+     */
+    private class ObjectReferences {
+
+        private class Reference {
+            private int value;
+
+            Reference(int i) {
+                value = i;
+            }
+
+            public String toString() {
+                return ("refCount: " + value);
+            }
+        }
+
+        /**
+        * table object references, to keep 'em from being garbage collected
+        */
+        private ConcurrentHashMap<Object,Reference> refs;
+
+        /**
+        * Constructor
+        */
+        ObjectReferences() {
+            refs = new ConcurrentHashMap<>(4);
+        }
+
+        /**
+        * Debugging: dump the contents of ObjectReferences' refs Hashtable
+        */
+        String dump() {
+            return refs.toString();
+        }
+
+        /**
+        * Increment ref count; set to 1 if we have no references for it
+        */
+        void increment(Object o) {
+            if (o == null){
+                debugString("ObjectReferences::increment - Passed in object is null");
+                return;
+            }
+
+            if (refs.containsKey(o)) {
+                (refs.get(o)).value++;
+            } else {
+                refs.put(o, new Reference(1));
+            }
+        }
+
+        /**
+        * Decrement ref count; remove if count drops to 0
+        */
+        void decrement(Object o) {
+            Reference aRef = refs.get(o);
+            if (aRef != null) {
+                aRef.value--;
+                if (aRef.value == 0) {
+                    refs.remove(o);
+                } else if (aRef.value < 0) {
+                    debugString("ERROR: decrementing reference count below 0");
+                }
+            } else {
+                debugString("ERROR: object to decrement not in ObjectReferences table");
+            }
+        }
+
+    }
+
+    /* ===== event handling code ===== */
+
+   /**
+     * native method for handling property change events
+     */
+    private native void propertyCaretChange(PropertyChangeEvent e,
+                        AccessibleContext src,
+                        int oldValue, int newValue);
+    private native void propertyDescriptionChange(PropertyChangeEvent e,
+                        AccessibleContext src,
+                        String oldValue, String newValue);
+    private native void propertyNameChange(PropertyChangeEvent e,
+                        AccessibleContext src,
+                        String oldValue, String newValue);
+    private native void propertySelectionChange(PropertyChangeEvent e,
+                        AccessibleContext src);
+    private native void propertyStateChange(PropertyChangeEvent e,
+                        AccessibleContext src,
+                        String oldValue, String newValue);
+    private native void propertyTextChange(PropertyChangeEvent e,
+                        AccessibleContext src);
+    private native void propertyValueChange(PropertyChangeEvent e,
+                        AccessibleContext src,
+                        String oldValue, String newValue);
+    private native void propertyVisibleDataChange(PropertyChangeEvent e,
+                        AccessibleContext src);
+    private native void propertyChildChange(PropertyChangeEvent e,
+                        AccessibleContext src,
+                        AccessibleContext oldValue,
+                        AccessibleContext newValue);
+    private native void propertyActiveDescendentChange(PropertyChangeEvent e,
+                        AccessibleContext src,
+                        AccessibleContext oldValue,
+                        AccessibleContext newValue);
+
+    private native void javaShutdown();
+
+    /**
+     * native methods for handling focus events
+     */
+    private native void focusGained(FocusEvent e, AccessibleContext src);
+    private native void focusLost(FocusEvent e, AccessibleContext src);
+
+    /**
+     * native method for handling caret events
+     */
+    private native void caretUpdate(CaretEvent e, AccessibleContext src);
+
+    /**
+     * native methods for handling mouse events
+     */
+    private native void mouseClicked(MouseEvent e, AccessibleContext src);
+    private native void mouseEntered(MouseEvent e, AccessibleContext src);
+    private native void mouseExited(MouseEvent e, AccessibleContext src);
+    private native void mousePressed(MouseEvent e, AccessibleContext src);
+    private native void mouseReleased(MouseEvent e, AccessibleContext src);
+
+    /**
+     * native methods for handling menu & popupMenu events
+     */
+    private native void menuCanceled(MenuEvent e, AccessibleContext src);
+    private native void menuDeselected(MenuEvent e, AccessibleContext src);
+    private native void menuSelected(MenuEvent e, AccessibleContext src);
+    private native void popupMenuCanceled(PopupMenuEvent e, AccessibleContext src);
+    private native void popupMenuWillBecomeInvisible(PopupMenuEvent e,
+                                                     AccessibleContext src);
+    private native void popupMenuWillBecomeVisible(PopupMenuEvent e,
+                                                   AccessibleContext src);
+
+    /* ===== event definitions ===== */
+
+    private static final long PROPERTY_CHANGE_EVENTS = 1;
+    private static final long FOCUS_GAINED_EVENTS = 2;
+    private static final long FOCUS_LOST_EVENTS = 4;
+    private static final long FOCUS_EVENTS = (FOCUS_GAINED_EVENTS | FOCUS_LOST_EVENTS);
+
+    private static final long CARET_UPATE_EVENTS = 8;
+    private static final long CARET_EVENTS = CARET_UPATE_EVENTS;
+
+    private static final long MOUSE_CLICKED_EVENTS = 16;
+    private static final long MOUSE_ENTERED_EVENTS = 32;
+    private static final long MOUSE_EXITED_EVENTS = 64;
+    private static final long MOUSE_PRESSED_EVENTS = 128;
+    private static final long MOUSE_RELEASED_EVENTS = 256;
+    private static final long MOUSE_EVENTS = (MOUSE_CLICKED_EVENTS | MOUSE_ENTERED_EVENTS |
+                                             MOUSE_EXITED_EVENTS | MOUSE_PRESSED_EVENTS |
+                                             MOUSE_RELEASED_EVENTS);
+
+    private static final long MENU_CANCELED_EVENTS = 512;
+    private static final long MENU_DESELECTED_EVENTS = 1024;
+    private static final long MENU_SELECTED_EVENTS = 2048;
+    private static final long MENU_EVENTS = (MENU_CANCELED_EVENTS | MENU_DESELECTED_EVENTS |
+                                            MENU_SELECTED_EVENTS);
+
+    private static final long POPUPMENU_CANCELED_EVENTS = 4096;
+    private static final long POPUPMENU_WILL_BECOME_INVISIBLE_EVENTS = 8192;
+    private static final long POPUPMENU_WILL_BECOME_VISIBLE_EVENTS = 16384;
+    private static final long POPUPMENU_EVENTS = (POPUPMENU_CANCELED_EVENTS |
+                                                 POPUPMENU_WILL_BECOME_INVISIBLE_EVENTS |
+                                                 POPUPMENU_WILL_BECOME_VISIBLE_EVENTS);
+
+    /* These use their own numbering scheme, to ensure sufficient expansion room */
+    private static final long PROPERTY_NAME_CHANGE_EVENTS = 1;
+    private static final long PROPERTY_DESCRIPTION_CHANGE_EVENTS = 2;
+    private static final long PROPERTY_STATE_CHANGE_EVENTS = 4;
+    private static final long PROPERTY_VALUE_CHANGE_EVENTS = 8;
+    private static final long PROPERTY_SELECTION_CHANGE_EVENTS = 16;
+    private static final long PROPERTY_TEXT_CHANGE_EVENTS = 32;
+    private static final long PROPERTY_CARET_CHANGE_EVENTS = 64;
+    private static final long PROPERTY_VISIBLEDATA_CHANGE_EVENTS = 128;
+    private static final long PROPERTY_CHILD_CHANGE_EVENTS = 256;
+    private static final long PROPERTY_ACTIVEDESCENDENT_CHANGE_EVENTS = 512;
+
+
+    private static final long PROPERTY_EVENTS = (PROPERTY_NAME_CHANGE_EVENTS |
+                                                PROPERTY_DESCRIPTION_CHANGE_EVENTS |
+                                                PROPERTY_STATE_CHANGE_EVENTS |
+                                                PROPERTY_VALUE_CHANGE_EVENTS |
+                                                PROPERTY_SELECTION_CHANGE_EVENTS |
+                                                PROPERTY_TEXT_CHANGE_EVENTS |
+                                                PROPERTY_CARET_CHANGE_EVENTS |
+                                                PROPERTY_VISIBLEDATA_CHANGE_EVENTS |
+                                                PROPERTY_CHILD_CHANGE_EVENTS |
+                                                PROPERTY_ACTIVEDESCENDENT_CHANGE_EVENTS);
+
+    /**
+     * The EventHandler class listens for Java events and
+     * forwards them to the AT
+     */
+    private class EventHandler implements PropertyChangeListener,
+                                          FocusListener, CaretListener,
+                                          MenuListener, PopupMenuListener,
+                                          MouseListener, WindowListener,
+                                          ChangeListener {
+
+        private AccessBridge accessBridge;
+        private long javaEventMask = 0;
+        private long accessibilityEventMask = 0;
+
+        EventHandler(AccessBridge bridge) {
+            accessBridge = bridge;
+
+            // Register to receive WINDOW_OPENED and WINDOW_CLOSED
+            // events.  Add the event source as a native window
+            // handler is it implements NativeWindowHandler.
+            // SwingEventMonitor.addWindowListener(this);
+        }
+
+        // --------- Event Notification Registration methods
+
+        /**
+         * Invoked the first time a window is made visible.
+         */
+        public void windowOpened(WindowEvent e) {
+            // If the window is a NativeWindowHandler, add it.
+            Object o = null;
+            if (e != null)
+                o = e.getSource();
+            if (o instanceof NativeWindowHandler) {
+                addNativeWindowHandler((NativeWindowHandler)o);
+            }
+        }
+
+        /**
+         * Invoked when the user attempts to close the window
+         * from the window's system menu.  If the program does not
+         * explicitly hide or dispose the window while processing
+         * this event, the window close operation will be canceled.
+         */
+        public void windowClosing(WindowEvent e) {}
+
+        /**
+         * Invoked when a window has been closed as the result
+         * of calling dispose on the window.
+         */
+        public void windowClosed(WindowEvent e) {
+            // If the window is a NativeWindowHandler, remove it.
+            Object o = null;
+            if (e != null)
+                o = e.getSource();
+            if (o instanceof NativeWindowHandler) {
+                removeNativeWindowHandler((NativeWindowHandler)o);
+            }
+        }
+
+        /**
+         * Invoked when a window is changed from a normal to a
+         * minimized state. For many platforms, a minimized window
+         * is displayed as the icon specified in the window's
+         * iconImage property.
+         * @see java.awt.Frame#setIconImage
+         */
+        public void windowIconified(WindowEvent e) {}
+
+        /**
+         * Invoked when a window is changed from a minimized
+         * to a normal state.
+         */
+        public void windowDeiconified(WindowEvent e) {}
+
+        /**
+         * Invoked when the Window is set to be the active Window. Only a Frame or
+         * a Dialog can be the active Window. The native windowing system may
+         * denote the active Window or its children with special decorations, such
+         * as a highlighted title bar. The active Window is always either the
+         * focused Window, or the first Frame or Dialog that is an owner of the
+         * focused Window.
+         */
+        public void windowActivated(WindowEvent e) {}
+
+        /**
+         * Invoked when a Window is no longer the active Window. Only a Frame or a
+         * Dialog can be the active Window. The native windowing system may denote
+         * the active Window or its children with special decorations, such as a
+         * highlighted title bar. The active Window is always either the focused
+         * Window, or the first Frame or Dialog that is an owner of the focused
+         * Window.
+         */
+        public void windowDeactivated(WindowEvent e) {}
+
+        /**
+         * Turn on event monitoring for the event type passed in
+         * If necessary, add the appropriate event listener (if
+         * no other event of that type is being listened for)
+         */
+        void addJavaEventNotification(long type) {
+            long newEventMask = javaEventMask | type;
+            /*
+            if ( ((javaEventMask & PROPERTY_EVENTS) == 0) &&
+                 ((newEventMask & PROPERTY_EVENTS) != 0) ) {
+                AccessibilityEventMonitor.addPropertyChangeListener(this);
+            }
+            */
+            if ( ((javaEventMask & FOCUS_EVENTS) == 0) &&
+                ((newEventMask & FOCUS_EVENTS) != 0) ) {
+                SwingEventMonitor.addFocusListener(this);
+            }
+            if ( ((javaEventMask & CARET_EVENTS) == 0) &&
+                ((newEventMask & CARET_EVENTS) != 0) ) {
+                SwingEventMonitor.addCaretListener(this);
+            }
+            if ( ((javaEventMask & MOUSE_EVENTS) == 0) &&
+                ((newEventMask & MOUSE_EVENTS) != 0) ) {
+                SwingEventMonitor.addMouseListener(this);
+            }
+            if ( ((javaEventMask & MENU_EVENTS) == 0) &&
+                ((newEventMask & MENU_EVENTS) != 0) ) {
+                SwingEventMonitor.addMenuListener(this);
+                SwingEventMonitor.addPopupMenuListener(this);
+            }
+            if ( ((javaEventMask & POPUPMENU_EVENTS) == 0) &&
+                ((newEventMask & POPUPMENU_EVENTS) != 0) ) {
+                SwingEventMonitor.addPopupMenuListener(this);
+            }
+
+            javaEventMask = newEventMask;
+        }
+
+        /**
+         * Turn off event monitoring for the event type passed in
+         * If necessary, remove the appropriate event listener (if
+         * no other event of that type is being listened for)
+         */
+        void removeJavaEventNotification(long type) {
+            long newEventMask = javaEventMask & (~type);
+            /*
+            if ( ((javaEventMask & PROPERTY_EVENTS) != 0) &&
+                 ((newEventMask & PROPERTY_EVENTS) == 0) ) {
+                AccessibilityEventMonitor.removePropertyChangeListener(this);
+            }
+            */
+            if (((javaEventMask & FOCUS_EVENTS) != 0) &&
+                ((newEventMask & FOCUS_EVENTS) == 0)) {
+                SwingEventMonitor.removeFocusListener(this);
+            }
+            if (((javaEventMask & CARET_EVENTS) != 0) &&
+                ((newEventMask & CARET_EVENTS) == 0)) {
+                SwingEventMonitor.removeCaretListener(this);
+            }
+            if (((javaEventMask & MOUSE_EVENTS) == 0) &&
+                ((newEventMask & MOUSE_EVENTS) != 0)) {
+                SwingEventMonitor.removeMouseListener(this);
+            }
+            if (((javaEventMask & MENU_EVENTS) == 0) &&
+                ((newEventMask & MENU_EVENTS) != 0)) {
+                SwingEventMonitor.removeMenuListener(this);
+            }
+            if (((javaEventMask & POPUPMENU_EVENTS) == 0) &&
+                ((newEventMask & POPUPMENU_EVENTS) != 0)) {
+                SwingEventMonitor.removePopupMenuListener(this);
+            }
+
+            javaEventMask = newEventMask;
+        }
+
+        /**
+         * Turn on event monitoring for the event type passed in
+         * If necessary, add the appropriate event listener (if
+         * no other event of that type is being listened for)
+         */
+        void addAccessibilityEventNotification(long type) {
+            long newEventMask = accessibilityEventMask | type;
+            if ( ((accessibilityEventMask & PROPERTY_EVENTS) == 0) &&
+                 ((newEventMask & PROPERTY_EVENTS) != 0) ) {
+                AccessibilityEventMonitor.addPropertyChangeListener(this);
+            }
+            accessibilityEventMask = newEventMask;
+        }
+
+        /**
+         * Turn off event monitoring for the event type passed in
+         * If necessary, remove the appropriate event listener (if
+         * no other event of that type is being listened for)
+         */
+        void removeAccessibilityEventNotification(long type) {
+            long newEventMask = accessibilityEventMask & (~type);
+            if ( ((accessibilityEventMask & PROPERTY_EVENTS) != 0) &&
+                 ((newEventMask & PROPERTY_EVENTS) == 0) ) {
+                AccessibilityEventMonitor.removePropertyChangeListener(this);
+            }
+            accessibilityEventMask = newEventMask;
+        }
+
+        /**
+         *  ------- property change event glue
+         */
+        // This is invoked on the EDT , as
+        public void propertyChange(PropertyChangeEvent e) {
+
+            accessBridge.debugString("propertyChange(" + e.toString() + ") called");
+
+            if (e != null && (accessibilityEventMask & PROPERTY_EVENTS) != 0) {
+                Object o = e.getSource();
+                AccessibleContext ac;
+
+                if (o instanceof AccessibleContext) {
+                    ac = (AccessibleContext) o;
+                } else {
+                    Accessible a = Translator.getAccessible(e.getSource());
+                    if (a == null)
+                        return;
+                    else
+                        ac = a.getAccessibleContext();
+                }
+                if (ac != null) {
+                    InvocationUtils.registerAccessibleContext(ac, AppContext.getAppContext());
+
+                    accessBridge.debugString("AccessibleContext: " + ac);
+                    String propertyName = e.getPropertyName();
+
+                    if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_CARET_PROPERTY) == 0) {
+                        int oldValue = 0;
+                        int newValue = 0;
+
+                        if (e.getOldValue() instanceof Integer) {
+                            oldValue = ((Integer) e.getOldValue()).intValue();
+                        }
+                        if (e.getNewValue() instanceof Integer) {
+                            newValue = ((Integer) e.getNewValue()).intValue();
+                        }
+                        accessBridge.debugString(" - about to call propertyCaretChange()");
+                        accessBridge.debugString("   old value: " + oldValue + "new value: " + newValue);
+                        accessBridge.propertyCaretChange(e, ac, oldValue, newValue);
+
+                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY) == 0) {
+                        String oldValue = null;
+                        String newValue = null;
+
+                        if (e.getOldValue() != null) {
+                            oldValue = e.getOldValue().toString();
+                        }
+                        if (e.getNewValue() != null) {
+                            newValue = e.getNewValue().toString();
+                        }
+                        accessBridge.debugString(" - about to call propertyDescriptionChange()");
+                        accessBridge.debugString("   old value: " + oldValue + "new value: " + newValue);
+                        accessBridge.propertyDescriptionChange(e, ac, oldValue, newValue);
+
+                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_NAME_PROPERTY) == 0) {
+                        String oldValue = null;
+                        String newValue = null;
+
+                        if (e.getOldValue() != null) {
+                            oldValue = e.getOldValue().toString();
+                        }
+                        if (e.getNewValue() != null) {
+                            newValue = e.getNewValue().toString();
+                        }
+                        accessBridge.debugString(" - about to call propertyNameChange()");
+                        accessBridge.debugString("   old value: " + oldValue + " new value: " + newValue);
+                        accessBridge.propertyNameChange(e, ac, oldValue, newValue);
+
+                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY) == 0) {
+                        accessBridge.debugString(" - about to call propertySelectionChange() " + ac +  "   " + Thread.currentThread() + "   " + e.getSource());
+
+                        accessBridge.propertySelectionChange(e, ac);
+
+                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_STATE_PROPERTY) == 0) {
+                        String oldValue = null;
+                        String newValue = null;
+
+                        // Localization fix requested by Oliver for EA-1
+                        if (e.getOldValue() != null) {
+                            AccessibleState oldState = (AccessibleState) e.getOldValue();
+                            oldValue = oldState.toDisplayString(Locale.US);
+                        }
+                        if (e.getNewValue() != null) {
+                            AccessibleState newState = (AccessibleState) e.getNewValue();
+                            newValue = newState.toDisplayString(Locale.US);
+                        }
+
+                        accessBridge.debugString(" - about to call propertyStateChange()");
+                        accessBridge.propertyStateChange(e, ac, oldValue, newValue);
+
+                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_TEXT_PROPERTY) == 0) {
+                        accessBridge.debugString(" - about to call propertyTextChange()");
+                        accessBridge.propertyTextChange(e, ac);
+
+                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY) == 0) {  // strings 'cause of floating point, etc.
+                        String oldValue = null;
+                        String newValue = null;
+
+                        if (e.getOldValue() != null) {
+                            oldValue = e.getOldValue().toString();
+                        }
+                        if (e.getNewValue() != null) {
+                            newValue = e.getNewValue().toString();
+                        }
+                        accessBridge.debugString(" - about to call propertyDescriptionChange()");
+                        accessBridge.propertyValueChange(e, ac, oldValue, newValue);
+
+                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY) == 0) {
+                        accessBridge.propertyVisibleDataChange(e, ac);
+
+                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_CHILD_PROPERTY) == 0) {
+                        AccessibleContext oldAC = null;
+                        AccessibleContext newAC = null;
+                        Accessible a;
+
+                        if (e.getOldValue() instanceof AccessibleContext) {
+                            oldAC = (AccessibleContext) e.getOldValue();
+                            InvocationUtils.registerAccessibleContext(oldAC, AppContext.getAppContext());
+                        }
+                        if (e.getNewValue() instanceof AccessibleContext) {
+                            newAC = (AccessibleContext) e.getNewValue();
+                            InvocationUtils.registerAccessibleContext(newAC, AppContext.getAppContext());
+                        }
+                        accessBridge.debugString(" - about to call propertyChildChange()");
+                        accessBridge.debugString("   old AC: " + oldAC + "new AC: " + newAC);
+                        accessBridge.propertyChildChange(e, ac, oldAC, newAC);
+
+                    } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY) == 0) {
+                        handleActiveDescendentEvent(e, ac);
+                    }
+                }
+            }
+        }
+
+        /*
+        * Handle an ActiveDescendent PropertyChangeEvent.  This
+        * method works around a JTree bug where ActiveDescendent
+        * PropertyChangeEvents have the wrong parent.
+        */
+        private AccessibleContext prevAC = null; // previous AccessibleContext
+
+        private void handleActiveDescendentEvent(PropertyChangeEvent e,
+                                                 AccessibleContext ac) {
+            if (e == null || ac == null)
+                return;
+            AccessibleContext oldAC = null;
+            AccessibleContext newAC = null;
+            Accessible a;
+
+            // get the old active descendent
+            if (e.getOldValue() instanceof Accessible) {
+                oldAC = ((Accessible) e.getOldValue()).getAccessibleContext();
+            } else if (e.getOldValue() instanceof Component) {
+                a = Translator.getAccessible(e.getOldValue());
+                if (a != null) {
+                    oldAC = a.getAccessibleContext();
+                }
+            }
+            if (oldAC != null) {
+                Accessible parent = oldAC.getAccessibleParent();
+                if (parent instanceof JTree) {
+                    // use the previous AccessibleJTreeNode
+                    oldAC = prevAC;
+                }
+            }
+
+            // get the new active descendent
+            if (e.getNewValue() instanceof Accessible) {
+                newAC = ((Accessible) e.getNewValue()).getAccessibleContext();
+            } else if (e.getNewValue() instanceof Component) {
+                a = Translator.getAccessible(e.getNewValue());
+                if (a != null) {
+                    newAC = a.getAccessibleContext();
+                }
+            }
+            if (newAC != null) {
+                Accessible parent = newAC.getAccessibleParent();
+                if (parent instanceof JTree) {
+                    // use a new AccessibleJTreeNode with the right parent
+                    JTree tree = (JTree)parent;
+                    newAC = new AccessibleJTreeNode(tree,
+                                                    tree.getSelectionPath(),
+                                                    null);
+                }
+            }
+            prevAC = newAC;
+
+            accessBridge.debugString("  - about to call propertyActiveDescendentChange()");
+            accessBridge.debugString("   AC: " + ac);
+            accessBridge.debugString("   old AC: " + oldAC + "new AC: " + newAC);
+
+            InvocationUtils.registerAccessibleContext(oldAC, AppContext.getAppContext());
+            InvocationUtils.registerAccessibleContext(newAC, AppContext.getAppContext());
+            accessBridge.propertyActiveDescendentChange(e, ac, oldAC, newAC);
+        }
+
+        /**
+        *  ------- focus event glue
+        */
+        private boolean stateChangeListenerAdded = false;
+
+        public void focusGained(FocusEvent e) {
+            processFocusGained();
+        }
+
+        public void stateChanged(ChangeEvent e) {
+            processFocusGained();
+        }
+
+        private void processFocusGained() {
+            Component focusOwner = KeyboardFocusManager.
+            getCurrentKeyboardFocusManager().getFocusOwner();
+            if (focusOwner == null) {
+                return;
+            }
+
+            // Only menus and popup selections are handled by the JRootPane.
+            if (focusOwner instanceof JRootPane) {
+                MenuElement [] path =
+                MenuSelectionManager.defaultManager().getSelectedPath();
+                if (path.length > 1) {
+                    Component penult = path[path.length-2].getComponent();
+                    Component last = path[path.length-1].getComponent();
+
+                    if (last instanceof JPopupMenu) {
+                        // This is a popup with nothing in the popup
+                        // selected. The menu itself is selected.
+                        FocusEvent e = new FocusEvent(penult, FocusEvent.FOCUS_GAINED);
+                        AccessibleContext context = penult.getAccessibleContext();
+                        InvocationUtils.registerAccessibleContext(context, SunToolkit.targetToAppContext(penult));
+                        accessBridge.focusGained(e, context);
+                    } else if (penult instanceof JPopupMenu) {
+                        // This is a popup with an item selected
+                        FocusEvent e =
+                        new FocusEvent(last, FocusEvent.FOCUS_GAINED);
+                        accessBridge.debugString(" - about to call focusGained()");
+                        AccessibleContext focusedAC = last.getAccessibleContext();
+                        InvocationUtils.registerAccessibleContext(focusedAC, SunToolkit.targetToAppContext(last));
+                        accessBridge.debugString("   AC: " + focusedAC);
+                        accessBridge.focusGained(e, focusedAC);
+                    }
+                }
+            } else {
+                // The focus owner has the selection.
+                if (focusOwner instanceof Accessible) {
+                    FocusEvent e = new FocusEvent(focusOwner,
+                                                  FocusEvent.FOCUS_GAINED);
+                    accessBridge.debugString(" - about to call focusGained()");
+                    AccessibleContext focusedAC = focusOwner.getAccessibleContext();
+                    InvocationUtils.registerAccessibleContext(focusedAC, SunToolkit.targetToAppContext(focusOwner));
+                    accessBridge.debugString("   AC: " + focusedAC);
+                    accessBridge.focusGained(e, focusedAC);
+                }
+            }
+        }
+
+        public void focusLost(FocusEvent e) {
+            if (e != null && (javaEventMask & FOCUS_LOST_EVENTS) != 0) {
+                Accessible a = Translator.getAccessible(e.getSource());
+                if (a != null) {
+                    accessBridge.debugString(" - about to call focusLost()");
+                    accessBridge.debugString("   AC: " + a.getAccessibleContext());
+                    AccessibleContext context = a.getAccessibleContext();
+                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
+                    accessBridge.focusLost(e, context);
+                }
+            }
+        }
+
+        /**
+         *  ------- caret event glue
+         */
+        public void caretUpdate(CaretEvent e) {
+            if (e != null && (javaEventMask & CARET_UPATE_EVENTS) != 0) {
+                Accessible a = Translator.getAccessible(e.getSource());
+                if (a != null) {
+                    AccessibleContext context = a.getAccessibleContext();
+                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
+                    accessBridge.caretUpdate(e, context);
+                }
+            }
+        }
+
+    /**
+     *  ------- mouse event glue
+     */
+
+        public void mouseClicked(MouseEvent e) {
+            if (e != null && (javaEventMask & MOUSE_CLICKED_EVENTS) != 0) {
+                Accessible a = Translator.getAccessible(e.getSource());
+                if (a != null) {
+                    AccessibleContext context = a.getAccessibleContext();
+                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
+                    accessBridge.mouseClicked(e, context);
+                }
+            }
+        }
+
+        public void mouseEntered(MouseEvent e) {
+            if (e != null && (javaEventMask & MOUSE_ENTERED_EVENTS) != 0) {
+                Accessible a = Translator.getAccessible(e.getSource());
+                if (a != null) {
+                    AccessibleContext context = a.getAccessibleContext();
+                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
+                    accessBridge.mouseEntered(e, context);
+                }
+            }
+        }
+
+        public void mouseExited(MouseEvent e) {
+            if (e != null && (javaEventMask & MOUSE_EXITED_EVENTS) != 0) {
+                Accessible a = Translator.getAccessible(e.getSource());
+                if (a != null) {
+                    AccessibleContext context = a.getAccessibleContext();
+                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
+                    accessBridge.mouseExited(e, context);
+                }
+            }
+        }
+
+        public void mousePressed(MouseEvent e) {
+            if (e != null && (javaEventMask & MOUSE_PRESSED_EVENTS) != 0) {
+                Accessible a = Translator.getAccessible(e.getSource());
+                if (a != null) {
+                    AccessibleContext context = a.getAccessibleContext();
+                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
+                    accessBridge.mousePressed(e, context);
+                }
+            }
+        }
+
+        public void mouseReleased(MouseEvent e) {
+            if (e != null && (javaEventMask & MOUSE_RELEASED_EVENTS) != 0) {
+                Accessible a = Translator.getAccessible(e.getSource());
+                if (a != null) {
+                    AccessibleContext context = a.getAccessibleContext();
+                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
+                    accessBridge.mouseReleased(e, context);
+                }
+            }
+        }
+
+        /**
+         *  ------- menu event glue
+         */
+        public void menuCanceled(MenuEvent e) {
+            if (e != null && (javaEventMask & MENU_CANCELED_EVENTS) != 0) {
+                Accessible a = Translator.getAccessible(e.getSource());
+                if (a != null) {
+                    AccessibleContext context = a.getAccessibleContext();
+                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
+                    accessBridge.menuCanceled(e, context);
+                }
+            }
+        }
+
+        public void menuDeselected(MenuEvent e) {
+            if (e != null && (javaEventMask & MENU_DESELECTED_EVENTS) != 0) {
+                Accessible a = Translator.getAccessible(e.getSource());
+                if (a != null) {
+                    AccessibleContext context = a.getAccessibleContext();
+                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
+                    accessBridge.menuDeselected(e, context);
+                }
+            }
+        }
+
+        public void menuSelected(MenuEvent e) {
+            if (e != null && (javaEventMask & MENU_SELECTED_EVENTS) != 0) {
+                Accessible a = Translator.getAccessible(e.getSource());
+                if (a != null) {
+                    AccessibleContext context = a.getAccessibleContext();
+                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
+                    accessBridge.menuSelected(e, context);
+                }
+            }
+        }
+
+        public void popupMenuCanceled(PopupMenuEvent e) {
+            if (e != null && (javaEventMask & POPUPMENU_CANCELED_EVENTS) != 0) {
+                Accessible a = Translator.getAccessible(e.getSource());
+                if (a != null) {
+                    AccessibleContext context = a.getAccessibleContext();
+                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
+                    accessBridge.popupMenuCanceled(e, context);
+                }
+            }
+        }
+
+        public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
+            if (e != null && (javaEventMask & POPUPMENU_WILL_BECOME_INVISIBLE_EVENTS) != 0) {
+                Accessible a = Translator.getAccessible(e.getSource());
+                if (a != null) {
+                    AccessibleContext context = a.getAccessibleContext();
+                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
+                    accessBridge.popupMenuWillBecomeInvisible(e, context);
+                }
+            }
+        }
+
+        public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
+            if (e != null && (javaEventMask & POPUPMENU_WILL_BECOME_VISIBLE_EVENTS) != 0) {
+                Accessible a = Translator.getAccessible(e.getSource());
+                if (a != null) {
+                    AccessibleContext context = a.getAccessibleContext();
+                    InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
+                    accessBridge.popupMenuWillBecomeVisible(e, context);
+                }
+            }
+        }
+
+    } // End of EventHandler Class
+
+    // --------- Event Notification Registration methods
+
+    /**
+     *  Wrapper method around eventHandler.addJavaEventNotification()
+     */
+    private void addJavaEventNotification(final long type) {
+        EventQueue.invokeLater(new Runnable() {
+            public void run(){
+                eventHandler.addJavaEventNotification(type);
+            }
+        });
+    }
+
+    /**
+     *  Wrapper method around eventHandler.removeJavaEventNotification()
+     */
+    private void removeJavaEventNotification(final long type) {
+        EventQueue.invokeLater(new Runnable() {
+            public void run(){
+                eventHandler.removeJavaEventNotification(type);
+            }
+        });
+    }
+
+
+    /**
+     *  Wrapper method around eventHandler.addAccessibilityEventNotification()
+     */
+    private void addAccessibilityEventNotification(final long type) {
+        EventQueue.invokeLater(new Runnable() {
+            public void run(){
+                eventHandler.addAccessibilityEventNotification(type);
+            }
+        });
+    }
+
+    /**
+     *  Wrapper method around eventHandler.removeAccessibilityEventNotification()
+     */
+    private void removeAccessibilityEventNotification(final long type) {
+        EventQueue.invokeLater(new Runnable() {
+            public void run(){
+                eventHandler.removeAccessibilityEventNotification(type);
+            }
+        });
+    }
+
+    /**
+     ******************************************************
+     * All AccessibleRoles
+     *
+     * We shouldn't have to do this since it requires us
+     * to synchronize the allAccessibleRoles array when
+     * the AccessibleRoles class interface changes. However,
+     * there is no Accessibility API method to get all
+     * AccessibleRoles
+     ******************************************************
+     */
+    private AccessibleRole [] allAccessibleRoles = {
+    /**
+     * Object is used to alert the user about something.
+     */
+    AccessibleRole.ALERT,
+
+    /**
+     * The header for a column of data.
+     */
+    AccessibleRole.COLUMN_HEADER,
+
+    /**
+     * Object that can be drawn into and is used to trap
+     * events.
+     * @see #FRAME
+     * @see #GLASS_PANE
+     * @see #LAYERED_PANE
+     */
+    AccessibleRole.CANVAS,
+
+    /**
+     * A list of choices the user can select from.  Also optionally
+     * allows the user to enter a choice of their own.
+     */
+    AccessibleRole.COMBO_BOX,
+
+    /**
+     * An iconified internal frame in a DESKTOP_PANE.
+     * @see #DESKTOP_PANE
+     * @see #INTERNAL_FRAME
+     */
+    AccessibleRole.DESKTOP_ICON,
+
+    /**
+     * A frame-like object that is clipped by a desktop pane.  The
+     * desktop pane, internal frame, and desktop icon objects are
+     * often used to create multiple document interfaces within an
+     * application.
+     * @see #DESKTOP_ICON
+     * @see #DESKTOP_PANE
+     * @see #FRAME
+     */
+    AccessibleRole.INTERNAL_FRAME,
+
+    /**
+     * A pane that supports internal frames and
+     * iconified versions of those internal frames.
+     * @see #DESKTOP_ICON
+     * @see #INTERNAL_FRAME
+     */
+    AccessibleRole.DESKTOP_PANE,
+
+    /**
+     * A specialized pane whose primary use is inside a DIALOG
+     * @see #DIALOG
+     */
+    AccessibleRole.OPTION_PANE,
+
+    /**
+     * A top level window with no title or border.
+     * @see #FRAME
+     * @see #DIALOG
+     */
+    AccessibleRole.WINDOW,
+
+    /**
+     * A top level window with a title bar, border, menu bar, etc.  It is
+     * often used as the primary window for an application.
+     * @see #DIALOG
+     * @see #CANVAS
+     * @see #WINDOW
+     */
+    AccessibleRole.FRAME,
+
+    /**
+     * A top level window with title bar and a border.  A dialog is similar
+     * to a frame, but it has fewer properties and is often used as a
+     * secondary window for an application.
+     * @see #FRAME
+     * @see #WINDOW
+     */
+    AccessibleRole.DIALOG,
+
+    /**
+     * A specialized dialog that lets the user choose a color.
+     */
+    AccessibleRole.COLOR_CHOOSER,
+
+
+    /**
+     * A pane that allows the user to navigate through
+     * and select the contents of a directory.  May be used
+     * by a file chooser.
+     * @see #FILE_CHOOSER
+     */
+    AccessibleRole.DIRECTORY_PANE,
+
+    /**
+     * A specialized dialog that displays the files in the directory
+     * and lets the user select a file, browse a different directory,
+     * or specify a filename.  May use the directory pane to show the
+     * contents of a directory.
+     * @see #DIRECTORY_PANE
+     */
+    AccessibleRole.FILE_CHOOSER,
+
+    /**
+     * An object that fills up space in a user interface.  It is often
+     * used in interfaces to tweak the spacing between components,
+     * but serves no other purpose.
+     */
+    AccessibleRole.FILLER,
+
+    /**
+     * A hypertext anchor
+     */
+    // AccessibleRole.HYPERLINK,
+
+    /**
+     * A small fixed size picture, typically used to decorate components.
+     */
+    AccessibleRole.ICON,
+
+    /**
+     * An object used to present an icon or short string in an interface.
+     */
+    AccessibleRole.LABEL,
+
+    /**
+     * A specialized pane that has a glass pane and a layered pane as its
+     * children.
+     * @see #GLASS_PANE
+     * @see #LAYERED_PANE
+     */
+    AccessibleRole.ROOT_PANE,
+
+    /**
+     * A pane that is guaranteed to be painted on top
+     * of all panes beneath it.
+     * @see #ROOT_PANE
+     * @see #CANVAS
+     */
+    AccessibleRole.GLASS_PANE,
+
+    /**
+     * A specialized pane that allows its children to be drawn in layers,
+     * providing a form of stacking order.  This is usually the pane that
+     * holds the menu bar as well as the pane that contains most of the
+     * visual components in a window.
+     * @see #GLASS_PANE
+     * @see #ROOT_PANE
+     */
+    AccessibleRole.LAYERED_PANE,
+
+    /**
+     * An object that presents a list of objects to the user and allows the
+     * user to select one or more of them.  A list is usually contained
+     * within a scroll pane.
+     * @see #SCROLL_PANE
+     * @see #LIST_ITEM
+     */
+    AccessibleRole.LIST,
+
+    /**
+     * An object that presents an element in a list.  A list is usually
+     * contained within a scroll pane.
+     * @see #SCROLL_PANE
+     * @see #LIST
+     */
+    AccessibleRole.LIST_ITEM,
+
+    /**
+     * An object usually drawn at the top of the primary dialog box of
+     * an application that contains a list of menus the user can choose
+     * from.  For example, a menu bar might contain menus for "File,"
+     * "Edit," and "Help."
+     * @see #MENU
+     * @see #POPUP_MENU
+     * @see #LAYERED_PANE
+     */
+    AccessibleRole.MENU_BAR,
+
+    /**
+     * A temporary window that is usually used to offer the user a
+     * list of choices, and then hides when the user selects one of
+     * those choices.
+     * @see #MENU
+     * @see #MENU_ITEM
+     */
+    AccessibleRole.POPUP_MENU,
+
+    /**
+     * An object usually found inside a menu bar that contains a list
+     * of actions the user can choose from.  A menu can have any object
+     * as its children, but most often they are menu items, other menus,
+     * or rudimentary objects such as radio buttons, check boxes, or
+     * separators.  For example, an application may have an "Edit" menu
+     * that contains menu items for "Cut" and "Paste."
+     * @see #MENU_BAR
+     * @see #MENU_ITEM
+     * @see #SEPARATOR
+     * @see #RADIO_BUTTON
+     * @see #CHECK_BOX
+     * @see #POPUP_MENU
+     */
+    AccessibleRole.MENU,
+
+    /**
+     * An object usually contained in a menu that presents an action
+     * the user can choose.  For example, the "Cut" menu item in an
+     * "Edit" menu would be an action the user can select to cut the
+     * selected area of text in a document.
+     * @see #MENU_BAR
+     * @see #SEPARATOR
+     * @see #POPUP_MENU
+     */
+    AccessibleRole.MENU_ITEM,
+
+    /**
+     * An object usually contained in a menu to provide a visual
+     * and logical separation of the contents in a menu.  For example,
+     * the "File" menu of an application might contain menu items for
+     * "Open," "Close," and "Exit," and will place a separator between
+     * "Close" and "Exit" menu items.
+     * @see #MENU
+     * @see #MENU_ITEM
+     */
+    AccessibleRole.SEPARATOR,
+
+    /**
+     * An object that presents a series of panels (or page tabs), one at a
+     * time, through some mechanism provided by the object.  The most common
+     * mechanism is a list of tabs at the top of the panel.  The children of
+     * a page tab list are all page tabs.
+     * @see #PAGE_TAB
+     */
+    AccessibleRole.PAGE_TAB_LIST,
+
+    /**
+     * An object that is a child of a page tab list.  Its sole child is
+     * the panel that is to be presented to the user when the user
+     * selects the page tab from the list of tabs in the page tab list.
+     * @see #PAGE_TAB_LIST
+     */
+    AccessibleRole.PAGE_TAB,
+
+    /**
+     * A generic container that is often used to group objects.
+     */
+    AccessibleRole.PANEL,
+
+    /**
+     * An object used to indicate how much of a task has been completed.
+     */
+    AccessibleRole.PROGRESS_BAR,
+
+    /**
+     * A text object used for passwords, or other places where the
+     * text contents is not shown visibly to the user
+     */
+    AccessibleRole.PASSWORD_TEXT,
+
+    /**
+     * An object the user can manipulate to tell the application to do
+     * something.
+     * @see #CHECK_BOX
+     * @see #TOGGLE_BUTTON
+     * @see #RADIO_BUTTON
+     */
+    AccessibleRole.PUSH_BUTTON,
+
+    /**
+     * A specialized push button that can be checked or unchecked, but
+     * does not provide a separate indicator for the current state.
+     * @see #PUSH_BUTTON
+     * @see #CHECK_BOX
+     * @see #RADIO_BUTTON
+     */
+    AccessibleRole.TOGGLE_BUTTON,
+
+    /**
+     * A choice that can be checked or unchecked and provides a
+     * separate indicator for the current state.
+     * @see #PUSH_BUTTON
+     * @see #TOGGLE_BUTTON
+     * @see #RADIO_BUTTON
+     */
+    AccessibleRole.CHECK_BOX,
+
+    /**
+     * A specialized check box that will cause other radio buttons in the
+     * same group to become unchecked when this one is checked.
+     * @see #PUSH_BUTTON
+     * @see #TOGGLE_BUTTON
+     * @see #CHECK_BOX
+     */
+    AccessibleRole.RADIO_BUTTON,
+
+    /**
+     * The header for a row of data.
+     */
+    AccessibleRole.ROW_HEADER,
+
+    /**
+     * An object that allows a user to incrementally view a large amount
+     * of information.  Its children can include scroll bars and a viewport.
+     * @see #SCROLL_BAR
+     * @see #VIEWPORT
+     */
+    AccessibleRole.SCROLL_PANE,
+
+    /**
+     * An object usually used to allow a user to incrementally view a
+     * large amount of data.  Usually used only by a scroll pane.
+     * @see #SCROLL_PANE
+     */
+    AccessibleRole.SCROLL_BAR,
+
+    /**
+     * An object usually used in a scroll pane.  It represents the portion
+     * of the entire data that the user can see.  As the user manipulates
+     * the scroll bars, the contents of the viewport can change.
+     * @see #SCROLL_PANE
+     */
+    AccessibleRole.VIEWPORT,
+
+    /**
+     * An object that allows the user to select from a bounded range.  For
+     * example, a slider might be used to select a number between 0 and 100.
+     */
+    AccessibleRole.SLIDER,
+
+    /**
+     * A specialized panel that presents two other panels at the same time.
+     * Between the two panels is a divider the user can manipulate to make
+     * one panel larger and the other panel smaller.
+     */
+    AccessibleRole.SPLIT_PANE,
+
+    /**
+     * An object used to present information in terms of rows and columns.
+     * An example might include a spreadsheet application.
+     */
+    AccessibleRole.TABLE,
+
+    /**
+     * An object that presents text to the user.  The text is usually
+     * editable by the user as opposed to a label.
+     * @see #LABEL
+     */
+    AccessibleRole.TEXT,
+
+    /**
+     * An object used to present hierarchical information to the user.
+     * The individual nodes in the tree can be collapsed and expanded
+     * to provide selective disclosure of the tree's contents.
+     */
+    AccessibleRole.TREE,
+
+    /**
+     * A bar or palette usually composed of push buttons or toggle buttons.
+     * It is often used to provide the most frequently used functions for an
+     * application.
+     */
+    AccessibleRole.TOOL_BAR,
+
+    /**
+     * An object that provides information about another object.  The
+     * accessibleDescription property of the tool tip is often displayed
+     * to the user in a small "help bubble" when the user causes the
+     * mouse to hover over the object associated with the tool tip.
+     */
+    AccessibleRole.TOOL_TIP,
+
+    /**
+     * An AWT component, but nothing else is known about it.
+     * @see #SWING_COMPONENT
+     * @see #UNKNOWN
+     */
+    AccessibleRole.AWT_COMPONENT,
+
+    /**
+     * A Swing component, but nothing else is known about it.
+     * @see #AWT_COMPONENT
+     * @see #UNKNOWN
+     */
+    AccessibleRole.SWING_COMPONENT,
+
+    /**
+     * The object contains some Accessible information, but its role is
+     * not known.
+     * @see #AWT_COMPONENT
+     * @see #SWING_COMPONENT
+     */
+    AccessibleRole.UNKNOWN,
+
+    // These roles are only available in JDK 1.4
+
+    /**
+     * A STATUS_BAR is an simple component that can contain
+     * multiple labels of status information to the user.
+     AccessibleRole.STATUS_BAR,
+
+     /**
+     * A DATE_EDITOR is a component that allows users to edit
+     * java.util.Date and java.util.Time objects
+     AccessibleRole.DATE_EDITOR,
+
+     /**
+     * A SPIN_BOX is a simple spinner component and its main use
+     * is for simple numbers.
+     AccessibleRole.SPIN_BOX,
+
+     /**
+     * A FONT_CHOOSER is a component that lets the user pick various
+     * attributes for fonts.
+     AccessibleRole.FONT_CHOOSER,
+
+     /**
+     * A GROUP_BOX is a simple container that contains a border
+     * around it and contains components inside it.
+     AccessibleRole.GROUP_BOX
+
+     /**
+     * Since JDK 1.5
+     *
+     * A text header
+
+     AccessibleRole.HEADER,
+
+     /**
+     * A text footer
+
+     AccessibleRole.FOOTER,
+
+     /**
+     * A text paragraph
+
+     AccessibleRole.PARAGRAPH,
+
+     /**
+     * A ruler is an object used to measure distance
+
+     AccessibleRole.RULER,
+
+     /**
+     * A role indicating the object acts as a formula for
+     * calculating a value.  An example is a formula in
+     * a spreadsheet cell.
+     AccessibleRole.EDITBAR
+    */
+    };
+
+    /**
+     * This class implements accessibility support for the
+     * <code>JTree</code> child.  It provides an implementation of the
+     * Java Accessibility API appropriate to tree nodes.
+     *
+     * Copied from JTree.java to work around a JTree bug where
+     * ActiveDescendent PropertyChangeEvents contain the wrong
+     * parent.
+     */
+    /**
+     * This class in invoked on the EDT as its part of ActiveDescendant,
+     * hence the calls do not need to be specifically made on the EDT
+     */
+    private class AccessibleJTreeNode extends AccessibleContext
+        implements Accessible, AccessibleComponent, AccessibleSelection,
+                   AccessibleAction {
+
+        private JTree tree = null;
+        private TreeModel treeModel = null;
+        private Object obj = null;
+        private TreePath path = null;
+        private Accessible accessibleParent = null;
+        private int index = 0;
+        private boolean isLeaf = false;
+
+        /**
+         *  Constructs an AccessibleJTreeNode
+         */
+        AccessibleJTreeNode(JTree t, TreePath p, Accessible ap) {
+            tree = t;
+            path = p;
+            accessibleParent = ap;
+            if (t != null)
+                treeModel = t.getModel();
+            if (p != null) {
+                obj = p.getLastPathComponent();
+                if (treeModel != null && obj != null) {
+                    isLeaf = treeModel.isLeaf(obj);
+                }
+            }
+            debugString("AccessibleJTreeNode: name = "+getAccessibleName()+"; TreePath = "+p+"; parent = "+ap);
+        }
+
+        private TreePath getChildTreePath(int i) {
+            // Tree nodes can't be so complex that they have
+            // two sets of children -> we're ignoring that case
+            if (i < 0 || i >= getAccessibleChildrenCount() || path == null || treeModel == null) {
+                return null;
+            } else {
+                Object childObj = treeModel.getChild(obj, i);
+                Object[] objPath = path.getPath();
+                Object[] objChildPath = new Object[objPath.length+1];
+                java.lang.System.arraycopy(objPath, 0, objChildPath, 0, objPath.length);
+                objChildPath[objChildPath.length-1] = childObj;
+                return new TreePath(objChildPath);
+            }
+        }
+
+        /**
+         * Get the AccessibleContext associated with this tree node.
+         * In the implementation of the Java Accessibility API for
+         * this class, return this object, which is its own
+         * AccessibleContext.
+         *
+         * @return this object
+        */
+        public AccessibleContext getAccessibleContext() {
+            return this;
+        }
+
+        private AccessibleContext getCurrentAccessibleContext() {
+            Component c = getCurrentComponent();
+            if (c instanceof Accessible) {
+               return (c.getAccessibleContext());
+            } else {
+                return null;
+            }
+        }
+
+        private Component getCurrentComponent() {
+            debugString("AccessibleJTreeNode: getCurrentComponent");
+            // is the object visible?
+            // if so, get row, selected, focus & leaf state,
+            // and then get the renderer component and return it
+            if (tree != null && tree.isVisible(path)) {
+                TreeCellRenderer r = tree.getCellRenderer();
+                if (r == null) {
+                    debugString("  returning null 1");
+                    return null;
+                }
+                TreeUI ui = tree.getUI();
+                if (ui != null) {
+                    int row = ui.getRowForPath(tree, path);
+                    boolean selected = tree.isPathSelected(path);
+                    boolean expanded = tree.isExpanded(path);
+                    boolean hasFocus = false; // how to tell?? -PK
+                    Component retval = r.getTreeCellRendererComponent(tree, obj,
+                                                                      selected, expanded,
+                                                                      isLeaf, row, hasFocus);
+                    debugString("  returning = "+retval.getClass());
+                    return retval;
+                }
+            }
+            debugString("  returning null 2");
+            return null;
+        }
+
+        // AccessibleContext methods
+
+        /**
+         * Get the accessible name of this object.
+         *
+         * @return the localized name of the object; null if this
+         * object does not have a name
+         */
+        public String getAccessibleName() {
+            debugString("AccessibleJTreeNode: getAccessibleName");
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac != null) {
+                String name = ac.getAccessibleName();
+                if ((name != null) && (!name.isEmpty())) {
+                    String retval = ac.getAccessibleName();
+                    debugString("    returning "+retval);
+                    return retval;
+                } else {
+                    return null;
+                }
+            }
+            if ((accessibleName != null) && (accessibleName.isEmpty())) {
+                return accessibleName;
+            } else {
+                return null;
+            }
+        }
+
+        /**
+         * Set the localized accessible name of this object.
+         *
+         * @param s the new localized name of the object.
+         */
+        public void setAccessibleName(String s) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac != null) {
+                ac.setAccessibleName(s);
+            } else {
+                super.setAccessibleName(s);
+            }
+        }
+
+        //
+        // *** should check tooltip text for desc. (needs MouseEvent)
+        //
+        /**
+         * Get the accessible description of this object.
+         *
+         * @return the localized description of the object; null if
+         * this object does not have a description
+         */
+        public String getAccessibleDescription() {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac != null) {
+                return ac.getAccessibleDescription();
+            } else {
+                return super.getAccessibleDescription();
+            }
+        }
+
+        /**
+         * Set the accessible description of this object.
+         *
+         * @param s the new localized description of the object
+         */
+        public void setAccessibleDescription(String s) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac != null) {
+                ac.setAccessibleDescription(s);
+            } else {
+                super.setAccessibleDescription(s);
+            }
+        }
+
+        /**
+         * Get the role of this object.
+         *
+         * @return an instance of AccessibleRole describing the role of the object
+         * @see AccessibleRole
+         */
+        public AccessibleRole getAccessibleRole() {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac != null) {
+                return ac.getAccessibleRole();
+            } else {
+                return AccessibleRole.UNKNOWN;
+            }
+        }
+
+        /**
+         * Get the state set of this object.
+         *
+         * @return an instance of AccessibleStateSet containing the
+         * current state set of the object
+         * @see AccessibleState
+         */
+        public AccessibleStateSet getAccessibleStateSet() {
+            if (tree == null)
+                return null;
+            AccessibleContext ac = getCurrentAccessibleContext();
+            AccessibleStateSet states;
+            int row = tree.getUI().getRowForPath(tree,path);
+            int lsr = tree.getLeadSelectionRow();
+            if (ac != null) {
+                states = ac.getAccessibleStateSet();
+            } else {
+                states = new AccessibleStateSet();
+            }
+            // need to test here, 'cause the underlying component
+            // is a cellRenderer, which is never showing...
+            if (isShowing()) {
+                states.add(AccessibleState.SHOWING);
+            } else if (states.contains(AccessibleState.SHOWING)) {
+                states.remove(AccessibleState.SHOWING);
+            }
+            if (isVisible()) {
+                states.add(AccessibleState.VISIBLE);
+            } else if (states.contains(AccessibleState.VISIBLE)) {
+                states.remove(AccessibleState.VISIBLE);
+            }
+            if (tree.isPathSelected(path)){
+                states.add(AccessibleState.SELECTED);
+            }
+            if (lsr == row) {
+                states.add(AccessibleState.ACTIVE);
+            }
+            if (!isLeaf) {
+                states.add(AccessibleState.EXPANDABLE);
+            }
+            if (tree.isExpanded(path)) {
+                states.add(AccessibleState.EXPANDED);
+            } else {
+                states.add(AccessibleState.COLLAPSED);
+            }
+            if (tree.isEditable()) {
+                states.add(AccessibleState.EDITABLE);
+            }
+            return states;
+        }
+
+        /**
+         * Get the Accessible parent of this object.
+         *
+         * @return the Accessible parent of this object; null if this
+         * object does not have an Accessible parent
+         */
+        public Accessible getAccessibleParent() {
+            // someone wants to know, so we need to create our parent
+            // if we don't have one (hey, we're a talented kid!)
+            if (accessibleParent == null && path != null) {
+                Object[] objPath = path.getPath();
+                if (objPath.length > 1) {
+                    Object objParent = objPath[objPath.length-2];
+                    if (treeModel != null) {
+                        index = treeModel.getIndexOfChild(objParent, obj);
+                    }
+                    Object[] objParentPath = new Object[objPath.length-1];
+                    java.lang.System.arraycopy(objPath, 0, objParentPath,
+                                               0, objPath.length-1);
+                    TreePath parentPath = new TreePath(objParentPath);
+                    accessibleParent = new AccessibleJTreeNode(tree,
+                                                               parentPath,
+                                                               null);
+                    this.setAccessibleParent(accessibleParent);
+                } else if (treeModel != null) {
+                    accessibleParent = tree; // we're the top!
+                    index = 0; // we're an only child!
+                    this.setAccessibleParent(accessibleParent);
+                }
+            }
+            return accessibleParent;
+        }
+
+        /**
+         * Get the index of this object in its accessible parent.
+         *
+         * @return the index of this object in its parent; -1 if this
+         * object does not have an accessible parent.
+         * @see #getAccessibleParent
+         */
+        public int getAccessibleIndexInParent() {
+            // index is invalid 'till we have an accessibleParent...
+            if (accessibleParent == null) {
+                getAccessibleParent();
+            }
+            if (path != null) {
+                Object[] objPath = path.getPath();
+                if (objPath.length > 1) {
+                    Object objParent = objPath[objPath.length-2];
+                    if (treeModel != null) {
+                        index = treeModel.getIndexOfChild(objParent, obj);
+                    }
+                }
+            }
+            return index;
+        }
+
+        /**
+         * Returns the number of accessible children in the object.
+         *
+         * @return the number of accessible children in the object.
+         */
+        public int getAccessibleChildrenCount() {
+            // Tree nodes can't be so complex that they have
+            // two sets of children -> we're ignoring that case
+            if (obj != null && treeModel != null) {
+                return treeModel.getChildCount(obj);
+            }
+            return 0;
+        }
+
+        /**
+         * Return the specified Accessible child of the object.
+         *
+         * @param i zero-based index of child
+         * @return the Accessible child of the object
+         */
+        public Accessible getAccessibleChild(int i) {
+            // Tree nodes can't be so complex that they have
+            // two sets of children -> we're ignoring that case
+            if (i < 0 || i >= getAccessibleChildrenCount() || path == null || treeModel == null) {
+                return null;
+            } else {
+                Object childObj = treeModel.getChild(obj, i);
+                Object[] objPath = path.getPath();
+                Object[] objChildPath = new Object[objPath.length+1];
+                java.lang.System.arraycopy(objPath, 0, objChildPath, 0, objPath.length);
+                objChildPath[objChildPath.length-1] = childObj;
+                TreePath childPath = new TreePath(objChildPath);
+                return new AccessibleJTreeNode(tree, childPath, this);
+            }
+        }
+
+        /**
+         * Gets the locale of the component. If the component does not have
+         * a locale, then the locale of its parent is returned.
+         *
+         * @return This component's locale. If this component does not have
+         * a locale, the locale of its parent is returned.
+         * @exception IllegalComponentStateException
+         * If the Component does not have its own locale and has not yet
+         * been added to a containment hierarchy such that the locale can be
+         * determined from the containing parent.
+         * @see #setLocale
+         */
+        public Locale getLocale() {
+            if (tree == null)
+                return null;
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac != null) {
+                return ac.getLocale();
+            } else {
+                return tree.getLocale();
+            }
+        }
+
+        /**
+         * Add a PropertyChangeListener to the listener list.
+         * The listener is registered for all properties.
+         *
+         * @param l  The PropertyChangeListener to be added
+         */
+        public void addPropertyChangeListener(PropertyChangeListener l) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac != null) {
+                ac.addPropertyChangeListener(l);
+            } else {
+                super.addPropertyChangeListener(l);
+            }
+        }
+
+        /**
+         * Remove a PropertyChangeListener from the listener list.
+         * This removes a PropertyChangeListener that was registered
+         * for all properties.
+         *
+         * @param l  The PropertyChangeListener to be removed
+         */
+        public void removePropertyChangeListener(PropertyChangeListener l) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac != null) {
+                ac.removePropertyChangeListener(l);
+            } else {
+                super.removePropertyChangeListener(l);
+            }
+        }
+
+        /**
+         * Get the AccessibleAction associated with this object.  In the
+         * implementation of the Java Accessibility API for this class,
+         * return this object, which is responsible for implementing the
+         * AccessibleAction interface on behalf of itself.
+         *
+         * @return this object
+         */
+        public AccessibleAction getAccessibleAction() {
+            return this;
+        }
+
+        /**
+         * Get the AccessibleComponent associated with this object.  In the
+         * implementation of the Java Accessibility API for this class,
+         * return this object, which is responsible for implementing the
+         * AccessibleComponent interface on behalf of itself.
+         *
+         * @return this object
+         */
+        public AccessibleComponent getAccessibleComponent() {
+            return this; // to override getBounds()
+        }
+
+        /**
+         * Get the AccessibleSelection associated with this object if one
+         * exists.  Otherwise return null.
+         *
+         * @return the AccessibleSelection, or null
+         */
+        public AccessibleSelection getAccessibleSelection() {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac != null && isLeaf) {
+                return getCurrentAccessibleContext().getAccessibleSelection();
+            } else {
+                return this;
+            }
+        }
+
+        /**
+         * Get the AccessibleText associated with this object if one
+         * exists.  Otherwise return null.
+         *
+         * @return the AccessibleText, or null
+         */
+        public AccessibleText getAccessibleText() {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac != null) {
+                return getCurrentAccessibleContext().getAccessibleText();
+            } else {
+                return null;
+            }
+        }
+
+        /**
+         * Get the AccessibleValue associated with this object if one
+         * exists.  Otherwise return null.
+         *
+         * @return the AccessibleValue, or null
+         */
+        public AccessibleValue getAccessibleValue() {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac != null) {
+                return getCurrentAccessibleContext().getAccessibleValue();
+            } else {
+                return null;
+            }
+        }
+
+
+            // AccessibleComponent methods
+
+        /**
+         * Get the background color of this object.
+         *
+         * @return the background color, if supported, of the object;
+         * otherwise, null
+         */
+        public Color getBackground() {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                return ((AccessibleComponent) ac).getBackground();
+            } else {
+                Component c = getCurrentComponent();
+                if (c != null) {
+                    return c.getBackground();
+                } else {
+                    return null;
+                }
+            }
+        }
+
+        /**
+         * Set the background color of this object.
+         *
+         * @param c the new Color for the background
+         */
+        public void setBackground(Color c) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                ((AccessibleComponent) ac).setBackground(c);
+            } else {
+                Component cp = getCurrentComponent();
+                if (    cp != null) {
+                    cp.setBackground(c);
+                }
+            }
+        }
+
+
+        /**
+         * Get the foreground color of this object.
+         *
+         * @return the foreground color, if supported, of the object;
+         * otherwise, null
+         */
+        public Color getForeground() {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                return ((AccessibleComponent) ac).getForeground();
+            } else {
+                Component c = getCurrentComponent();
+                if (c != null) {
+                    return c.getForeground();
+                } else {
+                    return null;
+                }
+            }
+        }
+
+        public void setForeground(Color c) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                ((AccessibleComponent) ac).setForeground(c);
+            } else {
+                Component cp = getCurrentComponent();
+                if (cp != null) {
+                    cp.setForeground(c);
+                }
+            }
+        }
+
+        public Cursor getCursor() {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                return ((AccessibleComponent) ac).getCursor();
+            } else {
+                Component c = getCurrentComponent();
+                if (c != null) {
+                    return c.getCursor();
+                } else {
+                    Accessible ap = getAccessibleParent();
+                    if (ap instanceof AccessibleComponent) {
+                        return ((AccessibleComponent) ap).getCursor();
+                    } else {
+                        return null;
+                    }
+                }
+            }
+        }
+
+        public void setCursor(Cursor c) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                ((AccessibleComponent) ac).setCursor(c);
+            } else {
+                Component cp = getCurrentComponent();
+                if (cp != null) {
+                    cp.setCursor(c);
+                }
+            }
+        }
+
+        public Font getFont() {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                return ((AccessibleComponent) ac).getFont();
+            } else {
+                Component c = getCurrentComponent();
+                if (c != null) {
+                    return c.getFont();
+                } else {
+                    return null;
+                }
+            }
+        }
+
+        public void setFont(Font f) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                ((AccessibleComponent) ac).setFont(f);
+            } else {
+                Component c = getCurrentComponent();
+                if (c != null) {
+                    c.setFont(f);
+                }
+            }
+        }
+
+        public FontMetrics getFontMetrics(Font f) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                return ((AccessibleComponent) ac).getFontMetrics(f);
+            } else {
+                Component c = getCurrentComponent();
+                if (c != null) {
+                    return c.getFontMetrics(f);
+                } else {
+                    return null;
+                }
+            }
+        }
+
+        public boolean isEnabled() {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                return ((AccessibleComponent) ac).isEnabled();
+            } else {
+                Component c = getCurrentComponent();
+                if (c != null) {
+                    return c.isEnabled();
+                } else {
+                    return false;
+                }
+            }
+        }
+
+        public void setEnabled(boolean b) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                ((AccessibleComponent) ac).setEnabled(b);
+            } else {
+                Component c = getCurrentComponent();
+                if (c != null) {
+                    c.setEnabled(b);
+                }
+            }
+        }
+
+        public boolean isVisible() {
+            if (tree == null)
+                return false;
+            Rectangle pathBounds = tree.getPathBounds(path);
+            Rectangle parentBounds = tree.getVisibleRect();
+            if ( pathBounds != null && parentBounds != null &&
+                 parentBounds.intersects(pathBounds) ) {
+                return true;
+            } else {
+                return false;
+            }
+        }
+
+        public void setVisible(boolean b) {
+        }
+
+        public boolean isShowing() {
+            return (tree.isShowing() && isVisible());
+        }
+
+        public boolean contains(Point p) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                Rectangle r = ((AccessibleComponent) ac).getBounds();
+                return r.contains(p);
+            } else {
+                Component c = getCurrentComponent();
+                if (c != null) {
+                    Rectangle r = c.getBounds();
+                    return r.contains(p);
+                } else {
+                    return getBounds().contains(p);
+                }
+            }
+        }
+
+        public Point getLocationOnScreen() {
+            if (tree != null) {
+                Point treeLocation = tree.getLocationOnScreen();
+                Rectangle pathBounds = tree.getPathBounds(path);
+                if (treeLocation != null && pathBounds != null) {
+                    Point nodeLocation = new Point(pathBounds.x,
+                                                   pathBounds.y);
+                    nodeLocation.translate(treeLocation.x, treeLocation.y);
+                    return nodeLocation;
+                } else {
+                    return null;
+                }
+            } else {
+                return null;
+            }
+        }
+
+        private Point getLocationInJTree() {
+            Rectangle r = tree.getPathBounds(path);
+            if (r != null) {
+                return r.getLocation();
+            } else {
+                return null;
+            }
+        }
+
+        public Point getLocation() {
+            Rectangle r = getBounds();
+            if (r != null) {
+                return r.getLocation();
+            } else {
+                return null;
+            }
+        }
+
+        public void setLocation(Point p) {
+        }
+
+        public Rectangle getBounds() {
+            if (tree == null)
+                return null;
+            Rectangle r = tree.getPathBounds(path);
+            Accessible parent = getAccessibleParent();
+            if (parent instanceof AccessibleJTreeNode) {
+                Point parentLoc = ((AccessibleJTreeNode) parent).getLocationInJTree();
+                if (parentLoc != null && r != null) {
+                    r.translate(-parentLoc.x, -parentLoc.y);
+                } else {
+                    return null;        // not visible!
+                }
+            }
+            return r;
+        }
+
+        public void setBounds(Rectangle r) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                ((AccessibleComponent) ac).setBounds(r);
+            } else {
+                Component c = getCurrentComponent();
+                if (c != null) {
+                    c.setBounds(r);
+                }
+            }
+        }
+
+        public Dimension getSize() {
+            return getBounds().getSize();
+        }
+
+        public void setSize (Dimension d) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                ((AccessibleComponent) ac).setSize(d);
+            } else {
+                Component c = getCurrentComponent();
+                if (c != null) {
+                    c.setSize(d);
+                }
+            }
+        }
+
+        /**
+        * Returns the <code>Accessible</code> child, if one exists,
+        * contained at the local coordinate <code>Point</code>.
+        * Otherwise returns <code>null</code>.
+        *
+        * @param p point in local coordinates of this
+        *    <code>Accessible</code>
+        * @return the <code>Accessible</code>, if it exists,
+        *    at the specified location; else <code>null</code>
+        */
+        public Accessible getAccessibleAt(Point p) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                return ((AccessibleComponent) ac).getAccessibleAt(p);
+            } else {
+                return null;
+            }
+        }
+
+        public boolean isFocusTraversable() {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                return ((AccessibleComponent) ac).isFocusTraversable();
+            } else {
+                Component c = getCurrentComponent();
+                if (c != null) {
+                    return c.isFocusable();
+                } else {
+                    return false;
+                }
+            }
+        }
+
+        public void requestFocus() {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                ((AccessibleComponent) ac).requestFocus();
+            } else {
+                Component c = getCurrentComponent();
+                if (c != null) {
+                    c.requestFocus();
+                }
+            }
+        }
+
+        public void addFocusListener(FocusListener l) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                ((AccessibleComponent) ac).addFocusListener(l);
+            } else {
+                Component c = getCurrentComponent();
+                if (c != null) {
+                    c.addFocusListener(l);
+                }
+            }
+        }
+
+        public void removeFocusListener(FocusListener l) {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac instanceof AccessibleComponent) {
+                ((AccessibleComponent) ac).removeFocusListener(l);
+            } else {
+                Component c = getCurrentComponent();
+                if (c != null) {
+                    c.removeFocusListener(l);
+                }
+            }
+        }
+
+            // AccessibleSelection methods
+
+        /**
+         * Returns the number of items currently selected.
+         * If no items are selected, the return value will be 0.
+         *
+         * @return the number of items currently selected.
+         */
+        public int getAccessibleSelectionCount() {
+            int count = 0;
+            int childCount = getAccessibleChildrenCount();
+            for (int i = 0; i < childCount; i++) {
+                TreePath childPath = getChildTreePath(i);
+                if (tree.isPathSelected(childPath)) {
+                    count++;
+                }
+            }
+            return count;
+        }
+
+        /**
+         * Returns an Accessible representing the specified selected item
+         * in the object.  If there isn't a selection, or there are
+         * fewer items selected than the integer passed in, the return
+         * value will be null.
+         *
+         * @param i the zero-based index of selected items
+         * @return an Accessible containing the selected item
+         */
+        public Accessible getAccessibleSelection(int i) {
+            int childCount = getAccessibleChildrenCount();
+            if (i < 0 || i >= childCount) {
+                return null;        // out of range
+            }
+            int count = 0;
+            for (int j = 0; j < childCount && i >= count; j++) {
+                TreePath childPath = getChildTreePath(j);
+                if (tree.isPathSelected(childPath)) {
+                    if (count == i) {
+                        return new AccessibleJTreeNode(tree, childPath, this);
+                    } else {
+                        count++;
+                    }
+                }
+            }
+            return null;
+        }
+
+        /**
+         * Returns true if the current child of this object is selected.
+         *
+         * @param i the zero-based index of the child in this Accessible
+         * object.
+         * @see AccessibleContext#getAccessibleChild
+         */
+        public boolean isAccessibleChildSelected(int i) {
+            int childCount = getAccessibleChildrenCount();
+            if (i < 0 || i >= childCount) {
+                return false;       // out of range
+            } else {
+                TreePath childPath = getChildTreePath(i);
+                return tree.isPathSelected(childPath);
+            }
+        }
+
+         /**
+         * Adds the specified selected item in the object to the object's
+         * selection.  If the object supports multiple selections,
+         * the specified item is added to any existing selection, otherwise
+         * it replaces any existing selection in the object.  If the
+         * specified item is already selected, this method has no effect.
+         *
+         * @param i the zero-based index of selectable items
+         */
+        public void addAccessibleSelection(int i) {
+            if (tree == null)
+                return;
+            TreeModel model = tree.getModel();
+            if (model != null) {
+                if (i >= 0 && i < getAccessibleChildrenCount()) {
+                    TreePath path = getChildTreePath(i);
+                    tree.addSelectionPath(path);
+                }
+            }
+        }
+
+        /**
+         * Removes the specified selected item in the object from the
+         * object's
+         * selection.  If the specified item isn't currently selected, this
+         * method has no effect.
+         *
+         * @param i the zero-based index of selectable items
+         */
+        public void removeAccessibleSelection(int i) {
+            if (tree == null)
+                return;
+            TreeModel model = tree.getModel();
+            if (model != null) {
+                if (i >= 0 && i < getAccessibleChildrenCount()) {
+                    TreePath path = getChildTreePath(i);
+                    tree.removeSelectionPath(path);
+                }
+            }
+        }
+
+        /**
+         * Clears the selection in the object, so that nothing in the
+         * object is selected.
+         */
+        public void clearAccessibleSelection() {
+            int childCount = getAccessibleChildrenCount();
+            for (int i = 0; i < childCount; i++) {
+                removeAccessibleSelection(i);
+            }
+        }
+
+        /**
+         * Causes every selected item in the object to be selected
+         * if the object supports multiple selections.
+         */
+        public void selectAllAccessibleSelection() {
+            if (tree == null)
+                return;
+            TreeModel model = tree.getModel();
+            if (model != null) {
+                int childCount = getAccessibleChildrenCount();
+                TreePath path;
+                for (int i = 0; i < childCount; i++) {
+                    path = getChildTreePath(i);
+                    tree.addSelectionPath(path);
+                }
+            }
+        }
+
+            // AccessibleAction methods
+
+        /**
+         * Returns the number of accessible actions available in this
+         * tree node.  If this node is not a leaf, there is at least
+         * one action (toggle expand), in addition to any available
+         * on the object behind the TreeCellRenderer.
+         *
+         * @return the number of Actions in this object
+         */
+        public int getAccessibleActionCount() {
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (ac != null) {
+                AccessibleAction aa = ac.getAccessibleAction();
+                if (aa != null) {
+                    return (aa.getAccessibleActionCount() + (isLeaf ? 0 : 1));
+                }
+            }
+            return isLeaf ? 0 : 1;
+        }
+
+        /**
+         * Return a description of the specified action of the tree node.
+         * If this node is not a leaf, there is at least one action
+         * description (toggle expand), in addition to any available
+         * on the object behind the TreeCellRenderer.
+         *
+         * @param i zero-based index of the actions
+         * @return a description of the action
+         */
+        public String getAccessibleActionDescription(int i) {
+            if (i < 0 || i >= getAccessibleActionCount()) {
+                return null;
+            }
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (i == 0) {
+                // TIGER - 4766636
+                // return AccessibleAction.TOGGLE_EXPAND;
+                return "toggle expand";
+            } else if (ac != null) {
+                AccessibleAction aa = ac.getAccessibleAction();
+                if (aa != null) {
+                    return aa.getAccessibleActionDescription(i - 1);
+                }
+            }
+            return null;
+        }
+
+        /**
+         * Perform the specified Action on the tree node.  If this node
+         * is not a leaf, there is at least one action which can be
+         * done (toggle expand), in addition to any available on the
+         * object behind the TreeCellRenderer.
+         *
+         * @param i zero-based index of actions
+         * @return true if the the action was performed; else false.
+         */
+        public boolean doAccessibleAction(int i) {
+            if (i < 0 || i >= getAccessibleActionCount()) {
+                return false;
+            }
+            AccessibleContext ac = getCurrentAccessibleContext();
+            if (i == 0) {
+                if (tree.isExpanded(path)) {
+                    tree.collapsePath(path);
+                } else {
+                    tree.expandPath(path);
+                }
+                return true;
+            } else if (ac != null) {
+                AccessibleAction aa = ac.getAccessibleAction();
+                if (aa != null) {
+                    return aa.doAccessibleAction(i - 1);
+                }
+            }
+            return false;
+        }
+
+    } // inner class AccessibleJTreeNode
+
+    /**
+     * A helper class to perform {@code Callable} objects on the event dispatch thread appropriate
+     * for the provided {@code AccessibleContext}.
+     */
+    private static class InvocationUtils {
+
+        /**
+         * Invokes a {@code Callable} in the {@code AppContext} of the given {@code Accessible}
+         * and waits for it to finish blocking the caller thread.
+         *
+         * @param callable   the {@code Callable} to invoke
+         * @param accessible the {@code Accessible} which would be used to find the right context
+         *                   for the task execution
+         * @param <T> type parameter for the result value
+         *
+         * @return the result of the {@code Callable} execution
+         */
+        public static <T> T invokeAndWait(final Callable<T> callable,
+                                          final Accessible accessible) {
+            if (accessible instanceof Component) {
+                return invokeAndWait(callable, (Component)accessible);
+            }
+            if (accessible instanceof AccessibleContext) {
+                // This case also covers the Translator
+                return invokeAndWait(callable, (AccessibleContext)accessible);
+            }
+            throw new RuntimeException("Unmapped Accessible used to dispatch event: " + accessible);
+        }
+
+        /**
+         * Invokes a {@code Callable} in the {@code AppContext} of the given {@code Component}
+         * and waits for it to finish blocking the caller thread.
+         *
+         * @param callable  the {@code Callable} to invoke
+         * @param component the {@code Component} which would be used to find the right context
+         *                  for the task execution
+         * @param <T> type parameter for the result value
+         *
+         * @return the result of the {@code Callable} execution
+         */
+        public static <T> T invokeAndWait(final Callable<T> callable,
+                                          final Component component) {
+            return invokeAndWait(callable, SunToolkit.targetToAppContext(component));
+        }
+
+        /**
+         * Invokes a {@code Callable} in the {@code AppContext} mapped to the given {@code AccessibleContext}
+         * and waits for it to finish blocking the caller thread.
+         *
+         * @param callable the {@code Callable} to invoke
+         * @param accessibleContext the {@code AccessibleContext} which would be used to determine the right
+         *                          context for the task execution.
+         * @param <T> type parameter for the result value
+         *
+         * @return the result of the {@code Callable} execution
+         */
+        public static <T> T invokeAndWait(final Callable<T> callable,
+                                          final AccessibleContext accessibleContext) {
+            AppContext targetContext = AWTAccessor.getAccessibleContextAccessor()
+                    .getAppContext(accessibleContext);
+            if (targetContext != null) {
+                return invokeAndWait(callable, targetContext);
+            } else {
+                // Normally this should not happen, unmapped context provided and
+                // the target AppContext is unknown.
+
+                // Try to recover in case the context is a translator.
+                if (accessibleContext instanceof Translator) {
+                    Object source = ((Translator)accessibleContext).getSource();
+                    if (source instanceof Component) {
+                        return invokeAndWait(callable, (Component)source);
+                    }
+                }
+            }
+            throw new RuntimeException("Unmapped AccessibleContext used to dispatch event: " + accessibleContext);
+        }
+
+        private static <T> T invokeAndWait(final Callable<T> callable,
+                                           final AppContext targetAppContext) {
+            final CallableWrapper<T> wrapper = new CallableWrapper<T>(callable);
+            try {
+                invokeAndWait(wrapper, targetAppContext);
+                T result = wrapper.getResult();
+                updateAppContextMap(result, targetAppContext);
+                return result;
+            } catch (final Exception e) {
+                throw new RuntimeException(e);
+            }
+        }
+
+        private static void invokeAndWait(final Runnable runnable,
+                                        final AppContext appContext)
+                throws InterruptedException, InvocationTargetException {
+
+            EventQueue eq = SunToolkit.getSystemEventQueueImplPP(appContext);
+            Object lock = new Object();
+            Toolkit source = Toolkit.getDefaultToolkit();
+            InvocationEvent event =
+                    new InvocationEvent(source, runnable, lock, true);
+            synchronized (lock) {
+                eq.postEvent(event);
+                lock.wait();
+            }
+
+            Throwable eventThrowable = event.getThrowable();
+            if (eventThrowable != null) {
+                throw new InvocationTargetException(eventThrowable);
+            }
+        }
+
+        /**
+         * Maps the {@code AccessibleContext} to the {@code AppContext} which should be used
+         * to dispatch events related to the {@code AccessibleContext}
+         * @param accessibleContext the {@code AccessibleContext} for the mapping
+         * @param targetContext the {@code AppContext} for the mapping
+         */
+        public static void registerAccessibleContext(final AccessibleContext accessibleContext,
+                                                     final AppContext targetContext) {
+            if (accessibleContext != null) {
+                AWTAccessor.getAccessibleContextAccessor().setAppContext(accessibleContext, targetContext);
+            }
+        }
+
+        private static <T> void updateAppContextMap(final T accessibleContext,
+                                                    final AppContext targetContext) {
+            if (accessibleContext instanceof AccessibleContext) {
+                registerAccessibleContext((AccessibleContext)accessibleContext, targetContext);
+            }
+        }
+
+        private static class CallableWrapper<T> implements Runnable {
+            private final Callable<T> callable;
+            private volatile T object;
+            private Exception e;
+
+            CallableWrapper(final Callable<T> callable) {
+                this.callable = callable;
+            }
+
+            public void run() {
+                try {
+                    if (callable != null) {
+                        object = callable.call();
+                    }
+                } catch (final Exception e) {
+                    this.e = e;
+                }
+            }
+
+            T getResult() throws Exception {
+                if (e != null)
+                    throw e;
+                return object;
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/ProviderImpl.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2015, 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.java.accessibility.internal;
+
+import javax.accessibility.AccessibilityProvider;
+
+/* This class provided methods to identify and activate the mapping from the
+ * JavaAccessBridge API to the Java Accessibility API.
+ */
+public final class ProviderImpl extends AccessibilityProvider {
+    /**
+     * Typically the service name returned by the name() method would be a simple
+     * name such as JavaAccessBridge, but the following name is used for compatibility
+     * with prior versions of ${user.home}/.accessibility.properties and
+     * ${java.home}/conf/accessibility.properties where the text on the
+     * assistive.technologies= line is a fully qualified class name. As of Java 9
+     * class names are no longer used to identify assistive technology implementations.
+     * If the properties file exists the installer will not replace it thus the
+     * need for compatibility.
+     */
+    private final String name = "com.sun.java.accessibility.AccessBridge";
+
+    public ProviderImpl() {}
+
+    public String getName() {
+        return name;
+    }
+
+    public void activate() {
+        /**
+         * Note that the AccessBridge is instantiated here rather than in the
+         * constructor.  If the caller determines that this object is named
+         * "com.sun.java.accessibility.AccessBridge" then the caller will call
+         * start to instantiate the AccessBridge which will in turn activate it.
+         */
+        new AccessBridge();
+    }
+
+}
--- a/jdk/src/jdk.accessibility/windows/native/libjabsysinfo/AccessBridgeSysInfo.cpp	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/jdk.accessibility/windows/native/libjabsysinfo/AccessBridgeSysInfo.cpp	Tue Aug 25 12:19:46 2015 -0700
@@ -37,7 +37,7 @@
 
 // Determine bitness of Win OS
 JNIEXPORT jboolean JNICALL
-Java_com_sun_java_accessibility_AccessBridge_isSysWow(JNIEnv *env, jobject callingObj) {
+Java_com_sun_java_accessibility_internal_AccessBridge_isSysWow(JNIEnv *env, jobject callingObj) {
     BOOL bIsWow64 = FALSE;
     typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
 
--- a/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeJavaEntryPoints.cpp	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeJavaEntryPoints.cpp	Tue Aug 25 12:19:46 2015 -0700
@@ -103,7 +103,7 @@
 
     PrintDebugString("Calling BuildJavaEntryPoints():");
 
-    FIND_CLASS(bridgeClass, "com/sun/java/accessibility/AccessBridge");
+    FIND_CLASS(bridgeClass, "com/sun/java/accessibility/internal/AccessBridge");
 
     // ------- general methods
 
--- a/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp	Tue Aug 25 12:19:46 2015 -0700
@@ -30,7 +30,7 @@
 
 #include "AccessBridgeDebug.h"
 #include "JavaAccessBridge.h"
-#include "com_sun_java_accessibility_AccessBridge.h" // programatically generated by JNI
+#include "com_sun_java_accessibility_internal_AccessBridge.h" // programatically generated by JNI
 #include "accessBridgeResource.h"
 #include "accessBridgeCallbacks.h"
 #include "AccessBridgeMessages.h"
@@ -84,7 +84,7 @@
      *
      */
     JNIEXPORT void JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_runDLL(JNIEnv *env, jobject obj) {
+    Java_com_sun_java_accessibility_internal_AccessBridge_runDLL(JNIEnv *env, jobject obj) {
         PrintDebugString("\r\nJavaAccessBridge.DLL runDLL() called");
         theJavaAccessBridge->javaRun(env, obj);
     }
@@ -1711,7 +1711,7 @@
                                           jobject event, jobject source,
                                           jint oldValue, jint newValue) {
 
-    PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyCaretChanged(%p, %p, %p, %p, %d, %d)",
+    PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyCaretChanged(%p, %p, %p, %p, %d, %d)",
                      env, callingObj, event,
                      source, oldValue, newValue);
 
@@ -1765,7 +1765,7 @@
                                                 jobject event, jobject source,
                                                 jstring oldValue, jstring newValue){
 
-    PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyDescriptionChanged(%p, %p, %p, %p, %p, %p)",
+    PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyDescriptionChanged(%p, %p, %p, %p, %p, %p)",
                      env, callingObj, event,
                      source, oldValue, newValue);
 
@@ -1851,7 +1851,7 @@
                                          jobject event, jobject source,
                                          jstring oldValue, jstring newValue){
 
-    PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyNameChanged(%p, %p, %p, %p, %p, %p)",
+    PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyNameChanged(%p, %p, %p, %p, %p, %p)",
                      env, callingObj, event,
                      source, oldValue, newValue);
 
@@ -1937,7 +1937,7 @@
 JavaAccessBridge::firePropertySelectionChange(JNIEnv *env, jobject callingObj,
                                               jobject event, jobject source) {
 
-    PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertySelectionChanged(%p, %p, %p, %p)",
+    PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertySelectionChanged(%p, %p, %p, %p)",
                      env, callingObj, event, source);
 
     // sanity check
@@ -1988,7 +1988,7 @@
                                           jobject event, jobject source,
                                           jstring oldValue, jstring newValue){
 
-    PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyStateChanged(%p, %p, %p, %p, %p, %p)",
+    PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyStateChanged(%p, %p, %p, %p, %p, %p)",
                      env, callingObj, event,
                      source, oldValue, newValue);
 
@@ -2074,7 +2074,7 @@
 JavaAccessBridge::firePropertyTextChange(JNIEnv *env, jobject callingObj,
                                          jobject event, jobject source) {
 
-    PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyTextChanged(%p, %p, %p, %p)",
+    PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyTextChanged(%p, %p, %p, %p)",
                      env, callingObj, event, source);
 
     // sanity check
@@ -2125,7 +2125,7 @@
                                           jobject event, jobject source,
                                           jstring oldValue, jstring newValue){
 
-    PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyValueChanged(%p, %p, %p, %p, %p, %p)",
+    PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyValueChanged(%p, %p, %p, %p, %p, %p)",
                      env, callingObj, event,
                      source, oldValue, newValue);
 
@@ -2210,7 +2210,7 @@
 JavaAccessBridge::firePropertyVisibleDataChange(JNIEnv *env, jobject callingObj,
                                                 jobject event, jobject source) {
 
-    PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyVisibleDataChanged(%p, %p, %p, %p)",
+    PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyVisibleDataChanged(%p, %p, %p, %p)",
                      env, callingObj, event, source);
 
     // sanity check
@@ -2261,7 +2261,7 @@
                                           jobject event, jobject source,
                                           jobject oldValue, jobject newValue){
 
-    PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyChildPropertyChanged(%p, %p, %p, %p, %p, %p)",
+    PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyChildPropertyChanged(%p, %p, %p, %p, %p, %p)",
                      env, callingObj, event,
                      source, oldValue, newValue);
 
@@ -2319,7 +2319,7 @@
                                                      jobject event, jobject source,
                                                      jobject oldValue, jobject newValue){
 
-    PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyActiveDescendentPropertyChanged(%p, %p, %p, %p, %p, %p)",
+    PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyActiveDescendentPropertyChanged(%p, %p, %p, %p, %p, %p)",
                      env, callingObj, event,
                      source, oldValue, newValue);
 
@@ -2376,7 +2376,7 @@
                                                jobject event, jobject source,
                                                jstring oldValue, jstring newValue){
 
-    PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyTableModelChange(%p, %p, %p, %p, %p, %p)",
+    PrintDebugString("\r\nJava_com_sun_java_accessibility_internal_AccessBridge_propertyTableModelChange(%p, %p, %p, %p, %p, %p)",
                      env, callingObj, event,
                      source, oldValue, newValue);
 
@@ -2557,7 +2557,7 @@
 extern "C" {        // event stuff from AccessBridge.h, generated by JNI
 
     JNIEXPORT void JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_sendDebugString(JNIEnv *env, jobject callingObj, jstring debugStr) {
+    Java_com_sun_java_accessibility_internal_AccessBridge_sendDebugString(JNIEnv *env, jobject callingObj, jstring debugStr) {
 
         const wchar_t *stringBytes;
         stringBytes = (const wchar_t *) env->GetStringChars(debugStr, 0);
@@ -2575,7 +2575,7 @@
     }
 
     JNIEXPORT void JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_propertyCaretChange(JNIEnv *env, jobject callingObj,
+    Java_com_sun_java_accessibility_internal_AccessBridge_propertyCaretChange(JNIEnv *env, jobject callingObj,
                                                                         jobject event, jobject source,
                                                                         jint oldValue, jint newValue) {
         theJavaAccessBridge->firePropertyCaretChange(env, callingObj,
@@ -2584,7 +2584,7 @@
     }
 
     JNIEXPORT void JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_propertyDescriptionChange(JNIEnv *env, jobject callingObj,
+    Java_com_sun_java_accessibility_internal_AccessBridge_propertyDescriptionChange(JNIEnv *env, jobject callingObj,
                                                                             jobject event, jobject source,
                                                                             jstring oldValue, jstring newValue) {
         theJavaAccessBridge->firePropertyDescriptionChange(env, callingObj,
@@ -2593,7 +2593,7 @@
     }
 
     JNIEXPORT void JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_propertyNameChange(JNIEnv *env, jobject callingObj,
+    Java_com_sun_java_accessibility_internal_AccessBridge_propertyNameChange(JNIEnv *env, jobject callingObj,
                                                                     jobject event, jobject source,
                                                                     jstring oldValue, jstring newValue) {
         theJavaAccessBridge->firePropertyNameChange(env, callingObj,
@@ -2602,14 +2602,14 @@
     }
 
     JNIEXPORT void JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_propertySelectionChange(JNIEnv *env, jobject callingObj,
+    Java_com_sun_java_accessibility_internal_AccessBridge_propertySelectionChange(JNIEnv *env, jobject callingObj,
                                                                             jobject event, jobject source) {
         theJavaAccessBridge->firePropertySelectionChange(env, callingObj,
                                                             event, source);
     }
 
     JNIEXPORT void JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_propertyStateChange(JNIEnv *env, jobject callingObj,
+    Java_com_sun_java_accessibility_internal_AccessBridge_propertyStateChange(JNIEnv *env, jobject callingObj,
                                                                         jobject event, jobject source,
                                                                         jstring oldValue, jstring newValue) {
         theJavaAccessBridge->firePropertyStateChange(env, callingObj,
@@ -2618,14 +2618,14 @@
     }
 
     JNIEXPORT void JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_propertyTextChange(JNIEnv *env, jobject callingObj,
+    Java_com_sun_java_accessibility_internal_AccessBridge_propertyTextChange(JNIEnv *env, jobject callingObj,
                                                                     jobject event,  jobject source) {
         theJavaAccessBridge->firePropertyTextChange(env, callingObj,
                                                     event, source);
     }
 
     JNIEXPORT void JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_propertyValueChange(JNIEnv *env, jobject callingObj,
+    Java_com_sun_java_accessibility_internal_AccessBridge_propertyValueChange(JNIEnv *env, jobject callingObj,
                                                                         jobject event, jobject source,
                                                                         jstring oldValue, jstring newValue) {
         theJavaAccessBridge->firePropertyValueChange(env, callingObj,
@@ -2634,14 +2634,14 @@
     }
 
     JNIEXPORT void JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_propertyVisibleDataChange(JNIEnv *env, jobject callingObj,
+    Java_com_sun_java_accessibility_internal_AccessBridge_propertyVisibleDataChange(JNIEnv *env, jobject callingObj,
                                                                             jobject event,  jobject source) {
         theJavaAccessBridge->firePropertyVisibleDataChange(env, callingObj,
                                                             event, source);
     }
 
     JNIEXPORT void JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_propertyChildChange(JNIEnv *env, jobject callingObj,
+    Java_com_sun_java_accessibility_internal_AccessBridge_propertyChildChange(JNIEnv *env, jobject callingObj,
                                                                         jobject event, jobject source,
                                                                         jobject oldValue, jobject newValue) {
         theJavaAccessBridge->firePropertyChildChange(env, callingObj,
@@ -2650,7 +2650,7 @@
     }
 
     JNIEXPORT void JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_propertyActiveDescendentChange(JNIEnv *env, jobject callingObj,
+    Java_com_sun_java_accessibility_internal_AccessBridge_propertyActiveDescendentChange(JNIEnv *env, jobject callingObj,
                                                                                 jobject event,  jobject source,
                                                                                 jobject oldValue,
                                                                                 jobject newValue) {
@@ -2660,7 +2660,7 @@
     }
 
     JNIEXPORT void JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_propertyTableModelChange(JNIEnv *env, jobject callingObj,
+    Java_com_sun_java_accessibility_internal_AccessBridge_propertyTableModelChange(JNIEnv *env, jobject callingObj,
                                                                             jobject event,  jobject source,
                                                                             jstring oldValue, jstring newValue) {
 
@@ -2677,34 +2677,34 @@
 
 
     JNIEXPORT void JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_javaShutdown(JNIEnv *env, jobject callingObj) {
+    Java_com_sun_java_accessibility_internal_AccessBridge_javaShutdown(JNIEnv *env, jobject callingObj) {
         theJavaAccessBridge->javaShutdown(env, callingObj);
     }
 
-    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_AccessBridge_focusGained, fireFocusGained)
-    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_AccessBridge_focusLost, fireFocusLost)
-    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_AccessBridge_caretUpdate, fireCaretUpdate)
-    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_AccessBridge_mouseClicked, fireMouseClicked)
-    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_AccessBridge_mouseEntered, fireMouseEntered)
-    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_AccessBridge_mouseExited, fireMouseExited)
-    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_AccessBridge_mousePressed, fireMousePressed)
-    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_AccessBridge_mouseReleased, fireMouseReleased)
-    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_AccessBridge_menuCanceled, fireMenuCanceled)
-    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_AccessBridge_menuDeselected, fireMenuDeselected)
-    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_AccessBridge_menuSelected, fireMenuSelected)
-    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_AccessBridge_popupMenuCanceled, firePopupMenuCanceled)
-    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_AccessBridge_popupMenuWillBecomeInvisible, firePopupMenuWillBecomeInvisible)
-    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_AccessBridge_popupMenuWillBecomeVisible, firePopupMenuWillBecomeVisible)
+    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_internal_AccessBridge_focusGained, fireFocusGained)
+    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_internal_AccessBridge_focusLost, fireFocusLost)
+    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_internal_AccessBridge_caretUpdate, fireCaretUpdate)
+    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_internal_AccessBridge_mouseClicked, fireMouseClicked)
+    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_internal_AccessBridge_mouseEntered, fireMouseEntered)
+    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_internal_AccessBridge_mouseExited, fireMouseExited)
+    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_internal_AccessBridge_mousePressed, fireMousePressed)
+    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_internal_AccessBridge_mouseReleased, fireMouseReleased)
+    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_internal_AccessBridge_menuCanceled, fireMenuCanceled)
+    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_internal_AccessBridge_menuDeselected, fireMenuDeselected)
+    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_internal_AccessBridge_menuSelected, fireMenuSelected)
+    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_internal_AccessBridge_popupMenuCanceled, firePopupMenuCanceled)
+    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_internal_AccessBridge_popupMenuWillBecomeInvisible, firePopupMenuWillBecomeInvisible)
+    HANDLE_STANDARD_EVENT_FROM_JAVA(Java_com_sun_java_accessibility_internal_AccessBridge_popupMenuWillBecomeVisible, firePopupMenuWillBecomeVisible)
 
     /*
      * Map a HWND to a Java component
      *
-     * Class:     com_sun_java_accessibility_AccessBridge
+     * Class:     com_sun_java_accessibility_internal_AccessBridge
      * Method:    jawtGetComponentFromNativeWindowHandle
      * Signature: (I)Ljava/awt/Component;
      */
     JNIEXPORT jobject JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_jawtGetComponentFromNativeWindowHandle
+    Java_com_sun_java_accessibility_internal_AccessBridge_jawtGetComponentFromNativeWindowHandle
         (JNIEnv *env, jobject callingObj, jint windowHandle) {
 
     JAWT awt;
@@ -2726,12 +2726,12 @@
     /*
      * Map a Java component to a HWND
      *
-     * Class:     com_sun_java_accessibility_AccessBridge
+     * Class:     com_sun_java_accessibility_internal_AccessBridge
      * Method:    jawtGetNativeWindowHandleFromComponent
      * Signature: (Ljava/awt/Component;)I
      */
     JNIEXPORT jint JNICALL
-    Java_com_sun_java_accessibility_AccessBridge_jawtGetNativeWindowHandleFromComponent
+    Java_com_sun_java_accessibility_internal_AccessBridge_jawtGetNativeWindowHandleFromComponent
         (JNIEnv *env, jobject callingObj, jobject component) {
 
         JAWT awt;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/java/accessibility/util/8051626/Bug8051626.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8051626
+ * @summary Ensure no failure when using Java Accessibility Utility with security manager
+ * @modules java.desktop jdk.accessibility
+ *
+ * @run main/othervm Bug8051626
+ */
+
+import com.sun.java.accessibility.util.AWTEventMonitor;
+import java.awt.Dimension;
+import java.lang.reflect.InvocationTargetException;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.SwingUtilities;
+
+public class Bug8051626 {
+
+    public static void main(final String[] args) throws InterruptedException,
+                                                        InvocationTargetException {
+            final Bug8051626 app = new Bug8051626();
+            app.test();
+        }
+
+    private void test() throws InterruptedException, InvocationTargetException {
+        System.setSecurityManager(new SecurityManager());
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                final JFrame frame = new JFrame("Bug 8051626");
+                try {
+                    final JPanel panel = new JPanel();
+                    final JButton okButton = new JButton("OK");
+                    panel.add(okButton);
+                    frame.getContentPane().add(panel);
+                    frame.setMinimumSize(new Dimension(300, 180));
+                    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                    frame.pack();
+                    frame.setLocation(400, 300);
+                    frame.setVisible(true);
+                    // If the security manager is on this should not cause an exception.
+                    // Prior to the 8051626 fix it would as follows:
+                    // java.security.AccessControlException:
+                    //   access denied ("java.lang.RuntimePermission" "accessClassInPackage.com.sun.java.accessibility.util")
+                    AWTEventMonitor.getComponentWithFocus();
+                } finally {
+                    frame.dispose();
+                }
+            }
+        });
+    }
+
+}
--- a/jdk/test/com/sun/java/swing/plaf/windows/WindowsRadioButtonUI/7089914/bug7089914.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/test/com/sun/java/swing/plaf/windows/WindowsRadioButtonUI/7089914/bug7089914.java	Tue Aug 25 12:19:46 2015 -0700
@@ -27,6 +27,8 @@
 
 /* @test
  * @bug 7089914
+ * @requires (os.family == "windows")
+ * @modules java.desktop/com.sun.java.swing.plaf.windows
  * @summary Focus on image icons are not visible in javaws cache with high contrast mode
  * @author Sean Chou
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Debug/DumpOnKey/DumpOnKey.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+import java.awt.AWTException;
+import java.awt.Frame;
+import java.awt.Robot;
+import java.awt.Window;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.io.PrintStream;
+
+/**
+ * @test
+ * @bug 4379403
+ * @run main/othervm DumpOnKey false
+ * @run main/othervm DumpOnKey -Dsun.awt.nativedebug=true true
+ * @run main/othervm DumpOnKey -Dsun.awt.nativedebug=true -Dawtdebug.on=true true
+ * @run main/othervm DumpOnKey -Dsun.awt.nativedebug=false -Dawtdebug.on=true false
+ * @run main/othervm DumpOnKey -Dsun.awt.nativedebug=true -Dawtdebug.on=false false
+ * @run main/othervm DumpOnKey -Dsun.awt.nativedebug=false -Dawtdebug.on=false false
+ * @run main/othervm/java.security.policy=dump.policy/secure=java.lang.SecurityManager DumpOnKey -Dsun.awt.nativedebug=true true
+ * @run main/othervm/java.security.policy=dump.policy/secure=java.lang.SecurityManager DumpOnKey -Dsun.awt.nativedebug=true -Dawtdebug.on=false false
+ */
+public final class DumpOnKey {
+
+    private static volatile boolean dumped;
+
+    public static void main(final String[] args) throws AWTException {
+        final boolean dump = Boolean.parseBoolean(args[0]);
+        final Window w = new Frame() {
+            @Override
+            public void list(final PrintStream out, final int indent) {
+                super.list(out, indent);
+                dumped = true;
+            }
+        };
+        w.setSize(200, 200);
+        w.setLocationRelativeTo(null);
+        w.setVisible(true);
+
+        final Robot robot = new Robot();
+        robot.setAutoDelay(50);
+        robot.setAutoWaitForIdle(true);
+        robot.mouseMove(w.getX() + w.getWidth() / 2,
+                        w.getY() + w.getHeight() / 2);
+        robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
+
+        robot.keyPress(KeyEvent.VK_CONTROL);
+        robot.keyPress(KeyEvent.VK_SHIFT);
+        robot.keyPress(KeyEvent.VK_F1);
+        robot.keyRelease(KeyEvent.VK_F1);
+        robot.keyRelease(KeyEvent.VK_SHIFT);
+        robot.keyRelease(KeyEvent.VK_CONTROL);
+
+        w.dispose();
+        if (dumped != dump) {
+            throw new RuntimeException("Exp:" + dump + ", actual:" + dumped);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Debug/DumpOnKey/dump.policy	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,3 @@
+grant {
+    permission java.awt.AWTPermission "createRobot";
+};
--- a/jdk/test/java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/test/java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java	Tue Aug 25 12:19:46 2015 -0700
@@ -46,11 +46,8 @@
     private static Robot robot;
 
     public ShapeNotSetSometimes() throws Exception {
-        EventQueue.invokeAndWait(new Runnable() {
-            public void run() {
-                initializeGUI();
-            }
-        });
+        EventQueue.invokeAndWait(this::initializeGUI);
+        robot.waitForIdle();
     }
 
     private void initializeGUI() {
@@ -119,7 +116,7 @@
     public static void main(String[] args) throws Exception {
         robot = new Robot();
 
-        for(int i = 0; i < 100; i++) {
+        for(int i = 0; i < 50; i++) {
             System.out.println("Attempt " + i);
             new ShapeNotSetSometimes().doTest();
         }
@@ -134,11 +131,7 @@
         robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
         robot.delay(500);
 
-        EventQueue.invokeAndWait(new Runnable() {
-            public void run() {
-                window.requestFocus();
-            }
-        });
+        EventQueue.invokeAndWait(window::requestFocus);
 
         robot.waitForIdle();
         try {
--- a/jdk/test/java/awt/Modal/LWModalTest/LWModalTest.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/test/java/awt/Modal/LWModalTest/LWModalTest.java	Tue Aug 25 12:19:46 2015 -0700
@@ -40,8 +40,6 @@
 
 import javax.swing.*;
 
-import sun.awt.*;
-
 import test.java.awt.regtesthelpers.Util;
 
 public class LWModalTest
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Mouse/MouseWheelAbsXY/MouseWheelAbsXY.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+import java.awt.AWTException;
+import java.awt.Frame;
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
+import java.awt.Robot;
+import java.awt.Window;
+import java.awt.event.InputEvent;
+
+import static java.awt.GraphicsEnvironment.*;
+
+/**
+ * @test
+ * @bug 6778087
+ */
+public final class MouseWheelAbsXY {
+
+    private static boolean done;
+    private static int wheelX;
+    private static int wheelY;
+    private static int mouseX;
+    private static int mouseY;
+
+    public static void main(final String[] args) throws AWTException {
+        GraphicsEnvironment ge = getLocalGraphicsEnvironment();
+        GraphicsDevice[] sds = ge.getScreenDevices();
+        for (GraphicsDevice gd : sds) {
+            test(gd.getDefaultConfiguration());
+        }
+    }
+
+    private static void test(GraphicsConfiguration gc) throws AWTException {
+        final Window frame = new Frame(gc);
+        try {
+            frame.addMouseWheelListener(e -> {
+                wheelX = e.getXOnScreen();
+                wheelY = e.getYOnScreen();
+                done = true;
+            });
+            frame.setSize(300, 300);
+            frame.setVisible(true);
+
+            final Robot robot = new Robot();
+            robot.setAutoDelay(50);
+            robot.setAutoWaitForIdle(true);
+            mouseX = frame.getX() + frame.getWidth() / 2;
+            mouseY = frame.getY() + frame.getHeight() / 2;
+
+            robot.mouseMove(mouseX, mouseY);
+            robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
+            robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
+            robot.mouseWheel(10);
+
+            validate();
+        } finally {
+            frame.dispose();
+        }
+    }
+
+    private static void validate() {
+        if (!done || wheelX != mouseX || wheelY != mouseY) {
+            System.err.println("Expected X: " + mouseX);
+            System.err.println("Expected Y: " + mouseY);
+            System.err.println("Actual X: " + wheelX);
+            System.err.println("Actual Y: " + wheelY);
+            throw new RuntimeException("Test failed");
+        }
+    }
+}
--- a/jdk/test/java/awt/TextArea/TextAreaCaretVisibilityTest/bug7129742.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/test/java/awt/TextArea/TextAreaCaretVisibilityTest/bug7129742.java	Tue Aug 25 12:19:46 2015 -0700
@@ -29,8 +29,10 @@
 /* @test
  * @bug 7129742
  * @summary Focus in non-editable TextArea is not shown on Linux.
+ * @requires (os.family == "linux" | os.name == "solaris")
  * @modules java.desktop/sun.awt
  *          java.desktop/java.awt.peer
+ *          java.desktop/sun.awt.X11
  * @author Sean Chou
  */
 
--- a/jdk/test/java/awt/WMSpecificTests/Metacity/FullscreenDialogModality.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/test/java/awt/WMSpecificTests/Metacity/FullscreenDialogModality.java	Tue Aug 25 12:19:46 2015 -0700
@@ -25,6 +25,8 @@
  * @test
  * @bug 8012586
  * @summary verify that modal dialog will appeared above fullscreen window under Metacity WM.
+ * @requires (os.name == "linux" | os.name == "solaris")
+ * @modules java.desktop/sun.awt.X11
  * @library ../../regtesthelpers
  * @build Util
  * @run main FullscreenDialogModality
--- a/jdk/test/java/awt/WMSpecificTests/Mutter/MutterMaximizeTest.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/test/java/awt/WMSpecificTests/Mutter/MutterMaximizeTest.java	Tue Aug 25 12:19:46 2015 -0700
@@ -28,6 +28,8 @@
   @bug      7043963
   @summary  Tests  that the screen location of windows is
             updated properly after a maximize.
+  @requires (os.name == "linux" | os.name == "solaris")
+  @modules java.desktop/sun.awt.X11
   @author   Denis Lila
   @library  ../../regtesthelpers
   @build    Util
--- a/jdk/test/java/awt/Window/TranslucentJAppletTest/TranslucentJAppletTest.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/test/java/awt/Window/TranslucentJAppletTest/TranslucentJAppletTest.java	Tue Aug 25 12:19:46 2015 -0700
@@ -100,12 +100,10 @@
         if (!paintComponentCalled) {
             throw new RuntimeException("Test FAILED: panel's paintComponent() method is not called");
         }
+        Thread.sleep(1500);
 
         Color newColor1 = r.getPixelColor(100, 100);
-        // unfortunately, robot.getPixelColor() doesn't work for some unknown reason
-        // Color newColor2 = r.getPixelColor(200, 200);
-        BufferedImage bim = r.createScreenCapture(new Rectangle(200, 200, 1, 1));
-        Color newColor2 = new Color(bim.getRGB(0, 0));
+        Color newColor2 = r.getPixelColor(200, 200);
 
         // Frame must be transparent at (100, 100) in screen coords
         if (!color1.equals(newColor1)) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/datatransfer/DataFlavor/XJavaUrlDataFlavorTest/XJavaUrlDataFlavorTest.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,345 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+/*
+  @test
+  @bug 8081787
+  @summary MalformedURLException is thrown during reading data for application/x-java-url;class=java.net.URL flavor
+  @author Mikhail Cherkasov
+  @run main/manual XJavaUrlDataFlavorTest
+*/
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.datatransfer.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.net.URL;
+
+public class XJavaUrlDataFlavorTest {
+    private static void init() {
+        String[] instructions =
+                {"Test for MacOS X only:",
+                        "1. The aim is to test that java works fine with \"application/" +
+                                "x-java-url;class=java.net.URL\"falvor.",
+                        "2. Open finder and select any file.",
+                        "3. Press CMD+C or press \"Copy\" in context menu",
+                        "4. Focus window with \"Test\" Button.",
+                        "5. If you see URL for selected file, then test PASSED,",
+                        "otherwise test FAILED."
+                };
+
+        Sysout.createDialog();
+        Sysout.printInstructions(instructions);
+
+        final Frame frame = new Frame();
+        Panel panel = new Panel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS));
+
+        frame.add(panel);
+        Button testButton = new Button("Test");
+        final TextField textField = new TextField(40);
+        testButton.addActionListener(new AbstractAction() {
+            @Override
+            public void actionPerformed(ActionEvent ae) {
+                try {
+                    Clipboard board = Toolkit.getDefaultToolkit().getSystemClipboard();
+                    URL url = (URL)board.getData(new DataFlavor("application/x-java-url;class=java.net.URL"));
+                    textField.setText(url.toString());
+                } catch (Exception e) {
+                    throw new RuntimeException(e);
+                }
+            }
+        });
+        panel.add(testButton);
+        panel.add(textField);
+        frame.setBounds(200, 200, 400, 400);
+        frame.setVisible(true);
+
+    }//End  init()
+
+
+    /*****************************************************
+     * Standard Test Machinery Section
+     * DO NOT modify anything in this section -- it's a
+     * standard chunk of code which has all of the
+     * synchronisation necessary for the test harness.
+     * By keeping it the same in all tests, it is easier
+     * to read and understand someone else's test, as
+     * well as insuring that all tests behave correctly
+     * with the test harness.
+     * There is a section following this for test-defined
+     * classes
+     ******************************************************/
+    private static boolean theTestPassed = false;
+    private static boolean testGeneratedInterrupt = false;
+    private static String failureMessage = "";
+
+    private static Thread mainThread = null;
+
+    private static int sleepTime = 300000;
+
+    public static void main(String args[]) throws InterruptedException {
+        mainThread = Thread.currentThread();
+        try {
+            init();
+        } catch (TestPassedException e) {
+            //The test passed, so just return from main and harness will
+            // interepret this return as a pass
+            return;
+        }
+        //At this point, neither test passed nor test failed has been
+        // called -- either would have thrown an exception and ended the
+        // test, so we know we have multiple threads.
+
+        //Test involves other threads, so sleep and wait for them to
+        // called pass() or fail()
+        try {
+            Thread.sleep(sleepTime);
+            //Timed out, so fail the test
+            throw new RuntimeException("Timed out after " + sleepTime / 1000 + " seconds");
+        } catch (InterruptedException e) {
+            if (!testGeneratedInterrupt) throw e;
+
+            //reset flag in case hit this code more than once for some reason (just safety)
+            testGeneratedInterrupt = false;
+            if (theTestPassed == false) {
+                throw new RuntimeException(failureMessage);
+            }
+        }
+
+    }//main
+
+    public static synchronized void setTimeoutTo(int seconds) {
+        sleepTime = seconds * 1000;
+    }
+
+    public static synchronized void pass() {
+        Sysout.println("The test passed.");
+        Sysout.println("The test is over, hit  Ctl-C to stop Java VM");
+        //first check if this is executing in main thread
+        if (mainThread == Thread.currentThread()) {
+            //Still in the main thread, so set the flag just for kicks,
+            // and throw a test passed exception which will be caught
+            // and end the test.
+            theTestPassed = true;
+            throw new TestPassedException();
+        }
+        //pass was called from a different thread, so set the flag and interrupt
+        // the main thead.
+        theTestPassed = true;
+        testGeneratedInterrupt = true;
+        if (mainThread != null) {
+            mainThread.interrupt();
+        }
+    }//pass()
+
+    public static synchronized void fail() {
+        //test writer didn't specify why test failed, so give generic
+        fail("it just plain failed! :-)");
+    }
+
+    public static synchronized void fail(String whyFailed) {
+        Sysout.println("The test failed: " + whyFailed);
+        Sysout.println("The test is over, hit  Ctl-C to stop Java VM");
+        //check if this called from main thread
+        if (mainThread == Thread.currentThread()) {
+            //If main thread, fail now 'cause not sleeping
+            throw new RuntimeException(whyFailed);
+        }
+        theTestPassed = false;
+        testGeneratedInterrupt = true;
+        failureMessage = whyFailed;
+        mainThread.interrupt();
+    }//fail()
+
+}// class ManualMainTest
+
+//This exception is used to exit from any level of call nesting
+// when it's determined that the test has passed, and immediately
+// end the test.
+class TestPassedException extends RuntimeException {
+}
+
+//*********** End Standard Test Machinery Section **********
+
+
+/****************************************************
+ * Standard Test Machinery
+ * DO NOT modify anything below -- it's a standard
+ * chunk of code whose purpose is to make user
+ * interaction uniform, and thereby make it simpler
+ * to read and understand someone else's test.
+ ****************************************************/
+
+/**
+ This is part of the standard test machinery.
+ It creates a dialog (with the instructions), and is the interface
+ for sending text messages to the user.
+ To print the instructions, send an array of strings to Sysout.createDialog
+ WithInstructions method.  Put one line of instructions per array entry.
+ To display a message for the tester to see, simply call Sysout.println
+ with the string to be displayed.
+ This mimics System.out.println but works within the test harness as well
+ as standalone.
+ */
+
+class Sysout {
+    private static TestDialog dialog;
+    private static boolean numbering = false;
+    private static int messageNumber = 0;
+
+    public static void createDialogWithInstructions(String[] instructions) {
+        dialog = new TestDialog(new Frame(), "Instructions");
+        dialog.printInstructions(instructions);
+        dialog.setVisible(true);
+        println("Any messages for the tester will display here.");
+    }
+
+    public static void createDialog() {
+        dialog = new TestDialog(new Frame(), "Instructions");
+        String[] defInstr = {"Instructions will appear here. ", ""};
+        dialog.printInstructions(defInstr);
+        dialog.setVisible(true);
+        println("Any messages for the tester will display here.");
+    }
+
+
+    /* Enables message counting for the tester. */
+    public static void enableNumbering(boolean enable) {
+        numbering = enable;
+    }
+
+    public static void printInstructions(String[] instructions) {
+        dialog.printInstructions(instructions);
+    }
+
+
+    public static void println(String messageIn) {
+        if (numbering) {
+            messageIn = "" + messageNumber + " " + messageIn;
+            messageNumber++;
+        }
+        dialog.displayMessage(messageIn);
+    }
+
+}// Sysout  class
+
+/**
+ This is part of the standard test machinery.  It provides a place for the
+ test instructions to be displayed, and a place for interactive messages
+ to the user to be displayed.
+ To have the test instructions displayed, see Sysout.
+ To have a message to the user be displayed, see Sysout.
+ Do not call anything in this dialog directly.
+ */
+class TestDialog extends Dialog implements ActionListener {
+
+    TextArea instructionsText;
+    TextArea messageText;
+    int maxStringLength = 80;
+    Panel buttonP = new Panel();
+    Button passB = new Button("pass");
+    Button failB = new Button("fail");
+
+    //DO NOT call this directly, go through Sysout
+    public TestDialog(Frame frame, String name) {
+        super(frame, name);
+        int scrollBoth = TextArea.SCROLLBARS_BOTH;
+        instructionsText = new TextArea("", 15, maxStringLength, scrollBoth);
+        add("North", instructionsText);
+
+        messageText = new TextArea("", 5, maxStringLength, scrollBoth);
+        add("Center", messageText);
+
+        passB = new Button("pass");
+        passB.setActionCommand("pass");
+        passB.addActionListener(this);
+        buttonP.add("East", passB);
+
+        failB = new Button("fail");
+        failB.setActionCommand("fail");
+        failB.addActionListener(this);
+        buttonP.add("West", failB);
+
+        add("South", buttonP);
+        pack();
+
+        setVisible(true);
+    }// TestDialog()
+
+    //DO NOT call this directly, go through Sysout
+    public void printInstructions(String[] instructions) {
+        //Clear out any current instructions
+        instructionsText.setText("");
+
+        //Go down array of instruction strings
+
+        String printStr, remainingStr;
+        for (int i = 0; i < instructions.length; i++) {
+            //chop up each into pieces maxSringLength long
+            remainingStr = instructions[i];
+            while (remainingStr.length() > 0) {
+                //if longer than max then chop off first max chars to print
+                if (remainingStr.length() >= maxStringLength) {
+                    //Try to chop on a word boundary
+                    int posOfSpace = remainingStr.
+                            lastIndexOf(' ', maxStringLength - 1);
+
+                    if (posOfSpace <= 0) posOfSpace = maxStringLength - 1;
+
+                    printStr = remainingStr.substring(0, posOfSpace + 1);
+                    remainingStr = remainingStr.substring(posOfSpace + 1);
+                }
+                //else just print
+                else {
+                    printStr = remainingStr;
+                    remainingStr = "";
+                }
+
+                instructionsText.append(printStr + "\n");
+
+            }// while
+
+        }// for
+
+    }//printInstructions()
+
+    //DO NOT call this directly, go through Sysout
+    public void displayMessage(String messageIn) {
+        messageText.append(messageIn + "\n");
+        System.out.println(messageIn);
+    }
+
+    //catch presses of the passed and failed buttons.
+    //simply call the standard pass() or fail() static methods of
+    //ManualMainTest
+    public void actionPerformed(ActionEvent e) {
+        if (e.getActionCommand() == "pass") {
+            XJavaUrlDataFlavorTest.pass();
+        } else {
+            XJavaUrlDataFlavorTest.fail();
+        }
+    }
+
+}// TestDialog  class
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/font/FontNames/GetLCIDFromLocale.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2002, 2015, 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.
+ */
+
+/*
+ * @test
+ * @bug 4351212
+ * @modules java.desktop/sun.font
+ * @summary Verify that new getLCIDFromLocale method works
+ */
+
+import java.lang.reflect.Method;
+import java.util.Locale;
+
+public class GetLCIDFromLocale {
+
+     static Method getLCIDMethod = null;
+     public static void main(String args[]) {
+        try {
+            Class ttClass = Class.forName("sun.font.TrueTypeFont");
+            getLCIDMethod =
+                ttClass.getDeclaredMethod("getLCIDFromLocale",
+                                           java.util.Locale.class);
+            getLCIDMethod.setAccessible(true); // its private
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException("Reflection failed");
+        }
+        if (getLCIDMethod == null) {
+            throw new RuntimeException("No method found");
+        }
+
+        test(Locale.US, 0x0409);
+        test(Locale.GERMAN, 0x0407);
+        test(Locale.GERMANY, 0x0407);
+        test(new Locale("de", "AT"), 0x0c07);
+        test(new Locale("ar"), 0x0401);
+        test(new Locale("ar", "SA"), 0x0401);
+        test(new Locale("ar", "EG"), 0x0c01);
+        test(new Locale("??"), 0x0409);
+        test(new Locale("??", "??"), 0x0409);
+        test(Locale.KOREA, 0x0412);
+    }
+
+    private static void test(Locale locale, int expectedLCID) {
+        try {
+            short lcid = (Short)getLCIDMethod.invoke(null, locale);
+            System.out.println("lcid="+lcid+" expected="+expectedLCID);
+            if (lcid != expectedLCID) {
+                 throw new RuntimeException();
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException("Method invocation exception");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/image/RescaleOp/RescaleAlphaTest.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+/**
+ * @test
+ * @bug 8080287
+ * @run RescaleAlphaTest
+ * @summary RescaleOp with scaleFactor/alpha should copy alpha to destination
+ * channel
+ */
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.RescaleOp;
+import java.awt.Color;
+import java.awt.Frame;
+import java.io.IOException;
+
+public class RescaleAlphaTest {
+
+    BufferedImage bimg = null, bimg1;
+    int w = 10, h = 10;
+    float scaleFactor = 0.5f;
+    float offset = 0.0f;
+
+    public static void main(String[] args) throws Exception {
+        RescaleAlphaTest test = new RescaleAlphaTest();
+        test.startTest();
+    }
+
+    private void startTest() throws Exception {
+
+        // Test with source image with alpha channel
+
+        bimg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d = bimg.createGraphics();
+        g2d.setColor(Color.GREEN);
+        g2d.fillRect(0, 0, w, h);
+
+        RescaleOp res = new RescaleOp(scaleFactor, offset, null);
+        bimg1 = res.filter(bimg, null);
+
+        // check if destination image has alpha channel copied from src
+        checkForAlpha(bimg1);
+
+        // Test with source image without alpha channel
+        bimg = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
+        g2d = bimg.createGraphics();
+        g2d.setColor(Color.GREEN);
+        g2d.fillRect(0, 0, w, h);
+
+
+        res = new RescaleOp(scaleFactor, offset, null);
+
+        // Create destination image with alpha channel
+        bimg1 = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
+        bimg1 = res.filter(bimg, bimg1);
+
+        // check if filtered destination image has alpha channel
+        checkForAlpha(bimg1);
+
+    }
+
+    private void checkForAlpha(BufferedImage bi) throws IOException {
+        int argb = bi.getRGB(w/2, h/2);
+        if ((argb >>> 24) != 255) {
+            throw new
+            RuntimeException("Wrong alpha in destination image.RescaleOp with alpha failed.");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/8132566/CBase.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+import java.beans.BeanProperty;
+import java.beans.PropertyChangeListener;
+
+
+public class CBase {
+
+    private int value;
+
+    @BeanProperty(
+            bound        = true,
+            expert       = true,
+            hidden       = true,
+            preferred    = true,
+            required     = true,
+            visualUpdate = true,
+            description  = "BASE",
+            enumerationValues = {"javax.swing.SwingConstants.TOP"}
+            )
+    public void setValue(int v) { value = v; }
+    public  int getValue()      { return value; }
+
+    public void addPropertyChangeListener(PropertyChangeListener l)    {}
+    public void removePropertyChangeListener(PropertyChangeListener l) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/8132566/Checker.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+import java.util.Arrays;
+
+public class Checker {
+
+    static void checkEq(String what, Object v, Object ref) throws Exception {
+        if ((v != null) && v.equals(ref)) {
+            System.out.println(what + ": ok (" + ref.toString() + ")");
+        } else { throw new Exception(
+                "invalid " + what + ", expected: \"" + ref + "\", got: \"" + v + "\"");
+        }
+    }
+
+    static void checkEnumEq(String what, Object v, Object ref[]) throws Exception {
+        if (v == null) { throw new Exception("null " + what); }
+        if (!(v instanceof Object[])) { throw new Exception("invalid " + what); }
+        if (Arrays.equals((Object []) v, ref)) { System.out.println(what + ": ok"); }
+        else { throw new Exception("invalid " + what); }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/8132566/InheritPropertyInfoTest.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+import java.beans.BeanInfo;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+
+/**
+ * @test
+ * @bug 8132566 8131939
+ * @summary Check if the derived class inherits the property info
+ *          from the base class.
+ * @author a.stepanov
+ */
+
+public class InheritPropertyInfoTest {
+
+    public static class C extends CBase {}
+
+    public static void main(String[] args) throws Exception {
+
+        BeanInfo i = Introspector.getBeanInfo(C.class, Object.class);
+        PropertyDescriptor[] pds = i.getPropertyDescriptors();
+
+        Checker.checkEq("number of properties", pds.length, 1);
+        PropertyDescriptor p = pds[0];
+
+        Checker.checkEq("property description", p.getShortDescription(), "BASE");
+
+        Checker.checkEq("isBound",  p.isBound(),  true);
+        Checker.checkEq("isExpert", p.isExpert(), true);
+        Checker.checkEq("isHidden", p.isHidden(), true);
+        Checker.checkEq("isPreferred", p.isPreferred(), true);
+        Checker.checkEq("required", p.getValue("required"), true);
+        Checker.checkEq("visualUpdate", p.getValue("visualUpdate"), true);
+
+        Checker.checkEnumEq("enumerationValues", p.getValue("enumerationValues"),
+            new Object[]{"TOP", 1, "javax.swing.SwingConstants.TOP"});
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/8132566/OverridePropertyInfoTest.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+import java.beans.BeanInfo;
+import java.beans.BeanProperty;
+import java.beans.Introspector;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyDescriptor;
+
+/**
+ * @test
+ * @bug 8132566 8132565 8131939
+ * @summary Check if the derived class overrides
+ *           the parent's property info.
+ * @author a.stepanov
+ */
+
+public class OverridePropertyInfoTest {
+
+    public static class C extends CBase {
+
+        private int value;
+
+        @BeanProperty(
+                bound        = false,
+                expert       = false,
+                hidden       = false,
+                preferred    = false,
+                required     = false,
+                visualUpdate = false,
+                description = "CHILD",
+                enumerationValues = {"javax.swing.SwingConstants.BOTTOM"}
+                )
+        @Override
+        public void setValue(int v) { value = v; }
+        @Override
+        public  int getValue() { return value; }
+
+        @Override
+        public void addPropertyChangeListener(PropertyChangeListener l)    {}
+        @Override
+        public void removePropertyChangeListener(PropertyChangeListener l) {}
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        BeanInfo i = Introspector.getBeanInfo(C.class, Object.class);
+        PropertyDescriptor[] pds = i.getPropertyDescriptors();
+
+        Checker.checkEq("number of properties", pds.length, 1);
+        PropertyDescriptor p = pds[0];
+        Checker.checkEq("property description", p.getShortDescription(), "CHILD");
+
+        Checker.checkEq("isBound",  p.isBound(),  false);
+        Checker.checkEq("isExpert", p.isExpert(), false);
+        Checker.checkEq("isHidden", p.isHidden(), false);
+        Checker.checkEq("isPreferred", p.isPreferred(), false);
+        Checker.checkEq("required", p.getValue("required"), false);
+        Checker.checkEq("visualUpdate", p.getValue("visualUpdate"), false);
+
+        Checker.checkEnumEq("enumerationValues", p.getValue("enumerationValues"),
+            new Object[]{"BOTTOM", 3, "javax.swing.SwingConstants.BOTTOM"});
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/8132566/OverrideUserDefPropertyInfoTest.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+import java.beans.BeanDescriptor;
+import java.beans.BeanInfo;
+import java.beans.BeanProperty;
+import java.beans.EventSetDescriptor;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.JavaBean;
+import java.beans.MethodDescriptor;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyDescriptor;
+import java.beans.SimpleBeanInfo;
+
+/**
+ * @test
+ * @bug 8132566 8132669 8131939
+ * @summary Check if the derived class overrides
+ *          the parent's user-defined property info.
+ * @author a.stepanov
+ */
+
+public class OverrideUserDefPropertyInfoTest {
+
+    private static final boolean baseFlag  = true;
+    private static final boolean childFlag = false;
+
+    @JavaBean(description = "CHILD")
+    public static class C extends Base {
+
+        private int x;
+
+        @BeanProperty(
+                bound        = childFlag,
+                expert       = childFlag,
+                hidden       = childFlag,
+                preferred    = childFlag,
+                required     = childFlag,
+                visualUpdate = childFlag,
+                description = "CHILDPROPERTY",
+                enumerationValues = {"javax.swing.SwingConstants.BOTTOM"}
+                )
+        @Override
+        public void setX(int v) { x = v; }
+        @Override
+        public  int getX() { return x; }
+
+        @Override
+        public void addPropertyChangeListener(PropertyChangeListener l)    {}
+        @Override
+        public void removePropertyChangeListener(PropertyChangeListener l) {}
+    }
+
+    public static class Base {
+        private int x;
+        public void setX(int v) { x = v; }
+        public  int getX() { return x; }
+        public void addPropertyChangeListener(PropertyChangeListener l)    {}
+        public void removePropertyChangeListener(PropertyChangeListener l) {}
+    }
+
+    public static class BaseBeanInfo extends SimpleBeanInfo {
+
+        @Override
+        public BeanDescriptor getBeanDescriptor() {
+            BeanDescriptor d = new BeanDescriptor(Base.class, null);
+            d.setShortDescription("BASE");
+            return d;
+        }
+
+        @Override
+        public PropertyDescriptor[] getPropertyDescriptors() {
+            PropertyDescriptor[] p = new PropertyDescriptor[1];
+
+            try {
+                p[0] = new PropertyDescriptor ("x", Base.class, "getX", null);
+                p[0].setShortDescription("BASEPROPERTY");
+                p[0].setBound (baseFlag);
+                p[0].setExpert(baseFlag);
+                p[0].setHidden(baseFlag);
+                p[0].setPreferred(baseFlag);
+                p[0].setValue("required", baseFlag);
+                p[0].setValue("visualUpdate", baseFlag);
+                p[0].setValue("enumerationValues",
+                    new Object[]{"TOP", 1, "javax.swing.SwingConstants.TOP"});
+            } catch(IntrospectionException e) { e.printStackTrace(); }
+
+            return p;
+        }
+
+        @Override
+        public EventSetDescriptor[] getEventSetDescriptors() { return new EventSetDescriptor[0]; }
+        @Override
+        public MethodDescriptor[] getMethodDescriptors() {
+            MethodDescriptor[] m = new MethodDescriptor[1];
+            try {
+                m[0] = new MethodDescriptor(Base.class.getMethod("setX", new Class[] {int.class}));
+                m[0].setDisplayName("");
+            }
+            catch( NoSuchMethodException | SecurityException e) {}
+            return m;
+        }
+
+        @Override
+        public int getDefaultPropertyIndex() { return -1; }
+        @Override
+        public int getDefaultEventIndex() { return -1; }
+        @Override
+        public java.awt.Image getIcon(int iconKind) { return null; }
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        BeanInfo i = Introspector.getBeanInfo(C.class, Object.class);
+        Checker.checkEq("description",
+            i.getBeanDescriptor().getShortDescription(), "CHILD");
+
+        PropertyDescriptor[] pds = i.getPropertyDescriptors();
+        Checker.checkEq("number of properties", pds.length, 1);
+        PropertyDescriptor p = pds[0];
+
+        Checker.checkEq("property description", p.getShortDescription(), "CHILDPROPERTY");
+        Checker.checkEq("isBound",  p.isBound(),  childFlag);
+        Checker.checkEq("isExpert", p.isExpert(), childFlag);
+        Checker.checkEq("isHidden", p.isHidden(), childFlag);
+        Checker.checkEq("isPreferred", p.isPreferred(), childFlag);
+        Checker.checkEq("required", p.getValue("required"), childFlag);
+        Checker.checkEq("visualUpdate", p.getValue("visualUpdate"), childFlag);
+
+        Checker.checkEnumEq("enumerationValues", p.getValue("enumerationValues"),
+            new Object[]{"BOTTOM", 3, "javax.swing.SwingConstants.BOTTOM"});
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/ServiceRegistryRestriction.java	Tue Aug 25 12:19:46 2015 -0700
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8068749
+ * @run main ServiceRegistryRestriction
+ * @summary Tests ServiceRegistry's restriction on handling
+ *          only standard Image I/O service types.
+ */
+
+import java.util.*;
+import java.util.function.Consumer;
+import javax.imageio.spi.*;
+
+public class ServiceRegistryRestriction {
+    static class DummyTestSpi {
+    }
+
+    ClassLoader cl = ServiceRegistryRestriction.class.getClassLoader();
+
+    <T> void construct(Class<T> clazz) {
+        List<Class<?>> list = Arrays.<Class<?>>asList(clazz);
+        ServiceRegistry sr = new ServiceRegistry(list.iterator());
+    }
+
+    <T> void lookup(Class<T> clazz) {
+        Iterator<T> i = ServiceRegistry.lookupProviders(clazz);
+    }
+
+    <T> void lookupCL(Class<T> clazz) {
+        Iterator<T> i = ServiceRegistry.lookupProviders(clazz, cl);
+    }
+
+    <T> void doOneTest(String label, Class<T> clazz, boolean expectFail, Consumer<Class<T>> op) {
+        System.out.printf("testing %s with %s...", label, clazz.getName());
+        try {
+            op.accept(clazz);
+            if (expectFail) {
+                throw new AssertionError("fail, operation succeeded unexpectedly");
+            } else {
+                System.out.println("success");
+            }
+        } catch (IllegalArgumentException iae) {
+            if (expectFail) {
+                System.out.println("success, got expected IAE");
+            } else {
+                throw new AssertionError("fail, unexpected exception", iae);
+            }
+        }
+    }
+
+    void doTests(Class<?> clazz, boolean expectFail) {
+        doOneTest("constructor", clazz, expectFail, this::construct);
+        doOneTest("lookup", clazz, expectFail, this::lookup);
+        doOneTest("lookupCL", clazz, expectFail, this::lookupCL);
+    }
+
+    void run() {
+        doTests(ImageInputStreamSpi.class, false);
+        doTests(ImageOutputStreamSpi.class, false);
+        doTests(ImageReaderSpi.class, false);
+        doTests(ImageTranscoderSpi.class, false);
+        doTests(ImageWriterSpi.class, false);
+        doTests(DummyTestSpi.class, true);
+    }
+
+    public static void main(String[] args) {
+        new ServiceRegistryRestriction().run();
+    }
+}
--- a/jdk/test/javax/print/PrintSEUmlauts/PrintSEUmlauts.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/test/javax/print/PrintSEUmlauts/PrintSEUmlauts.java	Tue Aug 25 12:19:46 2015 -0700
@@ -85,7 +85,7 @@
 
     private static final boolean DEBUG = false;
     private static void testPrintAndExit() {
-        String expected = "<e4> 7.44 100.0 100.0 S";
+        String expected = "<e4>";
         String content = "";
 
         File file = new File("out.ps");
--- a/jdk/test/javax/swing/JComponent/6683775/bug6683775.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/test/javax/swing/JComponent/6683775/bug6683775.java	Tue Aug 25 12:19:46 2015 -0700
@@ -31,13 +31,15 @@
 */
 
 import com.sun.awt.AWTUtilities;
-import sun.awt.SunToolkit;
 
 import javax.swing.*;
 import java.awt.*;
 import java.awt.image.BufferedImage;
 
 public class bug6683775 {
+    static final int LOC = 100,
+            SIZE = 200;
+
     public static void main(String[] args) throws Exception {
         GraphicsConfiguration gc = getGC();
        if (!AWTUtilities.isTranslucencySupported(
@@ -45,39 +47,37 @@
                 || gc == null) {
             return;
         }
-        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
         Robot robot = new Robot();
         final JFrame testFrame = new JFrame(gc);
 
-        SwingUtilities.invokeLater(new Runnable() {
-            public void run() {
-                JFrame backgroundFrame = new JFrame("Background frame");
-                backgroundFrame.setUndecorated(true);
-                JPanel panel = new JPanel();
-                panel.setBackground(Color.RED);
-                backgroundFrame.add(panel);
-                backgroundFrame.setSize(200, 200);
-                backgroundFrame.setVisible(true);
+        SwingUtilities.invokeAndWait(() -> {
+            JFrame backgroundFrame = new JFrame("Background frame");
+            backgroundFrame.setUndecorated(true);
+            JPanel panel = new JPanel();
+            panel.setBackground(Color.RED);
+            backgroundFrame.add(panel);
+            backgroundFrame.setBounds(LOC, LOC, SIZE, SIZE);
+            backgroundFrame.setVisible(true);
 
-                testFrame.setUndecorated(true);
-                JPanel p = new JPanel();
-                p.setOpaque(false);
-                testFrame.add(p);
-                AWTUtilities.setWindowOpaque(testFrame, false);
-                testFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-                testFrame.setSize(400, 400);
-                testFrame.setLocation(0, 0);
-                testFrame.setVisible(true);
-            }
+            testFrame.setUndecorated(true);
+            JPanel p = new JPanel();
+            p.setOpaque(false);
+            testFrame.add(p);
+            AWTUtilities.setWindowOpaque(testFrame, false);
+            testFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+            testFrame.setBounds(LOC, LOC, SIZE, SIZE);
+            testFrame.setVisible(true);
         });
 
-        toolkit.realSync();
+        robot.waitForIdle();
+        Thread.sleep(1500);
 
         //robot.getPixelColor() didn't work right for some reason
-        BufferedImage capture = robot.createScreenCapture(new Rectangle(100, 100));
+        BufferedImage capture =
+                robot.createScreenCapture(new Rectangle(LOC, LOC, SIZE, SIZE));
 
         int redRGB = Color.RED.getRGB();
-        if (redRGB != capture.getRGB(10, 10)) {
+        if (redRGB != capture.getRGB(SIZE/2, SIZE/2)) {
             throw new RuntimeException("Transparent frame is not transparent!");
         }
     }
--- a/jdk/test/javax/swing/JScrollBar/bug4202954/bug4202954.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/test/javax/swing/JScrollBar/bug4202954/bug4202954.java	Tue Aug 25 12:19:46 2015 -0700
@@ -53,8 +53,8 @@
 
         if (rightScrollButton == null || bottomScrollButton == null) {
             String errMessage = "Test can't be executed: ";
-            errMessage = errMessage + rightScrollButton == null ? "can't find right button for horizontal scroll bar; " : ""
-                    + bottomScrollButton == null ? "can't find bottom scroll button for vertical scroll bar" : "";
+            errMessage = errMessage + (rightScrollButton == null ? "can't find right button for horizontal scroll bar; " : ""
+                    + (bottomScrollButton == null ? "can't find bottom scroll button for vertical scroll bar" : ""));
             throw new RuntimeException(errMessage);
         }
 
@@ -105,15 +105,25 @@
         JButton button = Util.invokeOnEDT(new java.util.concurrent.Callable<JButton>() {
             @Override
             public JButton call() throws Exception {
-                for (Component c: scrollBar.getComponents()) {
-                    if (c instanceof JButton) {
-                        Point p = c.getLocationOnScreen();
-                        if (p.x > minX && p.y > minY) {
-                            return (JButton) c;
-                        }
-                    }
-                }
-                return null;
+                int currentXorY = 0;
+                JButton scrollButton = null;
+                 for (Component c: scrollBar.getComponents()) {
+                     if (c instanceof JButton) {
+                         Point p = c.getLocationOnScreen();
+                         if (scrollBar.getOrientation() == Adjustable.VERTICAL){
+                             if (currentXorY <= p.y){
+                                 currentXorY = p.y;
+                                 scrollButton = (JButton)c;
+                             }
+                         }else  if (scrollBar.getOrientation() == Adjustable.HORIZONTAL){
+                             if (currentXorY <= p.x){
+                                 currentXorY = p.x;
+                                 scrollButton = (JButton)c;
+                             }
+                         }
+                     }
+                 }
+                return scrollButton;
             }
         });
         return button;
--- a/jdk/test/javax/swing/plaf/aqua/CustomComboBoxFocusTest.java	Tue Aug 25 13:40:07 2015 -0400
+++ b/jdk/test/javax/swing/plaf/aqua/CustomComboBoxFocusTest.java	Tue Aug 25 12:19:46 2015 -0700
@@ -22,9 +22,11 @@
  */
 
 /* @test
-   @bug     8073001
+   @bug     8073001 8081764
    @summary Test verifies that combo box with custom editor renders
             focus ring around arrow button correctly.
+   @library /lib/testlibrary
+   @build jdk.testlibrary.OSInfo
    @run     main CustomComboBoxFocusTest
 */
 
@@ -50,12 +52,17 @@
 import javax.swing.JPanel;
 import javax.swing.JTextField;
 import javax.swing.SwingUtilities;
+import jdk.testlibrary.OSInfo;
 
 public class CustomComboBoxFocusTest {
 
     private static CustomComboBoxFocusTest test = null;
 
     public static void main(String[] args) {
+        if (OSInfo.getOSType() != OSInfo.OSType.MACOSX) {
+            System.out.println("Only Mac platform test. Test is skipped for other OS.");
+            return;
+        }
 
         try {
             SwingUtilities.invokeAndWait(new Runnable() {