megamek.client.ui.swing
Class ChatterBox2

java.lang.Object
  extended by megamek.client.ui.swing.ChatterBox2
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener, IDisplayable

public class ChatterBox2
extends java.lang.Object
implements java.awt.event.KeyListener, IDisplayable


Constructor Summary
ChatterBox2(ClientGUI client, IBoardView boardview)
           
 
Method Summary
 void addChatMessage(java.lang.String line)
          Adds a line to the chat, and performs line breaking if necessary
 void draw(java.awt.Graphics graph, java.awt.Rectangle clipBounds)
          Draws the chatter box.
 boolean isBeingDragged()
           
 boolean isDragged(java.awt.Point p, java.awt.Dimension size)
           
 boolean isHit(java.awt.Point p, java.awt.Dimension size)
           
 boolean isMouseOver(java.awt.Point p, java.awt.Dimension size)
           
 boolean isReleased()
           
 boolean isSliding()
           
 void keyPressed(java.awt.event.KeyEvent ke)
           
 void keyReleased(java.awt.event.KeyEvent ke)
           
 void keyTyped(java.awt.event.KeyEvent ke)
           
 void setIdleTime(long timeIdle, boolean add)
           
 boolean slide()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatterBox2

public ChatterBox2(ClientGUI client,
                   IBoardView boardview)
Method Detail

isReleased

public boolean isReleased()
Specified by:
isReleased in interface IDisplayable

isSliding

public boolean isSliding()
Specified by:
isSliding in interface IDisplayable

setIdleTime

public void setIdleTime(long timeIdle,
                        boolean add)
Specified by:
setIdleTime in interface IDisplayable

slide

public boolean slide()
Specified by:
slide in interface IDisplayable

isDragged

public boolean isDragged(java.awt.Point p,
                         java.awt.Dimension size)
Specified by:
isDragged in interface IDisplayable

isBeingDragged

public boolean isBeingDragged()
Specified by:
isBeingDragged in interface IDisplayable

isMouseOver

public boolean isMouseOver(java.awt.Point p,
                           java.awt.Dimension size)
Specified by:
isMouseOver in interface IDisplayable

isHit

public boolean isHit(java.awt.Point p,
                     java.awt.Dimension size)
Specified by:
isHit in interface IDisplayable

draw

public void draw(java.awt.Graphics graph,
                 java.awt.Rectangle clipBounds)
Draws the chatter box.

Specified by:
draw in interface IDisplayable
Parameters:
graph - - the Graphics to draw on

addChatMessage

public void addChatMessage(java.lang.String line)
Adds a line to the chat, and performs line breaking if necessary

Parameters:
line -

keyPressed

public void keyPressed(java.awt.event.KeyEvent ke)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent ke)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent ke)
Specified by:
keyTyped in interface java.awt.event.KeyListener