com.jinsight.jetchart
Class PolarGraphEventListener

java.lang.Object
  extended bycom.jinsight.jetchart.PolarGraphEventListener
All Implemented Interfaces:
java.util.EventListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener

public class PolarGraphEventListener
extends java.lang.Object
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener

This class implements callback methods to handle mouse events dispatched by the PolarGraph class. If for some reason mouse event handling has to be changed without losing pre-built functionalities, remove references to an instance of this class from the PolarGraph object and extend PolarGraphEventListener, changing the callback methods adequately. To remove the primary PolarGraphEventListener, which is created when the PolarGraph class is instantiated, do as follows:

PolarGraph graph=new PolarGraph();
PolarGraphEventListener g=graph.getPolarGraphEventListener();
graph.removeMouseListener(g);
graph.removeMouseMotionListener(g);

See Also:
PolarGraph, PolarGraph.getPolarGraphEventListener()

Constructor Summary
PolarGraphEventListener(PolarGraph polarGraph)
          Constructor of the PolarGraphEventListener class.
 
Method Summary
 void mouseClicked(java.awt.event.MouseEvent evt)
          This method is called when a mouse button is pressed and released within the chart area.
 void mouseDragged(java.awt.event.MouseEvent evt)
          This method is called when mouse is clicked within the chart area and dragged.
 void mouseEntered(java.awt.event.MouseEvent evt)
          This method is called when the cursor enters the chart area.
 void mouseExited(java.awt.event.MouseEvent evt)
          This method is called when the cursor exits the chart area.
 void mouseMoved(java.awt.event.MouseEvent evt)
          This method is called when mouse is moved within the chart area.
 void mousePressed(java.awt.event.MouseEvent evt)
          This method is called when a mouse button is pressed within the chart area.
 void mouseReleased(java.awt.event.MouseEvent evt)
          This method is called when a mouse button is released within the chart area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolarGraphEventListener

public PolarGraphEventListener(PolarGraph polarGraph)
Constructor of the PolarGraphEventListener class. It takes a reference to the PolarGraph object which triggers the mouse events to be handled.

Parameters:
polarGraph - A PolarGraph object.
See Also:
PolarGraph
Method Detail

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent evt)
This method is called when a mouse button is pressed and released within the chart area.

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Parameters:
evt - A MouseEvent object.

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent evt)
This method is called when the cursor enters the chart area.

Specified by:
mouseEntered in interface java.awt.event.MouseListener
Parameters:
evt - A MouseEvent object.

mouseExited

public void mouseExited(java.awt.event.MouseEvent evt)
This method is called when the cursor exits the chart area.

Specified by:
mouseExited in interface java.awt.event.MouseListener
Parameters:
evt - A MouseEvent object.

mousePressed

public void mousePressed(java.awt.event.MouseEvent evt)
This method is called when a mouse button is pressed within the chart area.

Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
evt - A MouseEvent object.

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent evt)
This method is called when a mouse button is released within the chart area.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Parameters:
evt - A MouseEvent object.

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent evt)
This method is called when mouse is clicked within the chart area and dragged.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Parameters:
evt - A MouseEvent object.

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent evt)
This method is called when mouse is moved within the chart area.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Parameters:
evt - A MouseEvent object.