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) 
      • Methods inherited from class java.awt.event.MouseAdapter

        mouseClicked, mouseEntered, mouseExited, mouseReleased, mouseWheelMoved
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Clicker

        public Clicker(java.awt.Component c,
                       int w,
                       int h)
    • 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 interface java.awt.event.MouseMotionListener
        Overrides:
        mouseMoved in class java.awt.event.MouseAdapter
      • mouseDragged

        public void mouseDragged(java.awt.event.MouseEvent e)
        Specified by:
        mouseDragged in interface java.awt.event.MouseMotionListener
        Overrides:
        mouseDragged in class java.awt.event.MouseAdapter
      • mousePressed

        public void mousePressed(java.awt.event.MouseEvent e)
        Overrides:
        mousePressed in class java.awt.event.MouseAdapter