Package megamek.client.ui.swing
Class ChatterBox
java.lang.Object
megamek.client.ui.swing.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 TypeMethodDescriptionvoid
Returns the "box" component with all the stuffvoid
keyPressed
(KeyEvent ev) void
keyReleased
(KeyEvent ev) void
void
Tries to scroll down to the end of the boxvoid
void
setDoneButton
(JButton button) Replace the "Done" button in the chat box.void
setMessage
(String message) void
systemMessage
(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
- theString
message to be shown.
-
setDoneButton
Replace the "Done" button in the chat box.- Parameters:
button
- theJButton
that should be used for "Done".
-
keyPressed
- Specified by:
keyPressed
in interfaceKeyListener
-
fetchHistory
public void fetchHistory() -
keyReleased
- Specified by:
keyReleased
in interfaceKeyListener
-
keyTyped
- Specified by:
keyTyped
in interfaceKeyListener
-
setMessage
-
setChatterBox2
-