Package samer.units
Class Clicker
- java.lang.Object
-
- java.awt.event.MouseAdapter
-
- samer.units.Clicker
-
- All Implemented Interfaces:
- java.awt.event.MouseMotionListener, java.util.EventListener
public class Clicker extends java.awt.event.MouseAdapter implements java.awt.event.MouseMotionListener
This is a mouse event handler that interprets mouse clicks to edit a matrix. It assumes that it is handling mouse events for a component the contains some representation of the matrix that is arranged in rows and columns, just like the matrix itself (it doesn't have to be an image). The window relative coordinates are simply mapped to a matrix element address.
-
-
Constructor Summary
Constructors Constructor and Description Clicker(java.awt.Component c, int w, int h)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
mouseDragged(java.awt.event.MouseEvent e)
void
mouseMoved(java.awt.event.MouseEvent e)
void
mousePressed(java.awt.event.MouseEvent e)
void
setXReceiver(VInteger x)
void
setYReceiver(VInteger y)
-
-
-
Method Detail
-
setXReceiver
public void setXReceiver(VInteger x)
-
setYReceiver
public void setYReceiver(VInteger y)
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMoved
in interfacejava.awt.event.MouseMotionListener
- Overrides:
mouseMoved
in classjava.awt.event.MouseAdapter
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDragged
in interfacejava.awt.event.MouseMotionListener
- Overrides:
mouseDragged
in classjava.awt.event.MouseAdapter
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Overrides:
mousePressed
in classjava.awt.event.MouseAdapter
-
-