Java 类sun.awt.InputMethodSupport 实例源码

项目:OpenJSharp    文件:InputMethodContext.java   
static Window createInputMethodWindow(String title, InputContext context, boolean isSwing) {
    if (GraphicsEnvironment.isHeadless()) {
        throw new HeadlessException();
    }
    if (isSwing) {
        return new InputMethodJFrame(title, context);
    } else {
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        if (toolkit instanceof InputMethodSupport) {
            return ((InputMethodSupport)toolkit).createInputMethodWindow(
                title, context);
        }
    }
    throw new InternalError("Input methods must be supported");
}
项目:OpenJSharp    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
    if (checkForEnableIM) {
        checkForEnableIM = false;
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            boolean shouldEnable = false;
            if (toolkit instanceof InputMethodSupport) {
                shouldEnable = ((InputMethodSupport)toolkit)
                  .enableInputMethodsForTextComponent();
            }
            enableInputMethods(shouldEnable);
        } catch (Exception e) {
            // if something bad happens, just don't enable input methods
        }
    }
}
项目:OpenJSharp    文件:ExecutableInputMethodManager.java   
ExecutableInputMethodManager() {

        // set up host adapter locator
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
            if (toolkit instanceof InputMethodSupport) {
                InputMethodDescriptor hostAdapterDescriptor =
                    ((InputMethodSupport)toolkit)
                    .getInputMethodAdapterDescriptor();
                if (hostAdapterDescriptor != null) {
                    hostAdapterLocator = new InputMethodLocator(hostAdapterDescriptor, null, null);
                }
            }
        } catch (AWTException e) {
            // if we can't get a descriptor, we'll just have to do without native input methods
        }

        javaInputMethodLocatorList = new Vector<InputMethodLocator>();
        initializeInputMethodLocatorList();
    }
项目:jdk8u-jdk    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
    if (checkForEnableIM) {
        checkForEnableIM = false;
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            boolean shouldEnable = false;
            if (toolkit instanceof InputMethodSupport) {
                shouldEnable = ((InputMethodSupport)toolkit)
                  .enableInputMethodsForTextComponent();
            }
            enableInputMethods(shouldEnable);
        } catch (Exception e) {
            // if something bad happens, just don't enable input methods
        }
    }
}
项目:jdk8u-jdk    文件:ExecutableInputMethodManager.java   
ExecutableInputMethodManager() {

        // set up host adapter locator
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
            if (toolkit instanceof InputMethodSupport) {
                InputMethodDescriptor hostAdapterDescriptor =
                    ((InputMethodSupport)toolkit)
                    .getInputMethodAdapterDescriptor();
                if (hostAdapterDescriptor != null) {
                    hostAdapterLocator = new InputMethodLocator(hostAdapterDescriptor, null, null);
                }
            }
        } catch (AWTException e) {
            // if we can't get a descriptor, we'll just have to do without native input methods
        }

        javaInputMethodLocatorList = new Vector<InputMethodLocator>();
        initializeInputMethodLocatorList();
    }
项目:openjdk-jdk10    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
    if (checkForEnableIM) {
        checkForEnableIM = false;
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            boolean shouldEnable = false;
            if (toolkit instanceof InputMethodSupport) {
                shouldEnable = ((InputMethodSupport)toolkit)
                  .enableInputMethodsForTextComponent();
            }
            enableInputMethods(shouldEnable);
        } catch (Exception e) {
            // if something bad happens, just don't enable input methods
        }
    }
}
项目:openjdk-jdk10    文件:ExecutableInputMethodManager.java   
ExecutableInputMethodManager() {

        // set up host adapter locator
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
            if (toolkit instanceof InputMethodSupport) {
                InputMethodDescriptor hostAdapterDescriptor =
                    ((InputMethodSupport)toolkit)
                    .getInputMethodAdapterDescriptor();
                if (hostAdapterDescriptor != null) {
                    hostAdapterLocator = new InputMethodLocator(hostAdapterDescriptor, null, null);
                }
            }
        } catch (AWTException e) {
            // if we can't get a descriptor, we'll just have to do without native input methods
        }

        javaInputMethodLocatorList = new Vector<InputMethodLocator>();
        initializeInputMethodLocatorList();
    }
