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 are packaged as installed extensions, as specified
  59 by the <A HREF="../../../../../technotes/guides/extensions/index.html">Extension
  60 Mechanism</A>. The main JAR file of an input method must contain the
  61 file:</P>
  62 
  63 <PRE>    META-INF/services/java.awt.im.spi.InputMethodDescriptor</PRE>
  64 
  65 <P>The file should contain a list of fully-qualified class names, one
  66 per line, of classes implementing the
  67 <CODE>java.awt.im.spi.InputMethodDescriptor</CODE> interface. Space
  68 and tab characters surrounding each name, as well as blank lines, are
  69 ignored. The comment character is <CODE>'#'</CODE>
  70 (<CODE>\u0023</CODE>); on each line all characters following the
  71 first comment character are ignored. The file must be encoded in
  72 UTF-8.</P>
  73 
  74 <P>For example, if the fully-qualified name of the class that
  75 implements <CODE>java.awt.im.spi.InputMethodDesciptor</CODE> for the
  76 <EM>Foo</EM> input method is
  77 <CODE>com.sun.ime.FooInputMethodDescriptor</CODE>, the file
  78 <CODE>META-INF/services/java.awt.im.spi.InputMethodDescriptor</CODE>
  79 contains a line:</P>
  80 
  81 <PRE>    com.sun.ime.FooInputMethodDescriptor</PRE>
  82 
  83 <P>The input method must also provide at least two classes: one class
  84 implementing the <CODE>java.awt.im.spi.InputMethodDescriptor</CODE>
  85 interface, one class implementing the
  86 <CODE>java.awt.im.spi.InputMethod</CODE> interface. The input method
  87 should separate the implementations for these interfaces, so that
  88 loading of the class implementing <CODE>InputMethod</CODE> can be
  89 deferred until actually needed.</P>
  90 
  91 <H4><A NAME="Loading"></A>Loading Input Methods</H4>
  92 
  93 <P>The input method framework will usually defer loading of input
  94 method classes until they are absolutely needed. It loads only the
  95 <CODE>InputMethodDescriptor</CODE> implementations during AWT
  96 initialization. It loads an <CODE>InputMethod</CODE> implementation
  97 when the input method has been selected.</P>
  98 
  99 <H4><A NAME="PeeredComponents"></A>Java Input Methods and Peered Text
 100 Components</H4>
 101 
 102 <P>The Java input method framework intends to support all
 103 combinations of input methods (host input methods and Java input
 104 methods) and components (peered and lightweight). However, because of
 105 limitations in the underlying platform, it may not always be possible
 106 to enable the communication between Java input methods and peered AWT
 107 components. Support for this specific combination is therefore
 108 platform dependent. In Sun's Java SE Runtime Environments, this
 109 combination is supported on Windows, but not on Solaris.</P>
 110 
 111 <H2>Related Documentation</H2>
 112 
 113 <P>For overviews, tutorials, examples, guides, and tool
 114 documentation, please see:</P>
 115 
 116 <UL>
 117    <LI><B><A HREF="../../../../../technotes/guides/imf/overview.html">Input
 118    Method Framework Overview</A></B>
 119    
 120    <LI><B><A HREF="../../../../../technotes/guides/imf/spi-tutorial.html">Input
 121    Method Engine SPI Tutorial</A></B>
 122 </UL>
 123 
 124 @since 1.3
 125 </BODY>
 126 </HTML>