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 manages the communication between text editing components and input methods. It dispatches events between them and forwards requests for information from the input method to the text editing component. It also lets text editing components select input methods by locale.

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.

NotThe 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 supportprovide input methods. Where

inputInput 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; the InputContext instancetheir methods return without doing anythingbehavior is specified with the (selectLocaleindividual returnsmethods false)below. @see java.awt.Component#getInputContext @see java.awt.Component#enableInputMethods @version 1.14 0527 02/0911/9800 @author JavaSoft Asia/Pacific @since 1.2

Class InputContext, constructor InputContext()

Constructs an InputContext. This method is protected so clients cannot instantiate InputContext directly. Input contexts are obtained by calling #getInstance
Class InputContext, void dispatchEvent(AWTEvent)

Dispatches an event to the active input method. Called by AWT. If the platformno does notinput support input methodsmethod is available then the event will never be consumed. @param event The event @exception NullPointerException if event is null
Class InputContext, void dispose()

Disposes of the input context and release the resources used by it. Called by AWT. Iffor the platformdefault input context of each doesWindow. not supportIf no input methods are available then this method has no effect.
Class InputContext, void endComposition()

Ends any input composition that may currently be going on in this context. Depending on the platform and possibly user preferences this may commit or delete uncommitted text. Any changes to the text are communicated to the active component using an input method event. If the platform does not supportno input methods are available then this method has no effect.

A text editing component may call this in a variety of situations for example when the user moves the insertion point within the text (but outside the composed text) or when the component's text is saved to a file or copied to the clipboard.

Class InputContext, Object getInputMethodControlObject()

Returns a control object from the current input method or null. A control object provides methods that control the behavior of the input method or obtain information from the input method. The type of the object is an input method specific class. Clients have to compare the result against known input method control object classes and cast to the appropriate class to invoke the methods provided.

If no input methods are available or the platformcurrent input method does not supportprovide an input methodsmethod control object then null is returned. @return A control object from the current input method or null.

Class InputContext, void removeNotify(Component)

Notifies the input context that a client component has been removed from its containment hierarchy or that input method support has been disabled for the component. This method is usually called from java.awt.Component.removeNotify() of the client component's Component.removeNotify method. Potentially pending input from input methods for this component is discarded. If no input methods are available then this method has no effect. @param client Client component @exception NullPointerException if client is null
Class InputContext, boolean selectInputMethod(Locale)

Selects an input method that supports the given locale. If the currently selected input method supports the desired locale or if there's no input method available that supports the desired locale the current input method remains active. Otherwise an input method is selected that supports text input for the desired locale. Before switching to a different input method any currently uncommitted text is committed. If the platform does not supportno input methods ormethod supporting the desired locale is available then false is returned.

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 Whether the input method that's active after this call supports the desired locale. @exception NullPointerException if locale is null

Class InputContext, void setCharacterSubsets(Subset[])

Sets the subsets of the Unicode character set that input methods of this input context should be allowed to input. Null may be passed in to indicate that all characters are allowed. The initial value is null. The setting applies to the current input method as well as input methods selected after this call is made. However applications cannot rely on this call having the desired effect since this setting cannot be passed on to all host input methods - applications still need to apply their own character validation. If the platform does not supportno input methods are available then this method has no effect. @param subsets The subsets of the Unicode character set from which characters may be input

Class InputMethodHighlight

AAn InputMethodHighlight is used to describe in an abstract way the highlight attributes of text being composed. A range ofThe textdescription can be selectedat ortwo levels: unselectedat andthe abstract level it canspecifies bethe conversion highlightedstate inand whether the text is selected; at the differentconcrete level it specifies style attributes waysused to indicaterender the conversionhighlight. stateAn InputMethodHighlight must provide the description at the abstract level; it may or othermay 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 interestingthat the input method specific informationis currently aboutworking on for example the textsegment for which conversion candidates are currently shown in a menu. state represents the conversion state. Two statesState values are predefineddefined by the input method framework and supported directly byshould be distinguished Graphics2D:in all mappings from abstract to concrete styles. Currently defined state values are raw (unconverted) and converted text. These stylesstate 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. HoweverThe variation field allows input methods can add their own style variations as necessaryto 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.9 0517 02/0402/9800 @see java.text.AttributedCharacterIterator @since 1.2

Class InputMethodHighlight, constructor InputMethodHighlight(boolean, int)

Constructs an input method highlight record. The variation is set to 0 the style to null. @param selected Whether the text range is selected @param state The conversion state for the text range - RAW_TEXT or CONVERTED_TEXT @see InputMethodHighlight#RAW_TEXT @see InputMethodHighlight#CONVERTED_TEXT @exception IllegalArgumentException if a state other than RAW_TEXT or CONVERTED_TEXT is given
Class InputMethodHighlight, constructor InputMethodHighlight(boolean, int, int)

Constructs an input method highlight record. The style is set to null. @param selected Whether the text range is selected @param state The conversion state for the text range - RAW_TEXT or CONVERTED_TEXT @param variation The style variation for the text range @see InputMethodHighlight#RAW_TEXT @see InputMethodHighlight#CONVERTED_TEXT @exception IllegalArgumentException if a state other than RAW_TEXT or CONVERTED_TEXT is given
Class InputMethodHighlight, int getVariation()

Returns the style variation of the text range.

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.10 0515 02/1202/9800 @author JavaSoft Asia/Pacific @since JDK11.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.2 988 02/0902/1600 @since JDK11.2
Class InputSubset, InputSubset HALFWIDTH_KATAKANA

Constant for the halfwidth katakana subset of the Unicode halfwidth and fullwidth forms character blocksblock.