public class Gui.CellListener
extends java.lang.Object
implements javax.swing.event.MouseInputListener
Constructor and Description |
---|
CellListener(Cell cell)
The constructor for a new CellListener, just needs a Cell to listen
to.
|
Modifier and Type | Method and Description |
---|---|
void |
mouseClicked(java.awt.event.MouseEvent arg0)
This is what happens when the mouse is clicked, just creates a click
tag and sends that out.
|
void |
mouseDragged(java.awt.event.MouseEvent arg0)
This is what happens when the mouse is pressed and held down.
|
void |
mouseEntered(java.awt.event.MouseEvent arg0)
This is what happens when the mouse is over the cell this just
repaints it now possibly give some useful information about what
there over?
|
void |
mouseExited(java.awt.event.MouseEvent arg0)
When the mouse exits from being on top of the Cell just repainting
for now.
|
void |
mouseMoved(java.awt.event.MouseEvent arg0)
This is what happens when the mouse is moving over a Cell if an info
popup was implemented we might want to change that here.
|
void |
mousePressed(java.awt.event.MouseEvent arg0)
This is what happens when a Cell is pressed on this is invoked with
every click, so do nothing here the click will take care of this.
|
void |
mouseReleased(java.awt.event.MouseEvent arg0)
This is the second half of the mouseClicked method again do nothing
here that will all be handled in the mouseClicked method.
|
private Cell cell
public CellListener(Cell cell)
cell
- Who is being listened to.public void mouseClicked(java.awt.event.MouseEvent arg0)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent arg0)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseEntered(java.awt.event.MouseEvent arg0)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent arg0)
mouseExited
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent arg0)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mousePressed(java.awt.event.MouseEvent arg0)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent arg0)
mouseReleased
in interface java.awt.event.MouseListener