|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packagejava.awt.im
as colored differences. Deletions are shownlike 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, Locale getLocale()An InputContext object managesProvides methods to controlthetext inputcommunication between text editing componentsfacilities such as input methods andinputkeyboardmethodslayouts.ItTwo methodsdispatches events between themhandle both input methods andforwardskeyboardrequestslayouts:for information fromselectInputMethod lets atheclient component select an input methodto theor keyboardtextlayout by locale getLocaleeditinglets a client component obtain the locale of the current input method or keyboard layout.It also letsThe other methodstextmore specifically support interaction with input methods: Theyeditinglet client componentsselectcontrol the behavior of input methodsbyandlocaledispatch 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
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.Class InputContext, boolean selectInputMethod(Locale)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
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:
If the currently selected input method or keyboard layout supports the
desiredrequested localeoritifremains selected.If there'sis no input method or keyboard layout available that supports thedesiredrequested locale the current input method or keyboard layout remainsactiveselected.OtherwiseIf the user has previously selected an input method isor keyboard layout for the requested locale from the user interface then the most recently selectedthat supportssuch inputtextmethod or keyboard layout is reselected.Otherwise an input formethod or keyboard layout that supports thedesiredrequested locale is selected in an implementation dependent way.Before switching
to a differentaway from an input method any currently uncommitted text is committed. If no input method or keyboard layout supporting thedesiredrequested 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 iflocale
is null
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
andvariation
.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. Thevariation
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
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.
- on-the-spot input where the composed text is displayed as part of the text component's text body.
- below-the-spot input where the composed text is displayed in a separate composition window just below the insertion point where the text will be inserted when it is committed. Note that if text is selected within the component's text body this text will be replaced by the committed text upon commitment; therefore it is not considered part of the context that the text is input into.
15 0216 12/0203/0001 @author JavaSoft Asia/Pacific @since 1.2
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