ants.move.core.teacher.chat
Class ChatWindow

java.lang.Object
  |
  +--ants.move.core.teacher.chat.ChatWindow
All Implemented Interfaces:
ChatListener, ants.core.PlaceListener

public class ChatWindow
extends java.lang.Object
implements ChatListener, ants.core.PlaceListener

Implementation of Chat User Interface.

Version:
1.20 Build 2000
Author:
Carles Pairot (cpairot@tinet.org), Oriol Montalà (omontala@tinet.org)

Constructor Summary
ChatWindow(ChatModel cm, java.awt.TextField cF, java.awt.TextArea cA, java.awt.List cU, ants.core.Place p)
          Sole constructor.
 
Method Summary
 void addThing(java.lang.String thingKey)
           
 void addUsers()
           
 void chatField_actionPerformed(java.awt.event.ActionEvent e)
          chatField's actionPerformed() method.
 void chatUsers_actionPerformed(java.awt.event.ActionEvent e)
           
 void consoleMessage(java.lang.String msg)
          Display a system message on the Chat Window.
 void init()
          Applet's entry point.
 void onMessage(java.util.Hashtable ht)
          Method triggered when a message arrives.
 void removeThing(java.lang.String thingKey)
           
 void userJoined(java.lang.String u)
          Method triggered when a user arrives.
 void userLeft(java.lang.String u)
          Method triggered when a user leaves the place.
 void usersChanged(java.lang.String u)
          Method triggered when hung users have been detected
 void writeLine(java.lang.String msg)
          Displays message on Chat Window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatWindow

public ChatWindow(ChatModel cm,
                  java.awt.TextField cF,
                  java.awt.TextArea cA,
                  java.awt.List cU,
                  ants.core.Place p)
Sole constructor.
Parameters:
iclass - Chat internal class
Throws:
exceptions - No exceptions thrown
Method Detail

init

public void init()
Applet's entry point.
Parameters:
params - None
Returns:
No return value
Throws:
exceptions - No exceptions thrown

addUsers

public void addUsers()

consoleMessage

public void consoleMessage(java.lang.String msg)
Display a system message on the Chat Window.
Parameters:
String - Message
Returns:
No return value
Throws:
exceptions - No exceptions thrown

chatField_actionPerformed

public void chatField_actionPerformed(java.awt.event.ActionEvent e)
chatField's actionPerformed() method.
Parameters:
e - Event
Returns:
No return value
Throws:
exceptions - No exceptions thrown

chatUsers_actionPerformed

public void chatUsers_actionPerformed(java.awt.event.ActionEvent e)

writeLine

public void writeLine(java.lang.String msg)
Displays message on Chat Window.
Specified by:
writeLine in interface ChatListener
Parameters:
msg - String to be displayed
Returns:
No return value
Throws:
exceptions - No exceptions thrown

userJoined

public void userJoined(java.lang.String u)
Description copied from interface: ants.core.PlaceListener
Method triggered when a user arrives.
Specified by:
userJoined in interface ants.core.PlaceListener
Following copied from interface: ants.core.PlaceListener
Parameters:
userName - New user`s name

userLeft

public void userLeft(java.lang.String u)
Description copied from interface: ants.core.PlaceListener
Method triggered when a user leaves the place.
Specified by:
userLeft in interface ants.core.PlaceListener
Following copied from interface: ants.core.PlaceListener
Parameters:
userName - Name of leaving user.

onMessage

public void onMessage(java.util.Hashtable ht)
Description copied from interface: ants.core.PlaceListener
Method triggered when a message arrives.
Specified by:
onMessage in interface ants.core.PlaceListener
Following copied from interface: ants.core.PlaceListener
Parameters:
evt - Hashtable event containing the received event.

usersChanged

public void usersChanged(java.lang.String u)
Description copied from interface: ants.core.PlaceListener
Method triggered when hung users have been detected
Specified by:
usersChanged in interface ants.core.PlaceListener
Following copied from interface: ants.core.PlaceListener
Parameters:
users - Current users in that place.

addThing

public void addThing(java.lang.String thingKey)

removeThing

public void removeThing(java.lang.String thingKey)


Developers: Oriol Montala, Carles Pairot, Francesc Pinas2000 - 2002
Departament d'Enginyeria Informatica i Matematiques
Escola Tecnica Superior d'Enginyeria
Universitat Rovira i Virgili