Packages
 In this topic

*Constructors

*Methods

*Fields

 

Packages   PreviousThis PackageNext
Package com.ms.util.InputMethod   Previous This
Package
Next

 


Class IMECompositionMessage

public class IMECompositionMessage extends InputMethodMessage
{
  // Fields
  public final static int CHANGE_COMPOSITION;
  public final static int END_COMPOSITION;
  public final static int START_COMPOSITION;
  public final static int UNKNOWN;

  // Constructors
  public IMECompositionMessage( int id );
  public IMECompositionMessage( int id, int keyCode, int keyChar,
        String compStr );

  // Methods
  public String getComposition();
  public int getID();
  public int getKeyChar();
  public int getkeyCode();
  public void setComposition( String compStr );
  public void setKeyChar( int keyChar );
  public void setKeyCode( int keyCode );
  public String toString();
}

This class implements Input Method (IME) Composition messages.

InputMethodMessage
  |
  +--IMECompositionMessage

Constructors

IMECompositionMessage

public IMECompositionMessage( int id );

Creates an Input Method Composition message.

ParameterDescription
id The message identifier, which can be one of the following:
START_COMPOSITION
END_COMPOSITION
CHANGE_COMPOSITION
UNKNOWN

IMECompositionMessage

public IMECompositionMessage( int id, int keyCode, int keyChar,
        String compStr );

Creates an Input Method Composition message that has a specific key code, key character, and composition string.

ParameterDescription
id The message identifier, which can be one of the following:
START_COMPOSITION
END_COMPOSITION
CHANGE_COMPOSITION
UNKNOWN
keyCode The message key code.
keyChar The message key character.
compStr The message composition string.

Methods

getComposition

public String getComposition();

Retrieves the composition string from an IMECompositionMessage object.

Return Value:

Returns the message composition string (which can be null if a string hasn't been specified for the object).

getID

public int getID();

Retrieves the message identifier from an IMECompositionMessage object.

Return Value:

Returns the message identifier, which can be one of the following:
START_COMPOSITION END_COMPOSITION CHANGE_COMPOSITION UNKNOWN

or 0 if id hasn't been specified for the message.

getKeyChar

public int getKeyChar();

Retrieves the key character from an IMECompositionMessage object.

Return Value:

Returns the message key character (which can be 0 if keyChar hasn't been specified for the message).

See Also: setKeyChar

getkeyCode

public int getkeyCode();

Retrieves the key code from an IMECompositionMessage object.

Return Value:

Returns the message key code (which can be 0 if keyCode hasn't been specified for the message).

See Also: setkeyCode

setComposition

public void setComposition( String compStr );

Sets the IMECompositionMessage object composition string.

Return Value:

No return value.

ParameterDescription
compStr The message composition string.

setKeyChar

public void setKeyChar( int keyChar );

Sets the IMECompositionMessage key character.

Return Value:

No return value.

ParameterDescription
keyChar The character that is set.

setKeyCode

public void setKeyCode( int keyCode );

Sets the IMECompositionMessage key code.

Return Value:

No return value.

ParameterDescription
keyCode The char that is set.

toString

public String toString();

Translates the IMECompositionMessage object to text form.

Return Value:

Returns a description of the IMECompositionMessage . For example, if the IMECompositionMessage is a START_COMPOSITION message, the text "IMECompositionMessage, START_COMPOSITION keyCode=keyCode keyChar=keyChar composition=compositionString" is returned.

Fields

CHANGE_COMPOSITION
A message used to alert a Component that a composition has changed.
END_COMPOSITION
A message used to alert a Component object that a composition is finished.
START_COMPOSITION
A message used to alert a Component object that a composition has started.
UNKNOWN
An unknown composition message.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.