|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmegamek.client.ui.swing.ChatterBox
public class ChatterBox
ChatterBox keeps track of a player list and a (chat) message buffer. Although it is not an AWT component, it keeps one that it will gladly supply.
| Field Summary | |
|---|---|
(package private) javax.swing.JTextArea |
chatArea
|
(package private) Client |
client
|
(package private) javax.swing.JList |
playerList
|
(package private) javax.swing.JScrollPane |
scrPlayers
|
| Constructor Summary | |
|---|---|
ChatterBox(ClientGUI clientgui)
|
|
| Method Summary | |
|---|---|
javax.swing.JComponent |
getComponent()
Returns the "box" component with all teh stuff |
void |
keyPressed(java.awt.event.KeyEvent ev)
|
void |
keyReleased(java.awt.event.KeyEvent ev)
|
void |
keyTyped(java.awt.event.KeyEvent ev)
|
void |
moveToEnd()
Tries to scroll down to the end of the box |
void |
setDoneButton(javax.swing.JButton button)
Replace the "Done" button in the chat box. |
void |
systemMessage(java.lang.String message)
Display a system message in the chat box. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
Client client
javax.swing.JTextArea chatArea
javax.swing.JList playerList
javax.swing.JScrollPane scrPlayers
| Constructor Detail |
|---|
public ChatterBox(ClientGUI clientgui)
| Method Detail |
|---|
public void moveToEnd()
public javax.swing.JComponent getComponent()
public void systemMessage(java.lang.String message)
message - the String message to be shown.public void setDoneButton(javax.swing.JButton button)
button - the JButton that should be used for "Done".public void keyPressed(java.awt.event.KeyEvent ev)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent ev)
keyReleased in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent ev)
keyTyped in interface java.awt.event.KeyListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||