|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface QuickKeyboardHandler
The class that defines the layout, cues, and logic in selecting keyboard characters in a minimal number of strokes.
Method Summary | |
---|---|
void |
abortCharacter()
Reset handler state - the user pressed an aborting key like delete/backspace and the last uncommitted value passed to QuickKeyboard.setCharacter(String) is deleted (no need to do
it yourself. |
boolean |
buttonPress(int keyCode)
Alters the state of the keyboard handler and may cause a character to be set and possibly the cursor to be advanced. |
void |
finishCharacter()
Set a character if you can settle on one in current state, then reset state - the user pressed an escaping action key like left/right/space - if you cannot settle on a character in the current state (i.e. |
String[] |
getCharacterLayout()
Array of strings as character rows {"abcd","efgh"...} - use spaces to create gaps |
List |
getCues()
List of all currently active cues to display to the user indicating what a particular keyCode will activate on the screen given the current state of the keyboard handler. |
Map |
getExtraKeyLabels()
To provide a map of any other keys you want displayed to the user with a short label next to them. |
void |
init(QuickKeyboard keyboard)
initialization - handler needs to hold on to this reference to call QuickKeyboard.setCharacter(String) , etc., as appropriate. |
Method Detail |
---|
void init(QuickKeyboard keyboard)
QuickKeyboard.setCharacter(String)
, etc., as appropriate.
String[] getCharacterLayout()
List getCues()
QKCue
objectsMap getExtraKeyLabels()
QuickKeyboard.getDefaultExtraKeys()
and optionally add to
that LinkedHashMap
before returning it.
boolean buttonPress(int keyCode)
QuickKeyboard.setCharacter(String)
and
usually QuickKeyboard.nextCharacter()
. This is also where
the handler should support additional character sets on particular
button presses e.g. Thumbs Up/Down for upper/lowercase set. Use
getExtraKeyLabels()
to provide a list of cues for these mode
changing keys. Layout/cues will be requested next.
keyCode
- the key pressed by the user
void abortCharacter()
QuickKeyboard.setCharacter(String)
is deleted (no need to do
it yourself. layout/cues will be requested next.
void finishCharacter()
QuickKeyboard.setCharacter(String)
with a null value here to abort it. layout/cues will be requested
next.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |