|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.eriksilkensen.sudoku.ChatRoom
public class ChatRoom
ChatRoom is a feature to the Sudoku program that can be used to allow users to send and receive messages to each other while playing a networked, multi- player LAN game of Sudoku. In addition, though, the ChatRoom will display messages from the "Admin" when something happens in the game such as when a user gives up or wins.
ChatRoom doesn't extend JFrame directly, but it does provide some JFrame functionality by composing itself with one and delgating a couple of common JFrame functions to it like setVisible(), setSize(), and pack().
| Constructor Summary | |
|---|---|
ChatRoom(javax.swing.JFrame parent)
Default - and only - constructor for Objects of type ChatRoom. |
|
| Method Summary | |
|---|---|
void |
accept(java.lang.String message)
Accepts a message and appends it to the chat |
void |
actionPerformed(java.awt.event.ActionEvent evt)
|
void |
addClient(java.lang.String client)
Adds a Client to this ChatRoom |
boolean |
isVisible()
|
void |
pack()
|
void |
removeAllClients()
Removes all of the Clients |
void |
removeClient(java.lang.String client)
Removes a Client from this ChatRoom |
void |
setAllClients(java.util.List<java.lang.String> clients)
Sets all of the Clients |
void |
setClient(Client client)
Sets the Client helper |
void |
setSize(java.awt.Dimension dim)
|
void |
setVisible(boolean visible)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChatRoom(javax.swing.JFrame parent)
| Method Detail |
|---|
public void setClient(Client client)
public void addClient(java.lang.String client)
public void removeClient(java.lang.String client)
public void setAllClients(java.util.List<java.lang.String> clients)
public void removeAllClients()
public void accept(java.lang.String message)
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed in interface java.awt.event.ActionListenerpublic void setVisible(boolean visible)
public boolean isVisible()
public void setSize(java.awt.Dimension dim)
public void pack()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||