Package megamek.client.ui.clientGUI
Class ChatterBox
java.lang.Object
megamek.client.ui.clientGUI.ChatterBox
- All Implemented Interfaces:
KeyListener,EventListener
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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the "box" component with all the stuffvoidkeyPressed(KeyEvent ev) voidkeyReleased(KeyEvent ev) voidvoidTries to scroll down to the end of the boxvoidsetDoneButton(JButton button) Replace the "Done" button in the chat box.voidsetMessage(String message) voidsystemMessage(String message) Display a system message in the chat box.
-
Field Details
-
MAX_HISTORY
public static final int MAX_HISTORY- See Also:
-
history
-
historyBookmark
public int historyBookmark -
GUIP
-
-
Constructor Details
-
ChatterBox
-
-
Method Details
-
moveToEnd
public void moveToEnd()Tries to scroll down to the end of the box -
getComponent
Returns the "box" component with all the stuff -
systemMessage
Display a system message in the chat box.- Parameters:
message- theStringmessage to be shown.
-
setDoneButton
Replace the "Done" button in the chat box.- Parameters:
button- theJButtonthat should be used for "Done".
-
keyPressed
- Specified by:
keyPressedin interfaceKeyListener
-
fetchHistory
-
keyReleased
- Specified by:
keyReleasedin interfaceKeyListener
-
keyTyped
- Specified by:
keyTypedin interfaceKeyListener
-
setMessage
-