Package samer.maths

Class MatEditor

  • java.lang.Object
    • java.awt.event.MouseAdapter
      • samer.maths.MatEditor
  • All Implemented Interfaces:
    java.awt.event.MouseMotionListener, java.util.EventListener


    public class MatEditor
    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
      MatEditor(Mat m, java.awt.Component c, java.util.Observable v, Viewer vwr) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void detach() 
      void execute(java.lang.String cmd, Environment env) 
      void getCommands(Agent.Registry r) 
      void mouseDragged(java.awt.event.MouseEvent e) 
      void mouseMoved(java.awt.event.MouseEvent e) 
      void mousePressed(java.awt.event.MouseEvent e) 
      void mouseReleased(java.awt.event.MouseEvent e) 
      • Methods inherited from class java.awt.event.MouseAdapter

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

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

      • MatEditor

        public MatEditor(Mat m,
                         java.awt.Component c,
                         java.util.Observable v,
                         Viewer vwr)
    • Method Detail

      • getCommands

        public void getCommands(Agent.Registry r)
      • execute

        public void execute(java.lang.String cmd,
                            Environment env)
      • 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
      • mouseReleased

        public void mouseReleased(java.awt.event.MouseEvent e)
        Overrides:
        mouseReleased in class java.awt.event.MouseAdapter
      • detach

        public void detach()