Chapter 17. The java.awt.im PackageThe java.awt.im package contains classes and interfaces used by input methods and by the text-editing user interface components that interact with input methods. Most applications rely on GUI components that have input method support built in and do not need to use this package directly. In other words, input method details are usually hidden by text input components, and application-level code should never have to use these classes and interfaces. Figure 17-1 shows the class hierarchy of this package, which is new in Java 1.2. Figure 17-1. The java.awt.im package
This class serves as an intermediary between input methods and the text input components that use them. An InputContext stores the state related to one pending text composition operation. By default, there is one InputContext per Window. Components can obtain this shared input context with the Component.getInputContext() method. Components that need a private InputContext can create their own with InputContext.getInstance().
Returned By: Component.getInputContext(), Window.getInputContext(), InputContext.getInstance()
This class defines the highlighted or unhighlighted state of text being processed by an input method. For input methods, highlighting can be used to distinguish converted from unconverted text, as well as to distinguish selected from unselected text. InputMethodHighlight objects are used as attribute values returned by java.text.AttributedCharacterIterator objects. Note the various InputMethodHighlight constants predefined by this class.
Type Of: InputMethodHighlight.{SELECTED_CONVERTED_TEXT_HIGHLIGHT, SELECTED_RAW_TEXT_HIGHLIGHT, UNSELECTED_CONVERTED_TEXT_HIGHLIGHT, UNSELECTED_RAW_TEXT_HIGHLIGHT}
This interface defines the methods that a component must implement in order to accept text input from input methods. A component need not implement these methods directly, but it must return an object that implements this interface from a getInputMethodRequests() method.
Returned By: Component.getInputMethodRequests(), javax.swing.text.JTextComponent.getInputMethodRequests()
This class defines Character$Subset constants that are useful to input methods.
Hierarchy: Object-->Character.Subset-->InputSubset Type Of: InputSubset.{HALFWIDTH_KATAKANA, HANJA, KANJI, LATIN, LATIN_DIGITS, SIMPLIFIED_HANZI, TRADITIONAL_HANZI} Copyright © 2001 O'Reilly & Associates. All rights reserved. |
|