|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.sketch.toolbox.ModedIncrRecognizer
public abstract class ModedIncrRecognizer
An abstract class for "moded" incremental recognizers that examines the first part of a gesture to see if it matches its starting signal and thereafter responds to events in a moded interaction. For example, a "zoom" recognizer will first look for the zoom signal and output nothing until it sees this signal. If it recognizes the zoom signal it will switch into a zooming mode where every event effects the zoom output.
Field Summary | |
---|---|
protected static int |
ACTION
The recognizer has recognized the gesture as the signal and is processing incoming events as an indicators to perform the specified action. |
protected static int |
IDLE
The recognizer is IDLE, and should ignore all events except for STROKE_STARTED. |
protected static int |
UNKNOWN
The recognizer has started processing events but still doesn't know whether or not the the gesture matches the action signal. |
Constructor Summary | |
---|---|
ModedIncrRecognizer()
|
Method Summary | |
---|---|
protected abstract RecognitionSet |
processActionStroke(TimedStroke s)
Process an "action" event, performing the appropriate action behavior (e.g. |
protected abstract int |
recognizeActionSignal(TimedStroke s)
Recognize the action signal (it is still unknown) and return an indication (to the template algorithm) of what mode the algorithm should revert to. |
RecognitionSet |
strokeCompleted(TimedStroke s)
Invoked when a stroke is completed. |
RecognitionSet |
strokeModified(TimedStroke s)
Invoked when a stroke has been modified, for example, points have been added to the stroke. |
RecognitionSet |
strokeStarted(TimedStroke s)
Invoked when a stroke starts. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static int IDLE
protected static int UNKNOWN
protected static int ACTION
Constructor Detail |
---|
public ModedIncrRecognizer()
Method Detail |
---|
public RecognitionSet strokeStarted(TimedStroke s)
strokeStarted
in interface StrokeRecognizer
protected abstract RecognitionSet processActionStroke(TimedStroke s)
protected abstract int recognizeActionSignal(TimedStroke s)
public RecognitionSet strokeCompleted(TimedStroke s)
strokeCompleted
in interface StrokeRecognizer
public RecognitionSet strokeModified(TimedStroke s)
strokeModified
in interface StrokeRecognizer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |