< prev index next >

jdk/src/java.desktop/share/classes/javax/accessibility/AccessibilityProvider.java

Print this page




  26 
  27 /**
  28  * Service Provider Interface (SPI) for Assistive Technology.
  29  * <p>
  30  * This service provider class provides mappings from the platform
  31  * specific accessibility APIs to the Java Accessibility API.
  32  * <p>
  33  * Each service provider implementation is named and can be activated via the
  34  * {@link #activate} method. Service providers can be loaded when the default
  35  * {@link java.awt.Toolkit toolkit} is initialized.
  36  *
  37  * @apiNote There will typically be one provider per platform, such as Windows
  38  * or Linux, to support accessibility for screen readers and magnifiers.  However,
  39  * more than one service provider can be activated.  For example, a test tool
  40  * which provides visual results obtained by interrogating the Java Accessibility
  41  * API can be activated along with the activation of the support for screen readers
  42  * and screen magnifiers.
  43  *
  44  * @see java.awt.Toolkit#getDefaultToolkit
  45  * @see java.util.ServiceLoader
  46  * @since 1.9
  47  */
  48 public abstract class AccessibilityProvider {
  49 
  50     /**
  51      * Initializes a new accessibility provider.
  52      *
  53      * @throws  SecurityException
  54      *          If a security manager has been installed and it denies
  55      *          {@link RuntimePermission} {@code "accessibilityProvider"}
  56      */
  57     protected AccessibilityProvider() {
  58         // Use a permission check when calling a private constructor to check that
  59         // the proper security permission has been granted before the Object superclass
  60         // is called.  If an exception is thrown before the Object superclass is
  61         // constructed a finalizer in a subclass of this class will not be run.
  62         // This protects against a finalizer vulnerability.
  63         this(checkPermission());
  64     }
  65 
  66     private AccessibilityProvider(Void ignore) { }




  26 
  27 /**
  28  * Service Provider Interface (SPI) for Assistive Technology.
  29  * <p>
  30  * This service provider class provides mappings from the platform
  31  * specific accessibility APIs to the Java Accessibility API.
  32  * <p>
  33  * Each service provider implementation is named and can be activated via the
  34  * {@link #activate} method. Service providers can be loaded when the default
  35  * {@link java.awt.Toolkit toolkit} is initialized.
  36  *
  37  * @apiNote There will typically be one provider per platform, such as Windows
  38  * or Linux, to support accessibility for screen readers and magnifiers.  However,
  39  * more than one service provider can be activated.  For example, a test tool
  40  * which provides visual results obtained by interrogating the Java Accessibility
  41  * API can be activated along with the activation of the support for screen readers
  42  * and screen magnifiers.
  43  *
  44  * @see java.awt.Toolkit#getDefaultToolkit
  45  * @see java.util.ServiceLoader
  46  * @since 9
  47  */
  48 public abstract class AccessibilityProvider {
  49 
  50     /**
  51      * Initializes a new accessibility provider.
  52      *
  53      * @throws  SecurityException
  54      *          If a security manager has been installed and it denies
  55      *          {@link RuntimePermission} {@code "accessibilityProvider"}
  56      */
  57     protected AccessibilityProvider() {
  58         // Use a permission check when calling a private constructor to check that
  59         // the proper security permission has been granted before the Object superclass
  60         // is called.  If an exception is thrown before the Object superclass is
  61         // constructed a finalizer in a subclass of this class will not be run.
  62         // This protects against a finalizer vulnerability.
  63         this(checkPermission());
  64     }
  65 
  66     private AccessibilityProvider(Void ignore) { }


< prev index next >