edu.iastate.metnet.metaomgraph.chart
Class ChartAnnotator

java.lang.Object
  extended by edu.iastate.metnet.metaomgraph.chart.ChartAnnotator
All Implemented Interfaces:
java.util.EventListener, org.jfree.chart.ChartMouseListener, org.jfree.chart.event.ChartProgressListener

public class ChartAnnotator
extends java.lang.Object
implements org.jfree.chart.ChartMouseListener, org.jfree.chart.event.ChartProgressListener

Class that handles clicking and mouse moving for a MetaOmChartPanel.


Constructor Summary
ChartAnnotator(MetaOmChartPanel myChartPanel)
          Constructor
 
Method Summary
 void chartMouseClicked(org.jfree.chart.ChartMouseEvent arg0)
          Adds an annotation when the user clicks the chart
 void chartMouseMoved(org.jfree.chart.ChartMouseEvent arg0)
          Set the cursor based on what the mouse is hovering over
 void chartProgress(org.jfree.chart.event.ChartProgressEvent event)
           
 void manageAnnotations()
          Launches the annotation manager.
 void markSelected()
           
 void redrawAnnotations()
          Redraws the annotations on the chart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartAnnotator

public ChartAnnotator(MetaOmChartPanel myChartPanel)
Constructor

Parameters:
myChart - The chart to annotate.
myChartPanel - The ChartPanel that contains myChart.
annotationField - The JTextField that contains the annotation text.
Method Detail

markSelected

public void markSelected()

manageAnnotations

public void manageAnnotations()
Launches the annotation manager.


chartMouseMoved

public void chartMouseMoved(org.jfree.chart.ChartMouseEvent arg0)
Set the cursor based on what the mouse is hovering over

Specified by:
chartMouseMoved in interface org.jfree.chart.ChartMouseListener

chartMouseClicked

public void chartMouseClicked(org.jfree.chart.ChartMouseEvent arg0)
Adds an annotation when the user clicks the chart

Specified by:
chartMouseClicked in interface org.jfree.chart.ChartMouseListener

redrawAnnotations

public void redrawAnnotations()
Redraws the annotations on the chart


chartProgress

public void chartProgress(org.jfree.chart.event.ChartProgressEvent event)
Specified by:
chartProgress in interface org.jfree.chart.event.ChartProgressListener