20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26
27 package sun.awt.windows;
28
29 import java.awt.Image;
30 import java.awt.Toolkit;
31 import java.awt.im.spi.InputMethod;
32 import java.awt.im.spi.InputMethodDescriptor;
33 import java.util.Locale;
34
35 /**
36 * Provides sufficient information about an input method
37 * to enable selection and loading of that input method.
38 * The input method itself is only loaded when it is actually used.
39 *
40 * @since JDK1.3
41 */
42
43 final class WInputMethodDescriptor implements InputMethodDescriptor {
44
45 /**
46 * @see java.awt.im.spi.InputMethodDescriptor#getAvailableLocales
47 */
48 @Override
49 public Locale[] getAvailableLocales() {
50 // returns a copy of internal list for public API
51 Locale[] locales = getAvailableLocalesInternal();
52 Locale[] tmp = new Locale[locales.length];
53 System.arraycopy(locales, 0, tmp, 0, locales.length);
54 return tmp;
55 }
56
57 static Locale[] getAvailableLocalesInternal() {
58 return getNativeAvailableLocales();
59 }
60
|
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26
27 package sun.awt.windows;
28
29 import java.awt.Image;
30 import java.awt.Toolkit;
31 import java.awt.im.spi.InputMethod;
32 import java.awt.im.spi.InputMethodDescriptor;
33 import java.util.Locale;
34
35 /**
36 * Provides sufficient information about an input method
37 * to enable selection and loading of that input method.
38 * The input method itself is only loaded when it is actually used.
39 *
40 * @since 1.3
41 */
42
43 final class WInputMethodDescriptor implements InputMethodDescriptor {
44
45 /**
46 * @see java.awt.im.spi.InputMethodDescriptor#getAvailableLocales
47 */
48 @Override
49 public Locale[] getAvailableLocales() {
50 // returns a copy of internal list for public API
51 Locale[] locales = getAvailableLocalesInternal();
52 Locale[] tmp = new Locale[locales.length];
53 System.arraycopy(locales, 0, tmp, 0, locales.length);
54 return tmp;
55 }
56
57 static Locale[] getAvailableLocalesInternal() {
58 return getNativeAvailableLocales();
59 }
60
|