public abstract class SynergyNetApp extends java.lang.Object implements IMultiplicityApp, IScreenShotter, IMediaSearcher
Modifier and Type | Field and Description |
---|---|
static SynergyNetPosition |
localDevicePosition
The position of the current device's interface in its physical
environment.
|
static boolean |
MEDIA_SEARCH
If set to false no threads for searching identified drives will be
started.
|
static boolean |
networkFlickEnabled
Indicates whether items on the display can be transmitted to other tables
through the network flick feature.
|
static boolean |
NETWORKING
If set to false no calls to SynergyNetCluster will be made, allowing for
apps to be used without OpenFire running.
|
static boolean |
ONE_MEDIA_AT_A_TIME
If set to true only one piece of media will be able play at a time.
|
static AppSystemSync |
sync
Manages network cluster listeners.
|
Constructor and Description |
---|
SynergyNetApp() |
Modifier and Type | Method and Description |
---|---|
void |
bringAllStudentsToTop()
Brings all student menus and menu icons to the top of the environment.
|
void |
createScreenShotItem(com.jme3.math.Vector2f loc,
float rot)
Initiates the screenshot renderer to capture an image of the current
environment and call utiliseScreenshot with the image file it creates.
|
void |
disableNetworkFlick()
Disables network flick listeners from initiating a transfer.
|
void |
enableNetworkFlick()
Initiates the announcement to the network that it is now accepting items
from network flicks.
|
StudentMenu |
generateStudentMenu(StudentRepresentation student)
Creates a student menu for a given student representation.
|
java.util.ArrayList<java.lang.Class<? extends FeedbackItem>> |
getFeedbackTypes()
Returns an array of the feedback types current used in an application
extending SynergyNetApp.
|
java.lang.String |
getFriendlyAppName()
Sets the name of an application.
|
static java.lang.String |
getTableIdentity()
Gets the string representing the device's identity in the network
cluster.
|
StudentMenu |
login(java.lang.String studentID)
Will log in a student with the supplied ID.
|
void |
loginAll(java.util.ArrayList<java.lang.String[]> IDs)
Adds a list of student IDs to the start up roster.
|
void |
logout(java.lang.String studentID)
Logs out a specific student from the environment and removes their menu.
|
void |
logoutAll()
Logs out all students in the environment and removes their menus.
|
void |
logoutAllOfClass(java.lang.String className)
Logs out all students belonging to a specific class.
|
void |
modifyMenus(StudentMenu menu)
Can be overridden by applications extending SynergyNetApp to modify the
options made available by student menus.
|
void |
onContentFromProjectorArrival(java.util.ArrayList<ContentTransferedMessage> messages)
Retrieves details from the supplied message to recreate the transfered
item
|
void |
onDestroy()
Actions to be performed when the SynergyNetApp window is closed.
|
void |
onFind(java.io.File[] files)
Called by the media searching threads when images or audio recordings are
found on removable devices or the device's corresponding cache folder.
|
void |
onFlickArrival(FlickMessage message)
Retrieves details from the supplied message to recreate the flicked item
and to ensure it appears onscreen in the manner expected, i.e.
|
void |
reloadRemovableMediaCache()
Forces media searching threads to recreate items for any previously
discovered image or audio files found on any removable media drives.
|
void |
reloadServerCache()
Forces media searching threads to recreate items for any previously
discovered image or audio files found on the current device's
corresponding cache folder.
|
void |
removeAdditionalMedia()
Removes any items which are not part of the current application from the
environment.
|
void |
removeVirtualTable(SynergyNetPosition message)
Removes a device which should no longer be accessible.
|
void |
sendContentsToProjectors(java.lang.String[] projectorsToSendTo)
Send current contents of the app to a the list of projectors provided.
|
void |
sendScreenShotToProjectors(java.lang.String[] projectorsToSendTo)
Send screenshot of current contents of the app to a the list of
projectors provided.
|
void |
shouldStart(MultiTouchInputComponent input,
IQueueOwner iqo)
Executed at the start of each application which extended the
SynergyNetApp.
|
void |
shouldStop()
Called when a SynergyNetApp extending application is closed through
traditional means.
|
void |
toggleFreeze()
Adds or removes the blue item to represent a frozen workspace.
|
void |
updateVirtualTable(SynergyNetPosition message)
Retrieves details from the supplied message to create a virtual
representation of the device of screen in relation to its real life
position.
|
void |
utiliseScreenshot(java.io.File screenShotFile,
com.jme3.math.Vector2f loc,
float rot)
Creates a manipulable screenshot item using an image file and adds it to
the environment.
|
public static SynergyNetPosition localDevicePosition
public static boolean MEDIA_SEARCH
public static boolean networkFlickEnabled
public static boolean NETWORKING
public static boolean ONE_MEDIA_AT_A_TIME
public static AppSystemSync sync
public static java.lang.String getTableIdentity()
public void bringAllStudentsToTop()
public void createScreenShotItem(com.jme3.math.Vector2f loc, float rot)
loc
- Location at which the screenshot created should appear.rot
- Rotation at which the screenshot created should appear.public void disableNetworkFlick()
public void enableNetworkFlick()
public StudentMenu generateStudentMenu(StudentRepresentation student)
student
- The student representation to create a student menu for.public java.util.ArrayList<java.lang.Class<? extends FeedbackItem>> getFeedbackTypes()
public java.lang.String getFriendlyAppName()
getFriendlyAppName
in interface IMultiplicityApp
public StudentMenu login(java.lang.String studentID)
studentID
- ID of the student to be logged in.public void loginAll(java.util.ArrayList<java.lang.String[]> IDs)
IDs
- Array of the student IDs.public void logout(java.lang.String studentID)
studentID
- ID of the student to be logged out.public void logoutAll()
public void logoutAllOfClass(java.lang.String className)
className
- Name of the class for which all students belonging to it
should be logged out.public void modifyMenus(StudentMenu menu) throws ContentTypeNotBoundException
ContentTypeNotBoundException
public void onContentFromProjectorArrival(java.util.ArrayList<ContentTransferedMessage> messages)
message
- Structured message detailing the details of an item's
arrival.public void onDestroy()
onDestroy
in interface IMultiplicityApp
public void onFind(java.io.File[] files)
onFind
in interface IMediaSearcher
files
- The files discovered to be used in the app if not already
present.public void onFlickArrival(FlickMessage message)
message
- Structured message detailing the details of an item's
arrival.public void reloadRemovableMediaCache()
public void reloadServerCache()
public void removeAdditionalMedia()
public void removeVirtualTable(SynergyNetPosition message)
message
- Structured message detailing the device representation to
be removed.public void sendContentsToProjectors(java.lang.String[] projectorsToSendTo)
public void sendScreenShotToProjectors(java.lang.String[] projectorsToSendTo)
public void shouldStart(MultiTouchInputComponent input, IQueueOwner iqo)
shouldStart
in interface IMultiplicityApp
input
- The multi-touch input providing component.iqo
- Queue owner.public void shouldStop()
shouldStop
in interface IMultiplicityApp
public void toggleFreeze()
public void updateVirtualTable(SynergyNetPosition message)
message
- Structured message detailing a device's position.public void utiliseScreenshot(java.io.File screenShotFile, com.jme3.math.Vector2f loc, float rot)
utiliseScreenshot
in interface IScreenShotter
screenShotFile
- Image file to create the screenshot item from.loc
- Location at which the screenshot created should appear.rot
- Rotation at which the screenshot created should appear.