User Class Reference
This class is the FROGUI abstraction for Session. More...
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.
Constructor & Destructor Documentation
User | ( | int | index | ) |
Creates a new user with the specified index.
- Parameters:
-
index the index of this user.
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.
int getIndex | ( | ) |
Returns the index of this user.
- Returns:
- the index of this user.
Session getSession | ( | ) |
String getUserName | ( | ) |
Returns the name of the User this object represents.
- Returns:
- string representing the name of the user.
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
void setDevice | ( | Device | d | ) | throws IOException |
Sets the Device for this User to use.
- Parameters:
-
d this User's new Device.
void setSession | ( | File | openFile | ) | throws Exception |
void setSession | ( | Session | s | ) | throws IOException |
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