edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd Class Reference

Collaboration diagram for edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd:

Collaboration graph
[legend]
List of all members.

Detailed Description

The front-end application for running the Wizard of Oz wizard.

Author:
Brian Ellis


Public Member Functions

 WizardOfOzFrontEnd ()
 Constructs a WizardOfOzFrontEnd.
void addNewNotification (String name, String text, Person person, double priority, NotificationType type)
 <<<<<<< .mine Adds a new notification remotely.
void addNewTask (String name, double priority, boolean onHold, boolean complete, boolean hasDueDate, Calendar dueDate)
 <<<<<<< .mine Adds a new task remotely.
void changeSelectedNotification (String name, String text, Person person, double priority)
 <<<<<<< .mine Changes the notification that is currently selected in the list remotely.
void changeSelectedTask (String name, double priority, boolean onHold, boolean complete, boolean hasDueDate, Calendar dueDate)
 <<<<<<< .mine Changes the task that is currently selected in the list remotely.
void deleteSelectedNotification ()
 Delete the notification that is currently selected in the list if it still exists.
void deleteSelectedTask ()
 Delete the task that is currently selected in the list if it still exists.
void requestNotificationList ()
 Requests the list of notifications managed on the engine side.
void requestTaskList ()
 Requests the list of tasks managed on the engine side.
void startInputReadingLoop ()
 Loops to read from the input stream until done is set to true.
void windowActivated (WindowEvent e)
 Does nothing when the window is activated.
void windowClosed (WindowEvent e)
 Does nothing when the window is closed.
void windowClosing (WindowEvent e)
 When the window is closing, perfoms socket cleanup and shuts off the engine.
void windowDeactivated (WindowEvent e)
 Does nothing when the window is deactivated.
void windowDeiconified (WindowEvent e)
 Does nothing when the window is deiconified.
void windowIconified (WindowEvent e)
 Does nothing when the window is iconified.
void windowOpened (WindowEvent e)
 Does nothing when the window is opened.

Static Public Member Functions

static void main (String[] args)
 Main function.

Package Attributes

Thread frontEndInputLoopThread
 The thread that looks for input from the engine.
Socket clientSocket = null
 The client socket.

Private Member Functions

void ignoreNotificationModelUpdates (boolean isIgnoring)
 Tells the engine to make sure the controller ignores updates from the notification model to ensure atomic updates for animations.
void addNotification (Notification notification)
 Adds a notification to the notification manager via the engine.
void addTasklikeObject (TasklikeObject task)
 Adds a tasklike object to the task manager via the engine.
void onInputReceived (Object o)
 Takes input from off of the input stream and determines what to do with the messages received.
void performThreadyMagic ()
 Initializes and connect the sockets and threads we need to connect to the sidebar, showing a dialog to the user to determine what address to connect to.
void readObject (java.io.ObjectInputStream in) throws IOException, ClassNotFoundException
 Reads in a serialized front end.
void removeNotification (Notification notification)
 Removes a notification from the notification manager via the engine.
void removeTasklikeObject (TasklikeObject task)
 Removes a tasklike object from the task manager via the engine.
synchronized void sendMessage (Message msg)
 Sends a message to the engine.
void setNotificationName (Notification notification, String newName)
 Determines and sets the name of a notification.
void setNotificationPerson (Notification notification, Person newPerson)
 Determines and sets the person for a notification.
void setNotificationPriority (Notification notification, double newPriority)
 Determines and sets the priority of a notification.
void setNotificationText (Notification notification, String newText)
 Changes a notification's text via the engine.
void setTaskCompleted (Task task, boolean newCompleted)
 Sets the completed state of a task.
void setTaskPending (Task task, boolean newPending)
 Sets the pending state of a task.
void setTaskPriority (Task task, double newPriority)
 Sets the priority of a task.
void stopEngine ()
 Stops the engine for cleanup.
void updateNotifications (List< Notification > newNotes)
 Updates the GUI.
void updateTasks (List< Task > newTasks)
 Updates the GUI.
void writeObject (java.io.ObjectOutputStream out) throws IOException
 Writes this front end to stream.

Private Attributes

WOZFrontEndFrame frame
 The wizard frame.
List< Tasktasks
 The task list model.
List< Notificationnotifications
 The notification list model.
ObjectOutputStream output
 The stream of serialized objects that this front end writes to to allow the engine to communicate to it.
ObjectInputStream input
 The stream of serialized object that this front end reads to allow the engine to communicate to it.

Static Private Attributes

static final long serialVersionUID = 461154975424237010L
 Prevent serialization collisions.

Classes

class  NotificationListModel
 The model for the notification list. More...
class  NotificationListSelectionListener
 Loads the selected notification's information into the appropriate fields. More...
class  TaskListModel
 The model for the task list. More...
class  TaskListSelectionListener
 Loads the selected task's information into the appropriate fields. More...


Constructor & Destructor Documentation

edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.WizardOfOzFrontEnd (  ) 

Constructs a WizardOfOzFrontEnd.


Member Function Documentation

static void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.main ( String[]  args  )  [static]

Main function.

Run me to launch the Wizard.

Parameters:
args command-line args, none of which matter

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.addNewNotification ( String  name,
String  text,
Person  person,
double  priority,
NotificationType  type 
)

<<<<<<< .mine Adds a new notification remotely.

Parameters:
name the name of the new notification
text the text of the email, if this is an email notification
person the person who should appear to have sent the email, if this is an email notification
priority the priority of this notification (over 100 won't coalesce)
type the type of this notification ======= Tells the engine to add a new notification to the notification manager.
name the name of this notification
text this notification's text
person the person associated with this notification, if any
priority this notification's priority
type this notification's type >>>>>>> .r244

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.addNewTask ( String  name,
double  priority,
boolean  onHold,
boolean  complete,
boolean  hasDueDate,
Calendar  dueDate 
)

<<<<<<< .mine Adds a new task remotely.

Parameters:
name the name of this task
priority the priority of this task
onHold whether this task should be on hold
complete whether this task should be complete
hasDueDate whether this task has a due date
dueDate if hasDueDate is true, the due date of this task (otherwise undefined and probably null) ======= Tells the engine to add a new task to the task manager.
name this task's name
priority this task's priority
onHold whether this task is on hold
complete whether this task is complete
hasDueDate whether this task has a set due date
dueDate the due date for this task, if any >>>>>>> .r244

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.changeSelectedNotification ( String  name,
String  text,
Person  person,
double  priority 
)

<<<<<<< .mine Changes the notification that is currently selected in the list remotely.

Parameters:
name the name of the new notification
text the text of the email, if this is an email notification
person the person who should appear to have sent the email, if this is an email notification
priority the priority of this notification (over 100 won't coalesce) ======= Changes the values in a given notification.
name the notification's new name
text the notification's new text
person the new person associated with the notification
priority the notification's new priority >>>>>>> .r244

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.ignoreNotificationModelUpdates ( boolean  isIgnoring  )  [private]

Tells the engine to make sure the controller ignores updates from the notification model to ensure atomic updates for animations.

Parameters:
isIgnoring whether to ignore updates or not

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.changeSelectedTask ( String  name,
double  priority,
boolean  onHold,
boolean  complete,
boolean  hasDueDate,
Calendar  dueDate 
)

<<<<<<< .mine Changes the task that is currently selected in the list remotely.

Parameters:
name the name of this task
priority the priority of this task
onHold whether this task should be on hold
complete whether this task should be complete
hasDueDate whether this task has a due date
dueDate if hasDueDate is true, the due date of this task (otherwise undefined and probably null) ======= Changes the values in a given task.
name the task's new name
priority the task's new priority
onHold whether this task is now on hold
complete whether this task is now complete
hasDueDate whether this task now has a due date
dueDate the task's new due date if any >>>>>>> .r244

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.deleteSelectedNotification (  ) 

Delete the notification that is currently selected in the list if it still exists.

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.deleteSelectedTask (  ) 

Delete the task that is currently selected in the list if it still exists.

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.requestNotificationList (  ) 

Requests the list of notifications managed on the engine side.

Hopefully, this will cause an update in the near-term future.

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.requestTaskList (  ) 

Requests the list of tasks managed on the engine side.

Hopefully, this will cause an update in the near-term future.

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.startInputReadingLoop (  ) 

Loops to read from the input stream until done is set to true.

Puts messages onto a queue for reading later.

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.windowActivated ( WindowEvent  e  ) 

Does nothing when the window is activated.

Parameters:
e the window activation event
See also:
java.util.eventlistener.windowActivated(java.awt.event.WindowEvent)

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.windowClosed ( WindowEvent  e  ) 

Does nothing when the window is closed.

Parameters:
e the window closed event
See also:
java.util.eventlistener.windowClosed(java.awt.event.WindowEvent)

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.windowClosing ( WindowEvent  e  ) 

When the window is closing, perfoms socket cleanup and shuts off the engine.

Parameters:
e the window closing event
See also:
java.util.eventlistener.windowClosing(java.awt.event.WindowEvent)

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.windowDeactivated ( WindowEvent  e  ) 

Does nothing when the window is deactivated.

Parameters:
e the window deactivation event
See also:
java.util.eventlistener.windowDeactivated(java.awt.event.WindowEvent)

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.windowDeiconified ( WindowEvent  e  ) 

Does nothing when the window is deiconified.

Parameters:
e the window deiconification event
See also:
java.util.eventlistener.windowDeiconified(java.awt.event.WindowEvent)

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.windowIconified ( WindowEvent  e  ) 

Does nothing when the window is iconified.

Parameters:
e the window iconification event
See also:
java.util.eventlistener.windowIconified(java.awt.event.WindowEvent)

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.windowOpened ( WindowEvent  e  ) 

Does nothing when the window is opened.

Parameters:
e the window open event
See also:
java.util.eventlistener.windowOpened(java.awt.event.WindowEvent)

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.addNotification ( Notification  notification  )  [private]

Adds a notification to the notification manager via the engine.

Parameters:
notification the notification who will be added
Exceptions:
IOException 

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.addTasklikeObject ( TasklikeObject  task  )  [private]

Adds a tasklike object to the task manager via the engine.

Parameters:
task the task who will be added
Exceptions:
IOException 

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.onInputReceived ( Object  o  )  [private]

Takes input from off of the input stream and determines what to do with the messages received.

It ignores things that it can't translate.

<<<<<<< .mine

Parameters:
o the object we received off the stream
Todo:
Break this up better, an if list seems a bit crude.
======= >>>>>>> .r244
Exceptions:
IOException 

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.performThreadyMagic (  )  [private]

Initializes and connect the sockets and threads we need to connect to the sidebar, showing a dialog to the user to determine what address to connect to.

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.readObject ( java.io.ObjectInputStream  in  )  throws IOException, ClassNotFoundException [private]

Reads in a serialized front end.

Just checks against the serialVersionUID since this is not used except for error checking.

Parameters:
in the input stream to read from
Exceptions:
IOException 
ClassNotFoundException 

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.removeNotification ( Notification  notification  )  [private]

Removes a notification from the notification manager via the engine.

Parameters:
notification the notification who will be removed

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.removeTasklikeObject ( TasklikeObject  task  )  [private]

Removes a tasklike object from the task manager via the engine.

Parameters:
task the task who will be removed
Exceptions:
IOException 

synchronized void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.sendMessage ( Message  msg  )  [private]

Sends a message to the engine.

Parameters:
msg the message to send to the engine

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.setNotificationName ( Notification  notification,
String  newName 
) [private]

Determines and sets the name of a notification.

Parameters:
notification the notification whose name will be updated
newName the name to change to
Exceptions:
IOException 

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.setNotificationPerson ( Notification  notification,
Person  newPerson 
) [private]

Determines and sets the person for a notification.

Parameters:
notification the notification whose priority will be updated
newPerson the person to change
Exceptions:
IOException 

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.setNotificationPriority ( Notification  notification,
double  newPriority 
) [private]

Determines and sets the priority of a notification.

<<<<<<< .mine

Parameters:
notification the notification whose priority will be updated
newPriority the priority to change to =======
notification the notification whose priority will be updated
newPriority the priority to change to >>>>>>> .r244

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.setNotificationText ( Notification  notification,
String  newText 
) [private]

Changes a notification's text via the engine.

Parameters:
notification the notification to change
newText the text to change

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.setTaskCompleted ( Task  task,
boolean  newCompleted 
) [private]

Sets the completed state of a task.

Only updates if the completed status changes.

Parameters:
task the task whose completed status will be updated
newCompleted the completed state to update to
Exceptions:
IOException 

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.setTaskPending ( Task  task,
boolean  newPending 
) [private]

Sets the pending state of a task.

Only updated if pending status changes.

Parameters:
task the task whose pending status will be updated
newPending the pending state to update to
Exceptions:
IOException 

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.setTaskPriority ( Task  task,
double  newPriority 
) [private]

Sets the priority of a task.

Only updates if the priority changes.

Parameters:
task the task whose priority will be updated
newPriority the priority to update to
Exceptions:
IOException 

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.stopEngine (  )  [private]

Stops the engine for cleanup.

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.updateNotifications ( List< Notification newNotes  )  [private]

Updates the GUI.

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.updateTasks ( List< Task newTasks  )  [private]

Updates the GUI.

void edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.writeObject ( java.io.ObjectOutputStream  out  )  throws IOException [private]

Writes this front end to stream.

Since I don't use this except for confirmation, I just write the ID for error checking.

Parameters:
out the output stream to write to
Exceptions:
IOException 


Member Data Documentation

final long edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.serialVersionUID = 461154975424237010L [static, private]

Prevent serialization collisions.

Thread edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.frontEndInputLoopThread [package]

The thread that looks for input from the engine.

Socket edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.clientSocket = null [package]

The client socket.

WOZFrontEndFrame edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.frame [private]

The wizard frame.

List<Task> edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.tasks [private]

The task list model.

List<Notification> edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.notifications [private]

The notification list model.

ObjectOutputStream edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.output [private]

The stream of serialized objects that this front end writes to to allow the engine to communicate to it.

ObjectInputStream edu.cmu.hcii.calo.thinkaloud.WizardOfOzFrontEnd.input [private]

The stream of serialized object that this front end reads to allow the engine to communicate to it.


The documentation for this class was generated from the following file:
Generated on Mon Aug 13 15:06:20 2007 for CALO by  doxygen 1.5.2