net.silentlycrashing.gestures
Class MouseGestureAnalyzer

java.lang.Object
  extended by net.silentlycrashing.gestures.GestureAnalyzer
      extended by net.silentlycrashing.gestures.MouseGestureAnalyzer

public class MouseGestureAnalyzer
extends GestureAnalyzer

Records gestures made using the mouse for analysis.


Field Summary
private  int buttonToCheck
           
 
Fields inherited from class net.silentlycrashing.gestures.GestureAnalyzer
DOWN, KEY_SIZE, LEFT, p, RIGHT, UP
 
Constructor Summary
MouseGestureAnalyzer(PApplet parent)
          Builds a MouseGestureAnalyzer with default button and minimum offset.
MouseGestureAnalyzer(PApplet parent, int button)
          Builds a MouseGestureAnalyzer with default minimum offset.
MouseGestureAnalyzer(PApplet parent, int button, int min)
          Builds a MouseGestureAnalyzer.
 
Method Summary
 void mouseEvent(MouseEvent event)
          Handles a MouseEvent.
 
Methods inherited from class net.silentlycrashing.gestures.GestureAnalyzer
getGesture, getMinOffset, invokeStartActions, invokeStopActions, invokeUpdateActions, isDebug, isRecognized, isVerbose, matches, registerStartAction, registerStopAction, registerUpdateAction, setDebug, setMinOffset, setVerbose, start, stop, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buttonToCheck

private int buttonToCheck
Constructor Detail

MouseGestureAnalyzer

public MouseGestureAnalyzer(PApplet parent)
Builds a MouseGestureAnalyzer with default button and minimum offset.

Parameters:
parent - the parent PApplet

MouseGestureAnalyzer

public MouseGestureAnalyzer(PApplet parent,
                            int button)
Builds a MouseGestureAnalyzer with default minimum offset.

Parameters:
parent - the parent PApplet
button - the mouse button to check

MouseGestureAnalyzer

public MouseGestureAnalyzer(PApplet parent,
                            int button,
                            int min)
Builds a MouseGestureAnalyzer.

Parameters:
parent - the parent PApplet
button - the mouse button to check
min - the minimum offset
Method Detail

mouseEvent

public void mouseEvent(MouseEvent event)
Handles a MouseEvent.

Registered to be called automatically by the PApplet.

Parameters:
event - the incoming MouseEvent