|
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.
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.Class InputContext, constructor InputContext()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 localessupportprovide 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 instancetheirmethods return without doing anythingbehavior is specified with the(selectLocaleindividualreturnsmethodsfalse)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
Constructs an InputContext. This method is protected so clients cannot instantiate InputContext directly. Input contexts are obtained by calling #getInstanceClass InputContext, void dispatchEvent(AWTEvent)
Dispatches an event to the active input method. Called by AWT. IfClass InputContext, void dispose()the platformnodoes notinputsupport input methodsmethod is available then the event will never be consumed. @param event The event @exception NullPointerException ifevent
is null
Disposes of the input context and release the resources used by it. Called by AWTClass InputContext, void endComposition().Iffor theplatformdefault input context of eachdoesWindow.not supportIf no input methods are available then this method has no effect.
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. IfClass InputContext, Object getInputMethodControlObject()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.
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.Class InputContext, void removeNotify(Component)If no input methods are available or the
platformcurrent input method does notsupportprovide an inputmethodsmethod control object then null is returned. @return A control object from the current input method or null.
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 fromClass InputContext, boolean selectInputMethod(Locale)java.awt.Component.removeNotify() ofthe 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 ifclient
is null
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. IfClass InputContext, void setCharacterSubsets(Subset[])the platform does not supportno inputmethods 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
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. Ifthe 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, constructor InputMethodHighlight(boolean, int)AAn InputMethodHighlight is used to describein an abstract waythe highlight attributes of text being composed.A range ofThetextdescription can beselectedatortwo levels:unselectedatandthe abstract level itcanspecifiesbethe conversionhighlightedstateinand whether the text is selected; at thedifferentconcrete level it specifies style attributeswaysused toindicaterender theconversionhighlight.stateAn InputMethodHighlight must provide the description at the abstract level; it may orothermay 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 oneinterestingthat the input methodspecific informationis currentlyaboutworking on for example thetextsegment for which conversion candidates are currently shown in a menu.state
represents the conversion state.Two statesState values arepredefineddefined by the input method framework andsupported directly byshould be distinguishedGraphics2D:in all mappings from abstract to concrete styles. Currently defined state values are raw (unconverted) and convertedtext. Thesestylesstate 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.HoweverThevariation
field allows input methodscan 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
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 givenClass 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 givenClass InputMethodHighlight, int getVariation()
Returns thestylevariation of the text range.
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.
10 0515 02/1202/9800 @author JavaSoft Asia/Pacific @sinceJDK11.2
Defines additional Unicode subsets for use by input methods. Unlike the UnicodeBlock subsets defined in theClass InputSubset, InputSubset HALFWIDTH_KATAKANA{@link java.lang.Character.UnicodeBlock}
class these constants do not directly correspond to Unicode code blocks. @version 1.2 988 02/0902/1600 @sinceJDK11.2
Constant for the halfwidth katakana subset of the Unicode halfwidth and fullwidth forms characterblocksblock.