|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.view.KeyCharacterMap
public class KeyCharacterMap
| Nested Class Summary | |
|---|---|
static class |
KeyCharacterMap.KeyData
|
| Field Summary | |
|---|---|
static int |
ALPHA
A keyboard with all the letters, and maybe some numbers. |
static int |
BUILT_IN_KEYBOARD
The id of the device's primary built in keyboard is always 0. |
static int |
COMBINING_ACCENT
|
static int |
COMBINING_ACCENT_MASK
Mask the return value from get(int, int) with this value to get
a printable representation of the accent character of a "dead key." |
static char |
HEX_INPUT
This private-use character is used to trigger Unicode character input by hex digits. |
static int |
NUMERIC
A numeric (12-key) keyboard. |
static char |
PICKER_DIALOG_INPUT
This private-use character is used to bring up a character picker for miscellaneous symbols. |
static int |
PREDICTIVE
A keyboard with all the letters, but with more than one letter per key. |
| Method Summary | |
|---|---|
protected void |
finalize()
Called by the virtual machine when there are no longer any (non-weak) references to the receiver. |
int |
get(int keyCode,
int meta)
Returns the Unicode character that the specified key would produce when the specified meta bits (see MetaKeyKeyListener)
were active. |
static int |
getDeadChar(int accent,
int c)
Get the character that is produced by putting accent on the character c. |
char |
getDisplayLabel(int keyCode)
Get the primary character for this key. |
KeyEvent[] |
getEvents(char[] chars)
Get an array of KeyEvent objects that if put into the input stream could plausibly generate the provided sequence of characters. |
int |
getKeyboardType()
Returns NUMERIC, PREDICTIVE or ALPHA. |
boolean |
getKeyData(int keyCode,
KeyCharacterMap.KeyData results)
Get the characters conversion data for a given keyCode. |
char |
getMatch(int keyCode,
char[] chars)
The same as getMatch(keyCode, chars, 0). |
char |
getMatch(int keyCode,
char[] chars,
int modifiers)
If one of the chars in the array can be generated by keyCode, return the char; otherwise return '\0'. |
char |
getNumber(int keyCode)
Gets the number or symbol associated with the key. |
boolean |
isPrintingKey(int keyCode)
Does this character key produce a glyph? |
static KeyCharacterMap |
load(int keyboard)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BUILT_IN_KEYBOARD
public static final int NUMERIC
public static final int PREDICTIVE
public static final int ALPHA
public static final char HEX_INPUT
public static final char PICKER_DIALOG_INPUT
public static final int COMBINING_ACCENT
public static final int COMBINING_ACCENT_MASK
get(int, int) with this value to get
a printable representation of the accent character of a "dead key."
| Method Detail |
|---|
public static KeyCharacterMap load(int keyboard)
public int get(int keyCode,
int meta)
Returns the Unicode character that the specified key would produce
when the specified meta bits (see MetaKeyKeyListener)
were active.
Returns 0 if the key is not one that is used to type Unicode characters.
If the return value has bit COMBINING_ACCENT set, the
key is a "dead key" that should be combined with another to
actually produce a character -- see getDeadChar(int, int) --
after masking with COMBINING_ACCENT_MASK.
public char getNumber(int keyCode)
public char getMatch(int keyCode,
char[] chars)
getMatch(keyCode, chars, 0).
public char getMatch(int keyCode,
char[] chars,
int modifiers)
keyCode - the key code to look atchars - the characters to try to findmodifiers - the modifier bits to prefer. If any of these bits
are set, if there are multiple choices, that could
work, the one for this modifier will be set.public char getDisplayLabel(int keyCode)
public static int getDeadChar(int accent,
int c)
public boolean getKeyData(int keyCode,
KeyCharacterMap.KeyData results)
keyCode - the keyCode to look forresults - a KeyCharacterMap.KeyData that will be filled with the results.
public KeyEvent[] getEvents(char[] chars)
public boolean isPrintingKey(int keyCode)
protected void finalize()
throws Throwable
ObjectNote: The virtual machine assumes that the implementation in class Object is empty.
finalize in class ObjectThrowable - The virtual machine ignores any exceptions which are
thrown during finalization.public int getKeyboardType()
NUMERIC, PREDICTIVE or ALPHA.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||