Class como.commlet.WindowCommlet
All Packages Class Hierarchy This Package Previous Next Index
Class como.commlet.WindowCommlet
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Frame
|
+----como.commlet.WindowCommlet
- public class WindowCommlet
- extends Frame
- implements Commlet
Any Commlets that might be used within other commlets should be derived
from WindowCommlet. This is a Frame that implements Commlet.
Also, it can be put into a MetaCommlet.
-
com
-
-
WindowCommlet()
-
-
addUser(int)
- If a user comes, this method will be called.
-
getCommletInfo()
-
-
getCommletName()
-
-
getSessionName()
-
-
getTopicTextField()
- Returns a TextField where the user may type in the topic.
-
handleEvent(Event)
- If you close the window, it will call automatically hide() or
dispose the commlet (depending if you are in a metacommlet or not).
-
handleMsg(Msg)
- This is a default handleMsg() that calles the helper-methods
userLeft() and addUser().
-
hideCommlet()
- This also takes care of a the menu bar of its MetaCommlet, if it exists.
-
init()
-
-
isUserAdmitted(User)
- Override this for new behaviour!
-
setCom(ComObj)
-
-
setMetaCommlet(MetaCommlet)
-
-
showCommlet()
- Shows the commlet.
-
stop()
- This destroys the local Commlet session.
-
userLeft(int)
- If a user leaves, this method will be called.
com
protected ComObj com
WindowCommlet
public WindowCommlet()
getSessionName
public String getSessionName()
getCommletName
public String getCommletName()
getCommletInfo
public String getCommletInfo()
getTopicTextField
protected TextField getTopicTextField()
- Returns a TextField where the user may type in the topic. If an action
occurs within it, the text is taken over as a new topic and sent to the other
commlet sessions, which then upate the contents of their topic TextField.
hideCommlet
public void hideCommlet()
- This also takes care of a the menu bar of its MetaCommlet, if it exists.
If it's not a metacommlet calls stop(). Else it only hides the frame.
showCommlet
public void showCommlet()
- Shows the commlet.
This also takes care of a the menu bar of its MetaCommlet, if it exists.
setMetaCommlet
public void setMetaCommlet(MetaCommlet m)
setCom
public void setCom(ComObj c)
init
public void init()
stop
public void stop()
- This destroys the local Commlet session. Automatically
called. If you ovveride this, then you have to call
super.stop() at the end of your method!
isUserAdmitted
public boolean isUserAdmitted(User u)
- Override this for new behaviour!
userLeft
public void userLeft(int who)
- If a user leaves, this method will be called.
- Parameters:
- who - the id of the user.
addUser
public void addUser(int who)
- If a user comes, this method will be called.
- Parameters:
- who - the id of the user.
handleMsg
public boolean handleMsg(Msg msg)
- This is a default handleMsg() that calles the helper-methods
userLeft() and addUser(). And it takes care of the
NEW_TOPIC-message. At the moment you can be sure, that this
method is not called more than once at a time. But in future
this might change! If you need this behaviour then
make it synchronized!
handleEvent
public boolean handleEvent(Event evt)
- If you close the window, it will call automatically hide() or
dispose the commlet (depending if you are in a metacommlet or not).
It also sets the topic (and send a NEW_TOPIC message), if the topic
is changed in the topic-TextField.
- Overrides:
- handleEvent in class Component
All Packages Class Hierarchy This Package Previous Next Index