FROG

FROG Recognizer of Gestures

User Class Reference

This class is the FROGUI abstraction for Session. More...

Inheritance diagram for User:
Collaboration diagram for User:

List of all members.

Public Member Functions

 User (int index)
 Creates a new user with the specified index.
Device getDevice ()
 Returns the device this user has connected.
int getIndex ()
 Returns the index of this user.
Session getSession ()
 Returns the Session currently associated with this user.
String getUserName ()
 Returns the name of the User this object represents.
void saveSession (File saveFile) throws NullPointerException, IOException
 Attempts to serialize this User's current Session into a File for later retrieval.
void setDevice (Device d) throws IOException
 Sets the Device for this User to use.
void setUserName (String userName)
 This method sets the name of the user to be used in dialogs, user files, etc.
void setSession (Session s) throws IOException
 Sets the Session for the User.
void setSession (File openFile) throws Exception
 Creates a new Session from the given serialized session file and sets that as the User's current Session.
String toString ()
void accelerationPerformed (AccelEvent e)
 Executed whenever a Session detects an acceleration from a Device it is listening to.
void unexpectedDisconnect (Device d)
 Executed whenever a Session detects an unexpected disconnect 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).

Detailed Description

This class is the FROGUI abstraction for Session.

It listens to the Session and provides access to most of its methods for GUI use.

Author:
Team Better Recognize

Constructor & Destructor Documentation

User ( int  index  ) 

Creates a new user with the specified index.

Parameters:
index the index of this user.

Here is the call graph for this function:


Member Function Documentation

void accelerationPerformed ( AccelEvent  e  ) 

Executed whenever a Session detects an acceleration from a Device it is listening to.

Implements SessionListener.

void gestureComplete ( boolean  good,
Device  d 
)

Executed whenever a Session detects a complete gesture from a Device it is listening to.

Implements SessionListener.

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()

Implements SessionListener.

Device getDevice (  ) 

Returns the device this user has connected.

If no device is connected, it will return null. You can use hasDeviceConnected() to verify beforehand.

Returns:
device the user has connected or null if no Device is connected.

Here is the call graph for this function:

Here is the caller graph for this function:

int getIndex (  ) 

Returns the index of this user.

Returns:
the index of this user.
Session getSession (  ) 

Returns the Session currently associated with this user.

Returns:
this User's current Session.

Here is the caller graph for this function:

String getUserName (  ) 

Returns the name of the User this object represents.

Returns:
string representing the name of the user.

Here is the caller graph for this function:

void saveSession ( File  saveFile  )  throws NullPointerException, IOException

Attempts to serialize this User's current Session into a File for later retrieval.

Parameters:
saveFile a valid File to write the Session object to
Exceptions:
NullPointerException if the Session was null
IOException if a problem occurred while serializing the Session

Here is the call graph for this function:

Here is the caller graph for this function:

void setDevice ( Device  d  )  throws IOException

Sets the Device for this User to use.

Parameters:
d this User's new Device.

Here is the call graph for this function:

Here is the caller graph for this function:

void setSession ( File  openFile  )  throws Exception

Creates a new Session from the given serialized session file and sets that as the User's current Session.

Parameters:
openFile a File containing a serialized Session object

Here is the call graph for this function:

void setSession ( Session  s  )  throws IOException

Sets the Session for the User.

Parameters:
s session to be associated to this object.

Here is the call graph for this function:

Here is the caller graph for this function:

void setUserName ( String  userName  ) 

This method sets the name of the user to be used in dialogs, user files, etc.

Parameters:
userName the name to be given to this User.
String toString (  ) 
void unexpectedDisconnect ( Device  d  ) 

Executed whenever a Session detects an unexpected disconnect from a Device it is listening to.

Implements SessionListener.


The documentation for this class was generated from the following file:
  • /Users/dev/Documents/SVN brazos.cs.tcu.edu/trunk/FROG/src/frog/gui/User.java
 All Classes Namespaces Files Functions Variables