|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jfree.chart.CrosshairInfo
Maintains information about crosshairs on a plot.
Constructor Summary | |
CrosshairInfo()
Default constructor. |
Method Summary | |
double |
getCrosshairX()
Get the x-value for the crosshair point. |
double |
getCrosshairY()
Get the y-value for the crosshair point. |
void |
setAnchorX(double x)
Set the x-value for the anchor point. |
void |
setAnchorY(double y)
Set the y-value for the anchor point. |
void |
setCrosshairDistance(double distance)
Sets the distance. |
void |
updateCrosshairPoint(double candidateX,
double candidateY)
Evaluates a data point and if it is the closest to the anchor point it becomes the new crosshair point. |
void |
updateCrosshairX(double candidateX)
Evaluates an x-value and if it is the closest to the anchor point it becomes the new crosshair point. |
void |
updateCrosshairY(double candidateY)
Evaluates a y-value and if it is the closest to the anchor point it becomes the new crosshair point. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CrosshairInfo()
Method Detail |
public void setCrosshairDistance(double distance)
distance
- the distance.public void updateCrosshairPoint(double candidateX, double candidateY)
To understand this method, you need to know the context in which it will be called. An instance of this class is passed to an XYItemRenderer as each data point is plotted. As the point is plotted, it is passed to this method to see if it should be the new crosshair point.
candidateX
- x position of candidate for the new crosshair point.candidateY
- y position of candidate for the new crosshair point.public void updateCrosshairX(double candidateX)
Used in cases where only the x-axis is numerical.
candidateX
- x position of the candidate for the new crosshair point.public void updateCrosshairY(double candidateY)
Used in cases where only the y-axis is numerical.
candidateY
- y position of the candidate for the new crosshair point.public void setAnchorX(double x)
x
- the x position.public void setAnchorY(double y)
y
- the y position.public double getCrosshairX()
public double getCrosshairY()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |