|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.blackledge.david.tivo.widgets.qk.handlers.QuadrantsKeyboardHandler
public class QuadrantsKeyboardHandler
Constructor Summary | |
---|---|
QuadrantsKeyboardHandler()
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QuadrantsKeyboardHandler()
Method Detail |
---|
public void abortCharacter()
QuickKeyboardHandler
QuickKeyboard.setCharacter(String)
is deleted (no need to do
it yourself. layout/cues will be requested next.
abortCharacter
in interface QuickKeyboardHandler
public boolean buttonPress(int keyCode)
QuickKeyboardHandler
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
QuickKeyboardHandler.getExtraKeyLabels()
to provide a list of cues for these mode
changing keys. Layout/cues will be requested next.
buttonPress
in interface QuickKeyboardHandler
keyCode
- the key pressed by the user
public void finishCharacter()
QuickKeyboardHandler
QuickKeyboard.setCharacter(String)
with a null value here to abort it. layout/cues will be requested
next.
finishCharacter
in interface QuickKeyboardHandler
public String[] getCharacterLayout()
QuickKeyboardHandler
getCharacterLayout
in interface QuickKeyboardHandler
public List getCues()
QuickKeyboardHandler
getCues
in interface QuickKeyboardHandler
QKCue
objectspublic Map getExtraKeyLabels()
QuickKeyboardHandler
QuickKeyboard.getDefaultExtraKeys()
and optionally add to
that LinkedHashMap
before returning it.
getExtraKeyLabels
in interface QuickKeyboardHandler
public void init(QuickKeyboard keyboard)
QuickKeyboardHandler
QuickKeyboard.setCharacter(String)
, etc., as appropriate.
init
in interface QuickKeyboardHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |