|
Header
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jfree.chart.plot.CrosshairState org.jfree.chart.plot.CategoryCrosshairState
public class CategoryCrosshairState
Represents state information for the crosshairs in a CategoryPlot
.
An instance of this class is created at the start of the rendering process,
and updated as each data item is rendered. At the end of the rendering
process, this class holds the row key, column key and value for the
crosshair location.
Constructor Summary | |
---|---|
CategoryCrosshairState()
Creates a new instance. |
Method Summary | |
---|---|
java.lang.Comparable |
getColumnKey()
Returns the column key. |
java.lang.Comparable |
getRowKey()
Returns the row key. |
void |
setColumnKey(java.lang.Comparable key)
Sets the column key. |
void |
setRowKey(java.lang.Comparable key)
Sets the row key. |
void |
updateCrosshairPoint(java.lang.Comparable rowKey,
java.lang.Comparable columnKey,
double value,
int datasetIndex,
double transX,
double transY,
PlotOrientation orientation)
Evaluates a data point from a CategoryItemRenderer and if it is
the closest to the anchor point it becomes the new crosshair point. |
void |
updateCrosshairX(java.lang.Comparable rowKey,
java.lang.Comparable columnKey,
int datasetIndex,
double transX,
PlotOrientation orientation)
Updates only the crosshair row and column keys (this is for the case where the range crosshair does NOT lock onto the nearest data value). |
Methods inherited from class org.jfree.chart.plot.CrosshairState |
---|
getAnchor, getAnchorX, getAnchorY, getCrosshairDistance, getCrosshairX, getCrosshairY, getDatasetIndex, getDomainAxisIndex, getRangeAxisIndex, setAnchor, setAnchorX, setAnchorY, setCrosshairDistance, setCrosshairX, setCrosshairY, setDatasetIndex, updateCrosshairPoint, updateCrosshairPoint, updateCrosshairX, updateCrosshairX, updateCrosshairY, updateCrosshairY |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CategoryCrosshairState()
Method Detail |
---|
public java.lang.Comparable getRowKey()
public void setRowKey(java.lang.Comparable key)
key
- the row key.public java.lang.Comparable getColumnKey()
public void setColumnKey(java.lang.Comparable key)
key
- the key.public void updateCrosshairPoint(java.lang.Comparable rowKey, java.lang.Comparable columnKey, double value, int datasetIndex, double transX, double transY, PlotOrientation orientation)
CategoryItemRenderer
and if it is
the closest to the anchor point it becomes the new crosshair point.
rowKey
- the row key.columnKey
- the column key.value
- y coordinate (measured against the range axis).datasetIndex
- the dataset index for this point.transX
- x translated into Java2D space.transY
- y translated into Java2D space.orientation
- the plot orientation.public void updateCrosshairX(java.lang.Comparable rowKey, java.lang.Comparable columnKey, int datasetIndex, double transX, PlotOrientation orientation)
rowKey
- the row key.columnKey
- the column key.datasetIndex
- the dataset axis index.transX
- the translated x-value.orientation
- the plot orientation.
|
Footer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |