jview
Class JExtremaSelect.MouseSlider

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by jview.JExtremaSelect.MouseSlider
All Implemented Interfaces:
MouseListener, MouseMotionListener, MouseWheelListener, EventListener
Enclosing class:
JExtremaSelect

private class JExtremaSelect.MouseSlider
extends MouseAdapter

The mouse listener on the power canvas that grabs the position and calculates the period, which is then passed to the expression canvas, that displays the phase plot.


Field Summary
private  boolean slidemax
          Slide to maximum.
private  int smooth
          The number of parabels to fit around the maximum.
private  int xindex
          xindex in vector.
private  int yindex
          yindex in vector.
 
Constructor Summary
private JExtremaSelect.MouseSlider(int xi, int yi, boolean up, int nr)
           
 
Method Summary
 void mouseClicked(MouseEvent me)
          If the mouse is clicked in the powerplot, we convert the mouse x pixel into a frequency, find the maximum or minimum close to it, then smooth parabolas to get to the true maximum.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xindex

private int xindex
xindex in vector.


yindex

private int yindex
yindex in vector.


slidemax

private boolean slidemax
Slide to maximum.


smooth

private int smooth
The number of parabels to fit around the maximum.

Constructor Detail

JExtremaSelect.MouseSlider

private JExtremaSelect.MouseSlider(int xi,
                                   int yi,
                                   boolean up,
                                   int nr)
Method Detail

mouseClicked

public void mouseClicked(MouseEvent me)
If the mouse is clicked in the powerplot, we convert the mouse x pixel into a frequency, find the maximum or minimum close to it, then smooth parabolas to get to the true maximum. This is then forwarded to the phase frame (if it exists), the phase frame is shown, and a sine/cosine fit is displayed if applicable.

Specified by:
mouseClicked in interface MouseListener
Overrides:
mouseClicked in class MouseAdapter