Public Member Functions | |
WizardOfOzFrontEnd () | |
Constructs the front end instance. | |
List< Notification > | getNotificationList () |
A getter for the list of notifications managed on the engine side. | |
List< Task > | getTaskList () |
A getter for the list of tasks managed on the engine side. | |
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. | |
void | actionPerformed (ActionEvent e) |
Called when the buttons are clicked. | |
Engine Test Methods | |
These methods allow public access to engine methods for use in testing.
| |
void | testAddTasklikeObject (TasklikeObject task) |
Allows an external caller add a tasklike object to the task manager. | |
List< Notification > | testGetNotificationList () throws IOException |
Allows an external caller to get the list of the notification manager's notifications. | |
List< Task > | testGetTaskList () throws IOException |
Allows an external caller to get the list of the task manager's tasks. | |
void | testSetNotificationPriority (Notification notification) throws IOException |
Allows an external caller to set a notification priority. | |
void | testSetTaskPriority (Task task) throws IOException |
Allows an external caller to set a task prioirty. | |
void | testStopEngine () throws IOException |
Allows an external caller to stop the engine. | |
Static Public Member Functions | |
static void | main (String[] args) |
Runs a the Wizard of Oz frontend. | |
Package Attributes | |
Socket | clientSocket = null |
The client socket. | |
Private Member Functions | |
void | addTasklikeObject (TasklikeObject task) |
Adds a tasklike object to the task manager via the engine. | |
void | createGUI () |
Creates the GUI for the front end. | |
Map< String, Object > | onInputReceived (Object o) throws IOException |
Takes input from off of the input stream and determines what to do with the messages received. | |
void | readObject (java.io.ObjectInputStream in) throws IOException, ClassNotFoundException |
Reads in a serialized front end. | |
Map< String, Object > | sendMessage (Message msg) |
Sends a message to the engine and awaits a response. | |
void | setNotificationPriority (Notification notification) |
Determines and sets the priority of a notification. | |
void | setTaskPriority (Task task) |
Determines and sets the priority of a task. | |
void | stopEngine () |
Stops the engine for cleanup. | |
void | writeObject (java.io.ObjectOutputStream out) throws IOException |
Writes this front end to stream. | |
Private Attributes | |
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. | |
JFrame | guiWindow |
The GUI window. | |
JScrollPane | consoleScroller |
The scroller for the console. | |
JTextArea | console |
Displays console output. | |
JButton | refreshButton |
Refreshes the task list. | |
JButton | addButton |
Adds a task to the task list. | |
JPanel | taskListPanel |
A separator between the add and reset priority areas. | |
int | taskIndex |
A label for tasks. | |
List< Task > | tasks |
The the tasks that the front end currently tracks. | |
Static Private Attributes | |
static final long | serialVersionUID = 461154975828537010L |
Prevent serialization collisions. | |
static final Dimension | WINDOW_SIZE = new Dimension(640, 480) |
The initial size of the window. | |
static final String | ADD_TASK = "AddTask" |
Add action identifier. | |
static final String | REFRESH_TASKS = "RefreshTasks" |
Refresh action identifier. | |
static final String | PRIORITY_BUTTON = "PriorityButton" |
Refresh action identifier. |
edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.WizardOfOzFrontEnd | ( | ) |
Constructs the front end instance.
static void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.main | ( | String[] | args | ) | [static] |
Runs a the Wizard of Oz frontend.
This is a client; run it second.
args | command-line args; don't bother passing any |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.addTasklikeObject | ( | TasklikeObject | task | ) | [private] |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.createGUI | ( | ) | [private] |
Creates the GUI for the front end.
List<Notification> edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.getNotificationList | ( | ) |
A getter for the list of notifications managed on the engine side.
List<Task> edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.getTaskList | ( | ) |
Map<String, Object> edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.onInputReceived | ( | Object | o | ) | throws IOException [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.
o | the object sent across the socket |
IOException |
void edu.cmu.hcii.calo.engine.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.
in | the input stream to read from |
IOException | ||
ClassNotFoundException |
Map<String, Object> edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.sendMessage | ( | Message | msg | ) | [private] |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.setNotificationPriority | ( | Notification | notification | ) | [private] |
Determines and sets the priority of a notification.
notification | the notification whose priority will be updated |
IOException |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.setTaskPriority | ( | Task | task | ) | [private] |
Determines and sets the priority of a task.
task | the task whose priority will be updated |
IOException |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.stopEngine | ( | ) | [private] |
Stops the engine for cleanup.
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.testAddTasklikeObject | ( | TasklikeObject | task | ) |
Allows an external caller add a tasklike object to the task manager.
task | the tasklike object to add |
IOException |
List<Notification> edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.testGetNotificationList | ( | ) | throws IOException |
Allows an external caller to get the list of the notification manager's notifications.
IOException |
List<Task> edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.testGetTaskList | ( | ) | throws IOException |
Allows an external caller to get the list of the task manager's tasks.
IOException |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.testSetNotificationPriority | ( | Notification | notification | ) | throws IOException |
Allows an external caller to set a notification priority.
notification | the notification to reprioritize |
IOException |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.testSetTaskPriority | ( | Task | task | ) | throws IOException |
Allows an external caller to set a task prioirty.
task | the task to reprioritize |
IOException |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.testStopEngine | ( | ) | throws IOException |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.windowActivated | ( | WindowEvent | e | ) |
Does nothing when the window is activated.
e | the window activation event |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.windowClosed | ( | WindowEvent | e | ) |
Does nothing when the window is closed.
e | the window closed event |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.windowClosing | ( | WindowEvent | e | ) |
When the window is closing, perfoms socket cleanup and shuts off the engine.
e | the window closing event |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.windowDeactivated | ( | WindowEvent | e | ) |
Does nothing when the window is deactivated.
e | the window deactivation event |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.windowDeiconified | ( | WindowEvent | e | ) |
Does nothing when the window is deiconified.
e | the window deiconification event |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.windowIconified | ( | WindowEvent | e | ) |
Does nothing when the window is iconified.
e | the window iconification event |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.windowOpened | ( | WindowEvent | e | ) |
Does nothing when the window is opened.
e | the window open event |
void edu.cmu.hcii.calo.engine.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.
out | the output stream to write to |
IOException |
void edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.actionPerformed | ( | ActionEvent | e | ) |
Called when the buttons are clicked.
final long edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.serialVersionUID = 461154975828537010L [static, private] |
Prevent serialization collisions.
final Dimension edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.WINDOW_SIZE = new Dimension(640, 480) [static, private] |
The initial size of the window.
final String edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.ADD_TASK = "AddTask" [static, private] |
Add action identifier.
final String edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.REFRESH_TASKS = "RefreshTasks" [static, private] |
Refresh action identifier.
final String edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.PRIORITY_BUTTON = "PriorityButton" [static, private] |
Refresh action identifier.
ObjectOutputStream edu.cmu.hcii.calo.engine.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.engine.WizardOfOzFrontEnd.input [private] |
The stream of serialized object that this front end reads to allow the engine to communicate to it.
Socket edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.clientSocket = null [package] |
The client socket.
JFrame edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.guiWindow [private] |
The GUI window.
JScrollPane edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.consoleScroller [private] |
The scroller for the console.
JTextArea edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.console [private] |
Displays console output.
JButton edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.refreshButton [private] |
Refreshes the task list.
JButton edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.addButton [private] |
Adds a task to the task list.
JPanel edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.taskListPanel [private] |
A separator between the add and reset priority areas.
int edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.taskIndex [private] |
A label for tasks.
List<Task> edu.cmu.hcii.calo.engine.WizardOfOzFrontEnd.tasks [private] |
The the tasks that the front end currently tracks.