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
public IMECompositionMessage( int id );
Creates an Input Method Composition message.
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.
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).
public int getID();
Retrieves the message identifier from an IMECompositionMessage object.
Return Value:
Returns the message identifier, which can be one of the following:
or 0 if id hasn't been specified for the message.
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
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
public void setComposition( String compStr );
Sets the IMECompositionMessage object composition string.
Return Value:
No return value.
Parameter | Description |
compStr
| The message composition string.
|
public void setKeyChar( int keyChar );
Sets the IMECompositionMessage key character.
Return Value:
No return value.
Parameter | Description |
keyChar
| The character that is set.
|
public void setKeyCode( int keyCode );
Sets the IMECompositionMessage key code.
Return Value:
No return value.
Parameter | Description |
keyCode
| The char that is set.
|
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.
- 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.