项目:openjdk9    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
    if (checkForEnableIM) {
        checkForEnableIM = false;
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            boolean shouldEnable = false;
            if (toolkit instanceof InputMethodSupport) {
                shouldEnable = ((InputMethodSupport)toolkit)
                  .enableInputMethodsForTextComponent();
            }
            enableInputMethods(shouldEnable);
        } catch (Exception e) {
            // if something bad happens, just don't enable input methods
        }
    }
}
项目:openjdk9    文件:ExecutableInputMethodManager.java   
ExecutableInputMethodManager() {

        // set up host adapter locator
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
            if (toolkit instanceof InputMethodSupport) {
                InputMethodDescriptor hostAdapterDescriptor =
                    ((InputMethodSupport)toolkit)
                    .getInputMethodAdapterDescriptor();
                if (hostAdapterDescriptor != null) {
                    hostAdapterLocator = new InputMethodLocator(hostAdapterDescriptor, null, null);
                }
            }
        } catch (AWTException e) {
            // if we can't get a descriptor, we'll just have to do without native input methods
        }

        javaInputMethodLocatorList = new Vector<InputMethodLocator>();
        initializeInputMethodLocatorList();
    }
项目:Java8CN    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
    if (checkForEnableIM) {
        checkForEnableIM = false;
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            boolean shouldEnable = false;
            if (toolkit instanceof InputMethodSupport) {
                shouldEnable = ((InputMethodSupport)toolkit)
                  .enableInputMethodsForTextComponent();
            }
            enableInputMethods(shouldEnable);
        } catch (Exception e) {
            // if something bad happens, just don't enable input methods
        }
    }
}
项目:jdk8u_jdk    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
    if (checkForEnableIM) {
        checkForEnableIM = false;
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            boolean shouldEnable = false;
            if (toolkit instanceof InputMethodSupport) {
                shouldEnable = ((InputMethodSupport)toolkit)
                  .enableInputMethodsForTextComponent();
            }
            enableInputMethods(shouldEnable);
        } catch (Exception e) {
            // if something bad happens, just don't enable input methods
        }
    }
}
项目:jdk8u_jdk    文件:ExecutableInputMethodManager.java   
ExecutableInputMethodManager() {

        // set up host adapter locator
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
            if (toolkit instanceof InputMethodSupport) {
                InputMethodDescriptor hostAdapterDescriptor =
                    ((InputMethodSupport)toolkit)
                    .getInputMethodAdapterDescriptor();
                if (hostAdapterDescriptor != null) {
                    hostAdapterLocator = new InputMethodLocator(hostAdapterDescriptor, null, null);
                }
            }
        } catch (AWTException e) {
            // if we can't get a descriptor, we'll just have to do without native input methods
        }

        javaInputMethodLocatorList = new Vector<InputMethodLocator>();
        initializeInputMethodLocatorList();
    }
项目:lookaside_java-1.8.0-openjdk    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
    if (checkForEnableIM) {
        checkForEnableIM = false;
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            boolean shouldEnable = false;
            if (toolkit instanceof InputMethodSupport) {
                shouldEnable = ((InputMethodSupport)toolkit)
                  .enableInputMethodsForTextComponent();
            }
            enableInputMethods(shouldEnable);
        } catch (Exception e) {
            // if something bad happens, just don't enable input methods
        }
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:ExecutableInputMethodManager.java   
ExecutableInputMethodManager() {

        // set up host adapter locator
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
            if (toolkit instanceof InputMethodSupport) {
                InputMethodDescriptor hostAdapterDescriptor =
                    ((InputMethodSupport)toolkit)
                    .getInputMethodAdapterDescriptor();
                if (hostAdapterDescriptor != null) {
                    hostAdapterLocator = new InputMethodLocator(hostAdapterDescriptor, null, null);
                }
            }
        } catch (AWTException e) {
            // if we can't get a descriptor, we'll just have to do without native input methods
        }

        javaInputMethodLocatorList = new Vector<InputMethodLocator>();
        initializeInputMethodLocatorList();
    }
项目:VarJ    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
if (checkForEnableIM) {
           checkForEnableIM = false;
        try {
               Toolkit toolkit = Toolkit.getDefaultToolkit();
               boolean shouldEnable = false;            
               if (toolkit instanceof InputMethodSupport) {
                   shouldEnable = ((InputMethodSupport)toolkit)
                     .enableInputMethodsForTextComponent();
               }
               enableInputMethods(shouldEnable);
           } catch (Exception e) {
               // if something bad happens, just don't enable input methods
    }
       }
   }
