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.MouseMotionListenerThis 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 voiddetach()voidexecute(java.lang.String cmd, Environment env)voidgetCommands(Agent.Registry r)voidmouseDragged(java.awt.event.MouseEvent e)voidmouseMoved(java.awt.event.MouseEvent e)voidmousePressed(java.awt.event.MouseEvent e)voidmouseReleased(java.awt.event.MouseEvent e)
-
-
-
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:
mouseMovedin interfacejava.awt.event.MouseMotionListener- Overrides:
mouseMovedin classjava.awt.event.MouseAdapter
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDraggedin interfacejava.awt.event.MouseMotionListener- Overrides:
mouseDraggedin classjava.awt.event.MouseAdapter
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Overrides:
mousePressedin classjava.awt.event.MouseAdapter
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Overrides:
mouseReleasedin classjava.awt.event.MouseAdapter
-
detach
public void detach()
-
-