show
Class Field2DDisplay.MouseCoordinateReader
java.lang.Object
|
+--java.awt.event.MouseAdapter
|
+--show.Field2DDisplay.MouseCoordinateReader
- All Implemented Interfaces:
- java.util.EventListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener
- Enclosing class:
- Field2DDisplay
- public class Field2DDisplay.MouseCoordinateReader
- extends java.awt.event.MouseAdapter
- implements java.awt.event.MouseMotionListener
an inner class, which reads the coordinates of the mouse and transforms
them to complex coordinates. Also used for determining the gradient
within a given radius
Method Summary |
void |
mouseDragged(java.awt.event.MouseEvent e)
paints a circle with radius of the current distance from circleCenter
(set in mousePressed()) |
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
this method reads out the mouse coordinates, which are used by
mouseDragged to put a circle around it, in order to calculate the
gradient |
void |
mouseReleased(java.awt.event.MouseEvent e)
calculates the gradient for the circle determined by mousePressed
and mouseDragged |
Methods inherited from class java.awt.event.MouseAdapter |
mouseClicked, mouseEntered, mouseExited |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field2DDisplay.MouseCoordinateReader
public Field2DDisplay.MouseCoordinateReader()
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMoved
in interface java.awt.event.MouseMotionListener
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- this method reads out the mouse coordinates, which are used by
mouseDragged to put a circle around it, in order to calculate the
gradient
- Overrides:
mousePressed
in class java.awt.event.MouseAdapter
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- paints a circle with radius of the current distance from circleCenter
(set in mousePressed())
- Specified by:
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- calculates the gradient for the circle determined by mousePressed
and mouseDragged
- Overrides:
mouseReleased
in class java.awt.event.MouseAdapter