|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.livescribe.util.TapAndHoldGesture
public abstract class TapAndHoldGesture
This can be used by applications to check if the user has tapped at a point on the paper and held the pen at the same point for a specified period of time.
This is basically a timer that calls handleTick(long) one or more
times at the specified interval. It can be reused.
| Constructor Summary | |
|---|---|
TapAndHoldGesture()
Creates a new tap and hold gesture. |
|
| Method Summary | |
|---|---|
void |
activate(long timeout)
Activates the timer. |
void |
deactivate()
Deactivates the timer. |
protected abstract boolean |
handleTick(long elapsed)
This is called when a timeout has elapsed. |
protected void |
init()
Called when the gesture is acivated. |
boolean |
isActive()
Check if this is active. |
void |
run()
This will run on the timer thread. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TapAndHoldGesture()
| Method Detail |
|---|
public final void activate(long timeout)
handleTick(long) is
called. This does nothing if the timer is already active.
Additionally, init() is called before the timer is started.
timeout - wait this long before triggering the eventhandleTick(long),
init()public final void deactivate()
public final boolean isActive()
public final void run()
run in interface RunnableThread.run()protected void init()
activate(long).protected abstract boolean handleTick(long elapsed)
elapsed - total time that has elapsed since we were activated,
in ms
true if we are done and don't need to handle more
events, and false if more events are expected.activate(long)
|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||