sk.baka.ambient.views.gesturelist.keypad
Class KeypadManager

java.lang.Object
  extended by sk.baka.ambient.views.KeyEventHandler
      extended by sk.baka.ambient.views.gesturelist.keypad.KeypadManager
All Implemented Interfaces:
android.view.KeyEvent.Callback

public final class KeypadManager
extends KeyEventHandler

Manages the keypad.

Author:
Martin Vysny

Field Summary
 
Fields inherited from class sk.baka.ambient.views.KeyEventHandler
keyDownHandled
 
Constructor Summary
KeypadManager(GesturesListView owner)
          Creates new manager instance.
 
Method Summary
 void activate(java.lang.Class<? extends AbstractKeypadHandler> handlerClass)
          Activates required handler.
protected  boolean onConfirm()
          Invoked on center or KeyEvent.KEYCODE_ENTER key press.
protected  boolean onKey(int keyCode, int count, android.view.KeyEvent event)
          Invoked on key press.
 void selectionChanged()
          Invoked when the selection is changed in the underlying list view.
 
Methods inherited from class sk.baka.ambient.views.KeyEventHandler
compose, isConfirm, keyUp, moveFocus, onDown, onKey, onKeyDown, onKeyMultiple, onKeyUp, onLeft, onRight, onUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeypadManager

public KeypadManager(GesturesListView owner)
Creates new manager instance.

Parameters:
owner - the owner list view.
Method Detail

activate

public void activate(java.lang.Class<? extends AbstractKeypadHandler> handlerClass)
Activates required handler. If null then all handlers are deactivated.

Parameters:
handlerClass - the handler to activate.

onKey

protected boolean onKey(int keyCode,
                        int count,
                        android.view.KeyEvent event)
Description copied from class: KeyEventHandler
Invoked on key press. By default invokes one of the onUp, onDown... event handlers.

Overrides:
onKey in class KeyEventHandler
Parameters:
keyCode - the key code
count - the key repeat count. 0 is the first key press
event - the event
Returns:
true if the event was handled and is to be suppressed, false otherwise.

onConfirm

protected boolean onConfirm()
Description copied from class: KeyEventHandler
Invoked on center or KeyEvent.KEYCODE_ENTER key press.

Overrides:
onConfirm in class KeyEventHandler
Returns:
true if the event was handled and is to be suppressed, false otherwise.

selectionChanged

public void selectionChanged()
Invoked when the selection is changed in the underlying list view.



Copyright © 2007-2009. All Rights Reserved.