项目:jdk-1.7-annotated    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
    if (checkForEnableIM) {
        checkForEnableIM = false;
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            boolean shouldEnable = false;
            if (toolkit instanceof InputMethodSupport) {
                shouldEnable = ((InputMethodSupport)toolkit)
                  .enableInputMethodsForTextComponent();
            }
            enableInputMethods(shouldEnable);
        } catch (Exception e) {
            // if something bad happens, just don't enable input methods
        }
    }
}
项目:infobip-open-jdk-8    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
    if (checkForEnableIM) {
        checkForEnableIM = false;
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            boolean shouldEnable = false;
            if (toolkit instanceof InputMethodSupport) {
                shouldEnable = ((InputMethodSupport)toolkit)
                  .enableInputMethodsForTextComponent();
            }
            enableInputMethods(shouldEnable);
        } catch (Exception e) {
            // if something bad happens, just don't enable input methods
        }
    }
}
项目:infobip-open-jdk-8    文件:ExecutableInputMethodManager.java   
ExecutableInputMethodManager() {

        // set up host adapter locator
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
            if (toolkit instanceof InputMethodSupport) {
                InputMethodDescriptor hostAdapterDescriptor =
                    ((InputMethodSupport)toolkit)
                    .getInputMethodAdapterDescriptor();
                if (hostAdapterDescriptor != null) {
                    hostAdapterLocator = new InputMethodLocator(hostAdapterDescriptor, null, null);
                }
            }
        } catch (AWTException e) {
            // if we can't get a descriptor, we'll just have to do without native input methods
        }

        javaInputMethodLocatorList = new Vector<InputMethodLocator>();
        initializeInputMethodLocatorList();
    }
项目:jdk8u-dev-jdk    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
    if (checkForEnableIM) {
        checkForEnableIM = false;
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            boolean shouldEnable = false;
            if (toolkit instanceof InputMethodSupport) {
                shouldEnable = ((InputMethodSupport)toolkit)
                  .enableInputMethodsForTextComponent();
            }
            enableInputMethods(shouldEnable);
        } catch (Exception e) {
            // if something bad happens, just don't enable input methods
        }
    }
}
项目:jdk8u-dev-jdk    文件:ExecutableInputMethodManager.java   
ExecutableInputMethodManager() {

        // set up host adapter locator
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
            if (toolkit instanceof InputMethodSupport) {
                InputMethodDescriptor hostAdapterDescriptor =
                    ((InputMethodSupport)toolkit)
                    .getInputMethodAdapterDescriptor();
                if (hostAdapterDescriptor != null) {
                    hostAdapterLocator = new InputMethodLocator(hostAdapterDescriptor, null, null);
                }
            }
        } catch (AWTException e) {
            // if we can't get a descriptor, we'll just have to do without native input methods
        }

        javaInputMethodLocatorList = new Vector<InputMethodLocator>();
        initializeInputMethodLocatorList();
    }
项目:jdk7-jdk    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
    if (checkForEnableIM) {
        checkForEnableIM = false;
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            boolean shouldEnable = false;
            if (toolkit instanceof InputMethodSupport) {
                shouldEnable = ((InputMethodSupport)toolkit)
                  .enableInputMethodsForTextComponent();
            }
            enableInputMethods(shouldEnable);
        } catch (Exception e) {
            // if something bad happens, just don't enable input methods
        }
    }
}
项目:jdk7-jdk    文件:InputMethodManager.java   
ExecutableInputMethodManager() {

        // set up host adapter locator
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
            if (toolkit instanceof InputMethodSupport) {
                InputMethodDescriptor hostAdapterDescriptor =
                    ((InputMethodSupport)toolkit)
                    .getInputMethodAdapterDescriptor();
                if (hostAdapterDescriptor != null) {
                    hostAdapterLocator = new InputMethodLocator(hostAdapterDescriptor, null, null);
                }
            }
        } catch (AWTException e) {
            // if we can't get a descriptor, we'll just have to do without native input methods
        }

        javaInputMethodLocatorList = new Vector<InputMethodLocator>();
        initializeInputMethodLocatorList();
    }
