/**
* Draws a range crosshair.
*
* @param g2 the graphics target.
* @param dataArea the data area.
* @param orientation the plot orientation.
* @param value the crosshair value.
* @param axis the axis against which the value is measured.
* @param stroke the stroke used to draw the crosshair line.
* @param paint the paint used to draw the crosshair line.
*
* @since 1.0.4
*/
/**
* Draws a domain crosshair.
*
* @param g2 the graphics target.
* @param dataArea the data area.
* @param orientation the plot orientation.
* @param value the crosshair value.
* @param axis the axis against which the value is measured.
* @param stroke the stroke used to draw the crosshair line.
* @param paint the paint used to draw the crosshair line.
*
* @since 1.0.4
*/
protected void [[#variable1a824020]](Graphics2D g2, Rectangle2D dataArea, PlotOrientation orientation, double value, ValueAxis axis, Stroke stroke, Paint paint) {
if (axis.getRange().contains(value)) {
Line2D line = null;
if (orientation == PlotOrientation. [[#variable1a81ffc0]]) {
double xx = axis.valueToJava2D(value, dataArea, RectangleEdge.BOTTOM);
line = new Line2D.Double(xx, dataArea.getMinY(), xx, dataArea.getMaxY());
}
else {
double yy = axis.valueToJava2D(value, dataArea, RectangleEdge.LEFT);
line = new Line2D.Double(dataArea.getMinX(), yy, dataArea.getMaxX(), yy);
}
g2.setStroke(stroke);
g2.setPaint(paint);
g2.draw(line);
}
}
|