TopBlend: Here is the first difference. There are 5 differences. is old. is new.


Package java.awt.im.spi

Provides interfaces that enable the development of input methodsthat can be used with any Java runtime environment.

See:
           Description

Interface Summary
InputMethod Defines the interface for an input method that supports complex text input.
InputMethodContext Provides methods that input methods can use to communicate with their client components or to request other services.
InputMethodDescriptor Defines methods that provide sufficient information about an input method to enable selection and loading of that input method.
 

Package java.awt.im.spi Description

Provides interfaces that enable the development of input methodsthat can be used with any Java runtime environment. Input methods aresoftware components that let the user enter text in ways other thansimple typing on a keyboard. They are commonly used to enterJapanese, Chinese, or Korean - languages using thousands of differentcharacters - on keyboards with far fewer keys. However, this packagealso allows the development of input methods for other languages andthe use of entirely different input mechanisms, such as handwritingrecognition.

Package Specification

Packaging Input Methods

Input methods are packaged as installed extensions, as specifiedby the ExtensionMechanism ExtensionMechanism . The main JAR file of an input method must contain thefile:

    META-INF/services/java.awt.im.spi.InputMethodDescriptor

The file should contain a list of fully-qualified class names, oneper line, of classes implementing thejava.awt.im.spi.InputMethodDescriptor interface. Spaceand tab characters surrounding each name, as well as blank lines, areignored. The comment character is '#'(\u0023); on each line all characters following thefirst comment character are ignored. The file must be encoded inUTF-8.

For example, if the fully-qualified name of the class thatimplements java.awt.im.spi.InputMethodDesciptor for theFoo input method iscom.sun.ime.FooInputMethodDescriptor, the fileMETA-INF/services/java.awt.im.spi.InputMethodDescriptorcontains a line:

    com.sun.ime.FooInputMethodDescriptor

The input method must also provide at least two classes: one classimplementing the java.awt.im.spi.InputMethodDescriptorinterface, one class implementing thejava.awt.im.spi.InputMethod interface. The input methodshould separate the implementations for these interfaces, so thatloading of the class implementing InputMethod can bedeferred until actually needed.

Loading Input Methods

The input method framework will usually defer loading of inputmethod classes until they are absolutely needed. It loads only theInputMethodDescriptor implementations during AWTinitialization. It loads an InputMethod implementationwhen the input method has been selected.

Java Input Methods and Peered TextComponents

The Java input method framework intends to support allcombinations of input methods (host input methods and Java inputmethods) and components (peered and lightweight). However, because oflimitations in the underlying platform, it may not always be possibleto enable the communication between Java input methods and peered AWTcomponents. Support for this specific combination is thereforeplatform dependent. In Sun's Java SE Runtime Environments, 2 runtime environments, thiscombination is supported on Windows, but not on Solaris.

Related Documentation

For overviews, tutorials, examples, guides, and tooldocumentation, please see:

Since:
JDK1.3