项目:openjdk-source-code-learn    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
    if (checkForEnableIM) {
        checkForEnableIM = false;
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            boolean shouldEnable = false;
            if (toolkit instanceof InputMethodSupport) {
                shouldEnable = ((InputMethodSupport)toolkit)
                  .enableInputMethodsForTextComponent();
            }
            enableInputMethods(shouldEnable);
        } catch (Exception e) {
            // if something bad happens, just don't enable input methods
        }
    }
}
项目:openjdk-source-code-learn    文件:InputMethodManager.java   
ExecutableInputMethodManager() {

        // set up host adapter locator
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
            if (toolkit instanceof InputMethodSupport) {
                InputMethodDescriptor hostAdapterDescriptor =
                    ((InputMethodSupport)toolkit)
                    .getInputMethodAdapterDescriptor();
                if (hostAdapterDescriptor != null) {
                    hostAdapterLocator = new InputMethodLocator(hostAdapterDescriptor, null, null);
                }
            }
        } catch (AWTException e) {
            // if we can't get a descriptor, we'll just have to do without native input methods
        }

        javaInputMethodLocatorList = new Vector<InputMethodLocator>();
        initializeInputMethodLocatorList();
    }
项目:OLD-OpenJDK8    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
    if (checkForEnableIM) {
        checkForEnableIM = false;
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            boolean shouldEnable = false;
            if (toolkit instanceof InputMethodSupport) {
                shouldEnable = ((InputMethodSupport)toolkit)
                  .enableInputMethodsForTextComponent();
            }
            enableInputMethods(shouldEnable);
        } catch (Exception e) {
            // if something bad happens, just don't enable input methods
        }
    }
}
项目:OLD-OpenJDK8    文件:ExecutableInputMethodManager.java   
ExecutableInputMethodManager() {

        // set up host adapter locator
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
            if (toolkit instanceof InputMethodSupport) {
                InputMethodDescriptor hostAdapterDescriptor =
                    ((InputMethodSupport)toolkit)
                    .getInputMethodAdapterDescriptor();
                if (hostAdapterDescriptor != null) {
                    hostAdapterLocator = new InputMethodLocator(hostAdapterDescriptor, null, null);
                }
            }
        } catch (AWTException e) {
            // if we can't get a descriptor, we'll just have to do without native input methods
        }

        javaInputMethodLocatorList = new Vector<InputMethodLocator>();
        initializeInputMethodLocatorList();
    }
项目:openjdk-jdk7u-jdk    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
    if (checkForEnableIM) {
        checkForEnableIM = false;
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            boolean shouldEnable = false;
            if (toolkit instanceof InputMethodSupport) {
                shouldEnable = ((InputMethodSupport)toolkit)
                  .enableInputMethodsForTextComponent();
            }
            enableInputMethods(shouldEnable);
        } catch (Exception e) {
            // if something bad happens, just don't enable input methods
        }
    }
}
项目:openjdk-jdk7u-jdk    文件:InputMethodManager.java   
ExecutableInputMethodManager() {

        // set up host adapter locator
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
            if (toolkit instanceof InputMethodSupport) {
                InputMethodDescriptor hostAdapterDescriptor =
                    ((InputMethodSupport)toolkit)
                    .getInputMethodAdapterDescriptor();
                if (hostAdapterDescriptor != null) {
                    hostAdapterLocator = new InputMethodLocator(hostAdapterDescriptor, null, null);
                }
            }
        } catch (AWTException e) {
            // if we can't get a descriptor, we'll just have to do without native input methods
        }

        javaInputMethodLocatorList = new Vector<InputMethodLocator>();
        initializeInputMethodLocatorList();
    }
项目:openjdk-icedtea7    文件:TextComponent.java   
private void enableInputMethodsIfNecessary() {
    if (checkForEnableIM) {
        checkForEnableIM = false;
        try {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            boolean shouldEnable = false;
            if (toolkit instanceof InputMethodSupport) {
                shouldEnable = ((InputMethodSupport)toolkit)
                  .enableInputMethodsForTextComponent();
            }
            enableInputMethods(shouldEnable);
        } catch (Exception e) {
            // if something bad happens, just don't enable input methods
        }
    }
}
项目:openjdk-icedtea7    文件:InputMethodManager.java   
ExecutableInputMethodManager() {

        // set up host adapter locator
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
            if (toolkit instanceof InputMethodSupport) {
                InputMethodDescriptor hostAdapterDescriptor =
                    ((InputMethodSupport)toolkit)
                    .getInputMethodAdapterDescriptor();
                if (hostAdapterDescriptor != null) {
                    hostAdapterLocator = new InputMethodLocator(hostAdapterDescriptor, null, null);
                }
            }
        } catch (AWTException e) {
            // if we can't get a descriptor, we'll just have to do without native input methods
        }

        javaInputMethodLocatorList = new Vector<InputMethodLocator>();
        initializeInputMethodLocatorList();
    }
