Class ChatterBox

java.lang.Object
megamek.client.ui.swing.ChatterBox
All Implemented Interfaces:
KeyListener, EventListener

public class ChatterBox extends Object implements KeyListener
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 Details

  • Constructor Details

    • ChatterBox

      public ChatterBox(ClientGUI clientgui)
  • Method Details

    • moveToEnd

      public void moveToEnd()
      Tries to scroll down to the end of the box
    • getComponent

      public JComponent getComponent()
      Returns the "box" component with all the stuff
    • systemMessage

      public void systemMessage(String message)
      Display a system message in the chat box.
      Parameters:
      message - the String message to be shown.
    • setDoneButton

      public void setDoneButton(JButton button)
      Replace the "Done" button in the chat box.
      Parameters:
      button - the JButton that should be used for "Done".
    • keyPressed

      public void keyPressed(KeyEvent ev)
      Specified by:
      keyPressed in interface KeyListener
    • fetchHistory

      public void fetchHistory()
    • keyReleased

      public void keyReleased(KeyEvent ev)
      Specified by:
      keyReleased in interface KeyListener
    • keyTyped

      public void keyTyped(KeyEvent ev)
      Specified by:
      keyTyped in interface KeyListener
    • setMessage

      public void setMessage(String message)
    • setChatterBox2

      public void setChatterBox2(ChatterBox2 cb2)