1 <!-- 2 Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved. 3 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 5 This code is free software; you can redistribute it and/or modify it 6 under the terms of the GNU General Public License version 2 only, as 7 published by the Free Software Foundation. Oracle designates this 8 particular file as subject to the "Classpath" exception as provided 9 by Oracle in the LICENSE file that accompanied this code. 10 11 This code is distributed in the hope that it will be useful, but WITHOUT 12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 version 2 for more details (a copy is included in the LICENSE file that 15 accompanied this code). 16 17 You should have received a copy of the GNU General Public License version 18 2 along with this work; if not, write to the Free Software Foundation, 19 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 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 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> 27 <!--This file created 7/22/1999 11:47 by Claris Home Page version 2.0--> 28 <HTML> 29 <HEAD> 30 <TITLE>Package java.awt.im.spi Description</TITLE> 31 <META NAME=GENERATOR CONTENT="Claris Home Page 2.0"> 32 <X-SAS-WINDOW TOP=51 BOTTOM=592 LEFT=171 RIGHT=701> 33 </HEAD> 34 <BODY BGCOLOR="#FFFFFF"> 35 36 <P>Provides interfaces that enable the development of input methods 37 that can be used with any Java runtime environment. Input methods are 38 software components that let the user enter text in ways other than 39 simple typing on a keyboard. They are commonly used to enter 40 Japanese, Chinese, or Korean - languages using thousands of different 41 characters - on keyboards with far fewer keys. However, this package 42 also allows the development of input methods for other languages and 43 the use of entirely different input mechanisms, such as handwriting 44 recognition.</P> 45 46 <H2><A NAME="package_specification"></A>Package Specification</H2> 47 48 <UL> 49 <LI><B><A HREF="../../../../../technotes/guides/imf/spec.html">Input Method 50 Framework Specification</A></B> 51 52 <LI><B><A HREF="../../../../../technotes/guides/imf/spi-reference.html">Input 53 Method Engine SPI Reference</A></B> 54 </UL> 55 56 <H4><A NAME="Packaging"></A>Packaging Input Methods</H4> 57 58 <P>Input methods can be made available by adding them to the application's 59 class path. The main JAR file of an input method must contain the 60 file:</P> 61 62 <PRE> META-INF/services/java.awt.im.spi.InputMethodDescriptor</PRE> 63 64 <P>The file should contain a list of fully-qualified class names, one 65 per line, of classes implementing the 66 <CODE>java.awt.im.spi.InputMethodDescriptor</CODE> interface. Space 67 and tab characters surrounding each name, as well as blank lines, are 68 ignored. The comment character is <CODE>'#'</CODE> 69 (<CODE>\u0023</CODE>); on each line all characters following the 70 first comment character are ignored. The file must be encoded in 71 UTF-8.</P> 72 73 <P>For example, if the fully-qualified name of the class that 74 implements <CODE>java.awt.im.spi.InputMethodDesciptor</CODE> for the 75 <EM>Foo</EM> input method is 76 <CODE>com.sun.ime.FooInputMethodDescriptor</CODE>, the file 77 <CODE>META-INF/services/java.awt.im.spi.InputMethodDescriptor</CODE> 78 contains a line:</P> 79 80 <PRE> com.sun.ime.FooInputMethodDescriptor</PRE> 81 82 <P>The input method must also provide at least two classes: one class 83 implementing the <CODE>java.awt.im.spi.InputMethodDescriptor</CODE> 84 interface, one class implementing the 85 <CODE>java.awt.im.spi.InputMethod</CODE> interface. The input method 86 should separate the implementations for these interfaces, so that 87 loading of the class implementing <CODE>InputMethod</CODE> can be 88 deferred until actually needed.</P> 89 90 <H4><A NAME="Loading"></A>Loading Input Methods</H4> 91 92 <P>The input method framework will usually defer loading of input 93 method classes until they are absolutely needed. It loads only the 94 <CODE>InputMethodDescriptor</CODE> implementations during AWT 95 initialization. It loads an <CODE>InputMethod</CODE> implementation 96 when the input method has been selected.</P> 97 98 <H4><A NAME="PeeredComponents"></A>Java Input Methods and Peered Text 99 Components</H4> 100 101 <P>The Java input method framework intends to support all 102 combinations of input methods (host input methods and Java input 103 methods) and components (peered and lightweight). However, because of 104 limitations in the underlying platform, it may not always be possible 105 to enable the communication between Java input methods and peered AWT 106 components. Support for this specific combination is therefore 107 platform dependent. In Sun's Java SE Runtime Environments, this 108 combination is supported on Windows, but not on Solaris.</P> 109 110 <H2>Related Documentation</H2> 111 112 <P>For overviews, tutorials, examples, guides, and tool 113 documentation, please see:</P> 114 115 <UL> 116 <LI><B><A HREF="../../../../../technotes/guides/imf/overview.html">Input 117 Method Framework Overview</A></B> 118 119 <LI><B><A HREF="../../../../../technotes/guides/imf/spi-tutorial.html">Input 120 Method Engine SPI Tutorial</A></B> 121 </UL> 122 123 @since 1.3 124 </BODY> 125 </HTML>