org.progeeks.jfreechart
Class XYCrosshairsFocusHandler
java.lang.Object
org.progeeks.jfreechart.DefaultFocusHandler
org.progeeks.jfreechart.XYCrosshairsFocusHandler
- All Implemented Interfaces:
- ChartFocusHandler
- Direct Known Subclasses:
- TimeSeriesCrosshairsFocusHandler
public class XYCrosshairsFocusHandler
- extends DefaultFocusHandler
Draws the crosshairs at the data point representing the passed in focus object.
- Version:
- $Revision: 1.5 $
- Author:
- esword
|
Field Summary |
protected static Log |
log
|
|
Method Summary |
protected double |
getDomainCrosshairValue(org.jfree.data.xy.XYDataset focusedData)
Focus the domain crosshair on the x value of the datapoint. |
protected double |
getRangeCrosshairValue(org.jfree.data.xy.XYDataset focusedData)
If a value property exists, focus the range crosshair on the value of the datapoint. |
protected double |
getYValue(java.lang.String seriesName,
double xValue)
Given an X value (not a series index), return the corresponding Y value in the
given series. |
boolean |
handleFocus(java.lang.Object newFocus)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final Log log
XYCrosshairsFocusHandler
public XYCrosshairsFocusHandler()
handleFocus
public boolean handleFocus(java.lang.Object newFocus)
- Specified by:
handleFocus in interface ChartFocusHandler- Overrides:
handleFocus in class DefaultFocusHandler
getDomainCrosshairValue
protected double getDomainCrosshairValue(org.jfree.data.xy.XYDataset focusedData)
- Focus the domain crosshair on the x value of the datapoint.
- Parameters:
focusedData -
getRangeCrosshairValue
protected double getRangeCrosshairValue(org.jfree.data.xy.XYDataset focusedData)
- If a value property exists, focus the range crosshair on the value of the datapoint.
Otherwise, set the crosshair to the Y-value for the real series for this x value
- Parameters:
focusedData -
getYValue
protected double getYValue(java.lang.String seriesName,
double xValue)
- Given an X value (not a series index), return the corresponding Y value in the
given series.
- Parameters:
seriesName - xValue -
- Returns:
- The Y value or 0.0 if the x Value could not be found.
Copyright © 2002-2003 Paul Speed. All Rights Reserved.