|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.silentlycrashing.gestures.GestureListener
net.silentlycrashing.gestures.PostGestureListener
public class PostGestureListener
Listens for a matching gesture after the movement is completed.
| Field Summary | |
|---|---|
protected String |
activePattern
|
| Fields inherited from class net.silentlycrashing.gestures.GestureListener |
|---|
active, bounds, ga, inBounds, offAction, onAction, p, startPoint |
| Constructor Summary | |
|---|---|
PostGestureListener(PApplet parent,
GestureAnalyzer analyzer,
String pattern)
Builds a PostGestureListener covering the entire canvas. |
|
PostGestureListener(PApplet parent,
GestureAnalyzer analyzer,
String pattern,
int x,
int y,
int w,
int h)
Builds a bounded PostGestureListener. |
|
PostGestureListener(PApplet parent,
GestureAnalyzer analyzer,
String pattern,
Rectangle bounds)
Builds a bounded PostGestureListener. |
|
| Method Summary | |
|---|---|
void |
keepListening(PointInTime pt)
Does nothing. |
void |
reset()
Resets the GesureListener. |
void |
startListening(PointInTime pt)
Checks that the gesture is starting in the correct bounds and sets the start point. |
void |
stopListening(PointInTime pt)
Checks if the regex pattern is matched and sets the Listener as active or not. |
| Methods inherited from class net.silentlycrashing.gestures.GestureListener |
|---|
activate, deactivate, getStartPoint, isActive, registerOffAction, registerOnAction, setBounds |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String activePattern
| Constructor Detail |
|---|
public PostGestureListener(PApplet parent,
GestureAnalyzer analyzer,
String pattern)
parent - the parent PAppletanalyzer - the linked GestureAnalyzerpattern - the move pattern to match for the Listener to be active
public PostGestureListener(PApplet parent,
GestureAnalyzer analyzer,
String pattern,
int x,
int y,
int w,
int h)
parent - the parent PAppletanalyzer - the linked GestureAnalyzerpattern - the move pattern to match for the Listener to be activex - the x-coordinate of the bounding Rectangley - the y-coordinate of the bounding Rectanglew - the width of the bounding Rectangleh - the height of the bounding Rectangle
public PostGestureListener(PApplet parent,
GestureAnalyzer analyzer,
String pattern,
Rectangle bounds)
parent - the parent PAppletanalyzer - the linked GestureAnalyzerpattern - the move pattern to match for the Listener to be activebounds - the bounding Rectangle| Method Detail |
|---|
public void startListening(PointInTime pt)
startListening in class GestureListenerpt - the first PointInTime of the gesturepublic void keepListening(PointInTime pt)
keepListening in class GestureListenerpt - the current PointInTime of the gesture (unused)public void stopListening(PointInTime pt)
stopListening in class GestureListenerpt - the last PointInTime of the gesturepublic void reset()
The offAction should be calling this when it is complete.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||