Generated by
JDiff

java.awt.im Documentation Differences

This file contains all the changes in documentation in the package java.awt.im as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class InputContext

An InputContext object managesProvides methods to control thetext input communication between text editing componentsfacilities such as input methods and inputkeyboard methodslayouts. ItTwo methods dispatches events between themhandle both input methods and forwardskeyboard requestslayouts: for information fromselectInputMethod lets a theclient component select an input method to theor keyboard textlayout by locale getLocale editinglets a client component obtain the locale of the current input method or keyboard layout. It also letsThe other methods textmore specifically support interaction with input methods: They editinglet client components selectcontrol the behavior of input methods byand localedispatch events from the client component to the input method.

By default one InputContext instance is created per Window instance and this input context is shared by all components within the window's container hierarchy. However this means that only one text input operation is possible at any one time within a window and that the text needs to be committed when moving the focus from one text component to another. If this is not desired text components can create their own input context instances.

The Java 2 platform supports input methods that have been developed in the Java programming language using the interfaces in the java.awt.im.spi package and installed into a Java 2 runtime environment as extensions. Implementations may also support using the native input methods of the platforms they run on; however not all platforms and locales provide input methods. Keyboard layouts are provided by the host platform.

Input methods are unavailable if (a) no input method written in the Java programming language has been installed and (b) the Java 2 implementation or the underlying platform does not support native input methods. In this case input contexts can still be created and used; their behavior is specified with the individual methods below. @see java.awt.Component#getInputContext @see java.awt.Component#enableInputMethods @version 1.28 0431 12/0603/0001 @author JavaSoft Asia/Pacific @since 1.2

Class InputContext, Locale getLocale()

Returns the current locale of the current input method or keyboard layout. Returns null if the input context does not have a current input method or keyboard layout or if the current input method's java.awt.im.spi.InputMethod#getLocale() method returns null.

Not all host operating systems provide API to determine the locale of the currently selected native input method or keyboard layout. For host operating systems that don't provide such API getLocale assumes that the current locale of all native input methods or keyboard layouts provided by the host operating system is the system's default locale. @return the current locale of the current input method or keyboard layout @since 1.3

Class InputContext, boolean selectInputMethod(Locale)

SelectsAttempts to select an input method or keyboard layout that supports the given locale and returns a value indicating whether such an input method or keyboard layout has been successfully selected. The following steps are taken until an input method has been selected:

Before switching to a differentaway from an input method any currently uncommitted text is committed. If no input method or keyboard layout supporting the desiredrequested locale is available then false is returned.

Not all host operating systems provide API to determine the locale of the currently selected native input method or keyboard layout and to select a native input method or keyboard layout by locale. For host operating systems that don't provide such API selectInputMethod assumes that native input methods or keyboard layouts provided by the host operating system support only the system's default locale.

A text editing component may call this method for example when the user changes the insertion point so that the user can immediately continue typing in the language of the surrounding text. @param locale The desired new locale. @return Whethertrue if the input method or keyboard layout that's active after this call supports the desired locale. @exception NullPointerException if locale is null


Class InputMethodHighlight

An InputMethodHighlight is used to describe the highlight attributes of text being composed. The description can be at two levels: at the abstract level it specifies the conversion state and whether the text is selected; at the concrete level it specifies style attributes used to render the highlight. An InputMethodHighlight must provide the description at the abstract level; it may or may not provide the description at the concrete level. If no concrete style is provided a renderer should use java.awt.Toolkit#mapInputMethodHighlight to map to a concrete style.

The abstract description consists of three fields: selected state and variation. selected indicates whether the text range is the one that the input method is currently working on for example the segment for which conversion candidates are currently shown in a menu. state represents the conversion state. State values are defined by the input method framework and should be distinguished in all mappings from abstract to concrete styles. Currently defined state values are raw (unconverted) and converted. These state values are recommended for use before and after the main conversion step of text composition say before and after kana->kanji or pinyin->hanzi conversion. The variation field allows input methods to express additional information about the conversion results.

InputMethodHighlight instances are typically used as attribute values returned from AttributedCharacterIterator for the INPUT_METHOD_HIGHLIGHT attribute. They may be wrapped into Annotation instances to indicate separate text segments. @version 1.17 0218 12/0203/0001 @see java.text.AttributedCharacterIterator @since 1.2


Class InputMethodRequests

InputMethodRequests defines the requests that a text editing component has to handle in order to work with input methods. The component can implement this interface itself or use a separate object that implements it. The object implementing this interface must be returned from the component's getInputMethodRequests method.

The text editing component also has to provide an input method event listener.

The interface is designed to support one of two input user interfaces:

@see java.awt.Component#getInputMethodRequests @see java.awt.event.InputMethodListener @version 1.15 0216 12/0203/0001 @author JavaSoft Asia/Pacific @since 1.2

Class InputSubset

Defines additional Unicode subsets for use by input methods. Unlike the UnicodeBlock subsets defined in the {@link java.lang.Character.UnicodeBlock} class these constants do not directly correspond to Unicode code blocks. @version 1.8 029 12/0203/0001 @since 1.2