项目:OpenJSharp    文件:ExecutableInputMethodManager.java   
Locale getDefaultKeyboardLocale() {
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    if (toolkit instanceof InputMethodSupport) {
        return ((InputMethodSupport)toolkit).getDefaultKeyboardLocale();
    } else {
        return Locale.getDefault();
    }
}
项目:jdk8u-jdk    文件:ExecutableInputMethodManager.java   
Locale getDefaultKeyboardLocale() {
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    if (toolkit instanceof InputMethodSupport) {
        return ((InputMethodSupport)toolkit).getDefaultKeyboardLocale();
    } else {
        return Locale.getDefault();
    }
}
项目:jdk8u-jdk    文件:InputMethodContext.java   
static Window createInputMethodWindow(String title, InputContext context, boolean isSwing) {
    if (GraphicsEnvironment.isHeadless()) {
        throw new HeadlessException();
    }
    if (isSwing) {
        return new InputMethodJFrame(title, context);
    } else {
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        if (toolkit instanceof InputMethodSupport) {
            return ((InputMethodSupport)toolkit).createInputMethodWindow(
                title, context);
        }
    }
    throw new InternalError("Input methods must be supported");
}
项目:openjdk-jdk10    文件:ExecutableInputMethodManager.java   
Locale getDefaultKeyboardLocale() {
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    if (toolkit instanceof InputMethodSupport) {
        return ((InputMethodSupport)toolkit).getDefaultKeyboardLocale();
    } else {
        return Locale.getDefault();
    }
}
项目:openjdk-jdk10    文件:InputMethodContext.java   
static Window createInputMethodWindow(String title, InputContext context, boolean isSwing) {
    if (GraphicsEnvironment.isHeadless()) {
        throw new HeadlessException();
    }
    if (isSwing) {
        return new InputMethodJFrame(title, context);
    } else {
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        if (toolkit instanceof InputMethodSupport) {
            return ((InputMethodSupport)toolkit).createInputMethodWindow(
                title, context);
        }
    }
    throw new InternalError("Input methods must be supported");
}
项目:openjdk9    文件:ExecutableInputMethodManager.java   
Locale getDefaultKeyboardLocale() {
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    if (toolkit instanceof InputMethodSupport) {
        return ((InputMethodSupport)toolkit).getDefaultKeyboardLocale();
    } else {
        return Locale.getDefault();
    }
}
项目:openjdk9    文件:InputMethodContext.java   
static Window createInputMethodWindow(String title, InputContext context, boolean isSwing) {
    if (GraphicsEnvironment.isHeadless()) {
        throw new HeadlessException();
    }
    if (isSwing) {
        return new InputMethodJFrame(title, context);
    } else {
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        if (toolkit instanceof InputMethodSupport) {
            return ((InputMethodSupport)toolkit).createInputMethodWindow(
                title, context);
        }
    }
    throw new InternalError("Input methods must be supported");
}
项目:jdk8u_jdk    文件:ExecutableInputMethodManager.java   
Locale getDefaultKeyboardLocale() {
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    if (toolkit instanceof InputMethodSupport) {
        return ((InputMethodSupport)toolkit).getDefaultKeyboardLocale();
    } else {
        return Locale.getDefault();
    }
}
项目:jdk8u_jdk    文件:InputMethodContext.java   
static Window createInputMethodWindow(String title, InputContext context, boolean isSwing) {
    if (GraphicsEnvironment.isHeadless()) {
        throw new HeadlessException();
    }
    if (isSwing) {
        return new InputMethodJFrame(title, context);
    } else {
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        if (toolkit instanceof InputMethodSupport) {
            return ((InputMethodSupport)toolkit).createInputMethodWindow(
                title, context);
        }
    }
    throw new InternalError("Input methods must be supported");
}
项目:lookaside_java-1.8.0-openjdk    文件:ExecutableInputMethodManager.java   
Locale getDefaultKeyboardLocale() {
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    if (toolkit instanceof InputMethodSupport) {
        return ((InputMethodSupport)toolkit).getDefaultKeyboardLocale();
    } else {
        return Locale.getDefault();
    }
}