|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.sketch.toolbox.ModedIncrRecognizer
diva.sketch.toolbox.ZoomRecognizer
public class ZoomRecognizer
A recognizer that recognizes "zoom" gestures ("Z") and then zooms in if the the events are "down" and out if the events are "up". ZoomRecognizer calls upon a ClassifyingRecognizer to recognize "Z". Since ClassifyingRecognizer reports results by dispatching events to its listeners, we use a local classification listener in the ZoomRecognizer to receive the events and report back to the ZoomRecognizer.
Nested Class Summary | |
---|---|
static class |
ZoomRecognizer.ZoomData
A classification type for zooming. |
Field Summary | |
---|---|
static String |
LETTER_Z
|
Fields inherited from class diva.sketch.toolbox.ModedIncrRecognizer |
---|
ACTION, IDLE, UNKNOWN |
Constructor Summary | |
---|---|
ZoomRecognizer(double zoomFactor,
StrokeRecognizer r)
Construct a zoom recognizer with the given scaling factor and a classifying recognizer which has been trained on "Z" shapes.. |
|
ZoomRecognizer(StrokeRecognizer r)
Construct a zoom recognizer with a default scaling factor of 1.0 and a classifying recognizer which has been trained on "Z" shapes. |
Method Summary | |
---|---|
double |
getZoomFactor()
Return the zoom scaling factor for this recognizer. |
RecognitionSet |
processActionStroke(TimedStroke s)
Emit zoom events based on whether the mouse has gone up or down. |
int |
recognizeActionSignal(TimedStroke s)
Perform the recognition of the "Z". |
void |
setZoomFactor(double zoomFactor)
Set the zoom scaling factor for this recognizer. |
Methods inherited from class diva.sketch.toolbox.ModedIncrRecognizer |
---|
strokeCompleted, strokeModified, strokeStarted |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String LETTER_Z
Constructor Detail |
---|
public ZoomRecognizer(StrokeRecognizer r)
public ZoomRecognizer(double zoomFactor, StrokeRecognizer r)
setZoomFactor(double)
Method Detail |
---|
public double getZoomFactor()
setZoomFactor(double)
public RecognitionSet processActionStroke(TimedStroke s)
processActionStroke
in class ModedIncrRecognizer
public int recognizeActionSignal(TimedStroke s)
recognizeActionSignal
in class ModedIncrRecognizer
public void setZoomFactor(double zoomFactor)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |