Class MouseHandler

java.lang.Object
  extended by MouseHandler
All Implemented Interfaces:
java.awt.event.MouseListener, java.util.EventListener

public class MouseHandler
extends java.lang.Object
implements java.awt.event.MouseListener

This class handles most of the I/O with the mouse


Constructor Summary
MouseHandler()
           
 
Method Summary
 void mouseClicked(java.awt.event.MouseEvent me)
          This method checks the gameState of the BoardManager, selects a square and attempts to place a unit if it is a left click during the Place state, removes a unit if it is a right click during the Place state,selects a square and unit if it is in the Play state, and does nothing during any other state.
 void mouseEntered(java.awt.event.MouseEvent me)
          This method does nothing
 void mouseExited(java.awt.event.MouseEvent me)
          This method does nothing
 void mousePressed(java.awt.event.MouseEvent me)
          This method does nothing
 void mouseReleased(java.awt.event.MouseEvent me)
          This method does nothing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseHandler

public MouseHandler()
Method Detail

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent me)
This method checks the gameState of the BoardManager, selects a square and attempts to place a unit if it is a left click during the Place state, removes a unit if it is a right click during the Place state,selects a square and unit if it is in the Play state, and does nothing during any other state.

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Parameters:
me - shows where the click happened and which button it was.

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent me)
This method does nothing

Specified by:
mouseEntered in interface java.awt.event.MouseListener
Parameters:
me - is useless

mouseExited

public void mouseExited(java.awt.event.MouseEvent me)
This method does nothing

Specified by:
mouseExited in interface java.awt.event.MouseListener
Parameters:
me - is useless

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent me)
This method does nothing

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Parameters:
me - is useless

mousePressed

public void mousePressed(java.awt.event.MouseEvent me)
This method does nothing

Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
me - is useless