|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectClient.MainPane
public class MainPane
Manages a JPanel representing the main "homepage" tab of the chat client. Can switch from the "username-asking" view to the "who is online" view, after an acceptable username is typed in.
| Constructor Summary | |
|---|---|
MainPane(ClientView vi)
Construct a new MainPane, as the initial "username-asking" version. |
|
| Method Summary | |
|---|---|
javax.swing.JPanel |
getPanel()
|
void |
setMessage(java.lang.String errorMessage)
Sets a label in the username-asking view, so that if the username was rejected, the user can read why. |
void |
setUsername(java.lang.String name)
Swaps out the GUI from a "Type your username here" panel to a "Here is who is online" panel. |
void |
updateUsers(java.util.List<java.lang.String> users)
Updates the list of users here. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MainPane(ClientView vi)
vi - The ClientView that is the "parent" of this main pane| Method Detail |
|---|
public javax.swing.JPanel getPanel()
public void setUsername(java.lang.String name)
name - the username that was acceptedpublic void updateUsers(java.util.List<java.lang.String> users)
users - the list of users here, as sent by the serverpublic void setMessage(java.lang.String errorMessage)
errorMessage - the error to say
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||