frog
Interface SessionListener

All Superinterfaces:
DeviceListener
All Known Implementing Classes:
EvaluationPanel, Player, PlayerPanel, RecognitionSectionPanel, TrainPanel, User

public interface SessionListener
extends DeviceListener

SessionListener stands as a level of abstraction between a user of Frog and an actual Device (DeviceListener). It can receive device events passed up from a Session as well as if a gesture was recognized by Session.

Author:
Team Better Recognize

Method Summary
 void accelerationPerformed(AccelEvent e)
          Executed whenever a Session detects an acceleration from a Device it is listening to.
 void gestureComplete(boolean good, Device d)
          Executed whenever a Session detects a complete gesture from a Device it is listening to.
 void gestureRecognized(GestureModel g)
          Executed whenever a Session has recognized a gesture performed by the Device it is listening to (requires being in recognition mode).
 void unexpectedDisconnect(Device d)
          Executed whenever a Session detects an unexpected disconnect from a Device it is listening to.
 

Method Detail

accelerationPerformed

void accelerationPerformed(AccelEvent e)
Executed whenever a Session detects an acceleration from a Device it is listening to.

Specified by:
accelerationPerformed in interface DeviceListener
Parameters:
e - contains the acceleration data and the calling device

gestureComplete

void gestureComplete(boolean good,
                     Device d)
Executed whenever a Session detects a complete gesture from a Device it is listening to.

Specified by:
gestureComplete in interface DeviceListener
Parameters:
good - true if this gesture is complete. false if this gesture should be discarded.
d - the device that completed the gesture

unexpectedDisconnect

void unexpectedDisconnect(Device d)
Executed whenever a Session detects an unexpected disconnect from a Device it is listening to.

Specified by:
unexpectedDisconnect in interface DeviceListener
Parameters:
d - Device that was unexpectedly disconnected

gestureRecognized

void gestureRecognized(GestureModel g)
Executed whenever a Session has recognized a gesture performed by the Device it is listening to (requires being in recognition mode).

Parameters:
g - The gesture recognized
See Also:
Session.inRecognitionMode()