|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.vietpad.inputmethod.VietKeyInput
public class VietKeyInput
Vietnamese keyboard driver (input engine) for Java text components.
An instance of the VietKeyListener
class serves as a preprocessor to this class.
Together, they give Swing text components the capability of Vietnamese text input.
Input keys for diacritical marks follow VNI convention:
1: ', 2: `, 3: ?, 4: ~, 5: ., 6: ^, 7: +, 8: (, 9: -, 0: remove diacritics.Also, repeating the accent key deletes the accent just entered.
Method Summary | |
---|---|
static char |
getAccentInTelex(String curWord,
char key,
char accent)
Determines the correct accent for Telex mode. |
static boolean |
isAccentRemoved()
Determines if accent is removed by repeating accent key, not by designated accent-removing key. |
static void |
setDiacriticsPosClassic(boolean classic)
Sets the diacritics position to follow the classic style. |
static String |
shiftAccent(String curWord,
char key)
Shifts the accent mark to the correct vowel in a multiple-vowel sequence, as in tòa + n -> toàn. |
static char |
toVietChar(char curChar,
char accentKey)
Composes the Vietnamese character. |
static char |
toVietChar(char curChar,
int accentIndex)
Composes the Vietnamese character. |
static String |
toVietWord(String curWord,
char accentKey)
Composes the Vietnamese word. |
static String |
toVietWord(String curWord,
int accentIndex)
Composes the Vietnamese word. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static char toVietChar(char curChar, char accentKey)
curChar
- the character at current caret positionaccentKey
- the accent key, ranging from '0' - '9'
public static char toVietChar(char curChar, int accentIndex)
curChar
- the character at current caret positionaccentIndex
- the code point value of the accent key, ranging from 0 - 9
public static String toVietWord(String curWord, char accentKey)
curWord
- the word at current caret positionaccentKey
- accent key, ranging from '0' - '9'
public static String toVietWord(String curWord, int accentIndex)
curWord
- the word at current caret positionaccentIndex
- the code point value of the accent key, ranging from 0 - 9
public static String shiftAccent(String curWord, char key)
curWord
- the word at current caret positionkey
- the key input
public static char getAccentInTelex(String curWord, char key, char accent)
curWord
- the word at current caret positionkey
- the key inputaccent
- the accent key for Telex
public static boolean isAccentRemoved()
public static void setDiacriticsPosClassic(boolean classic)
classic
- true for classic (òa, òe, úy); false for modern (oà, oè, uý)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |