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

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

public final class KeypadSearch
extends AbstractKeypadHandler

Performs search using a keypad.

Author:
Martin Vysny

Field Summary
 
Fields inherited from class sk.baka.ambient.views.gesturelist.keypad.AbstractKeypadHandler
owner
 
Fields inherited from class sk.baka.ambient.views.KeyEventHandler
keyDownHandled
 
Constructor Summary
KeypadSearch(GesturesListView owner)
          Creates new search utility class.
 
Method Summary
 boolean isActivatedByKey(int keyCode, android.view.KeyEvent event)
          Checks if this handler is activated by given key press.
 boolean isStarted()
          Checks if this handler is started.
protected  boolean onKey(int keyCode, int count, android.view.KeyEvent event)
          Invoked on key press.
 void start()
          Starts this key handler.
 void stop()
          Stops this key handler.
 
Methods inherited from class sk.baka.ambient.views.gesturelist.keypad.AbstractKeypadHandler
selectionChanged
 
Methods inherited from class sk.baka.ambient.views.KeyEventHandler
compose, isConfirm, keyUp, moveFocus, onConfirm, 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

KeypadSearch

public KeypadSearch(GesturesListView owner)
Creates new search utility class.

Parameters:
owner - owner listview
Method Detail

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.

isActivatedByKey

public boolean isActivatedByKey(int keyCode,
                                android.view.KeyEvent event)
Description copied from class: AbstractKeypadHandler
Checks if this handler is activated by given key press.

Specified by:
isActivatedByKey in class AbstractKeypadHandler
Parameters:
keyCode - the key code
event - the event.
Returns:
true if this handler should be activated, false otherwise.

isStarted

public boolean isStarted()
Description copied from class: AbstractKeypadHandler
Checks if this handler is started.

Specified by:
isStarted in class AbstractKeypadHandler
Returns:
true if started, false otherwise.

start

public void start()
Description copied from class: AbstractKeypadHandler
Starts this key handler. The handler should initialize and start listening for keys.

Specified by:
start in class AbstractKeypadHandler

stop

public void stop()
Description copied from class: AbstractKeypadHandler
Stops this key handler. The handler should clean up. No more keys will be received unless AbstractKeypadHandler.start() is invoked again.

Specified by:
stop in class AbstractKeypadHandler


Copyright © 2007-2009. All Rights Reserved.