afreechart/src/main/java/org/afree/chart/plot/XYPlot.java
/**
     * Draws a domain crosshair.
     * 
     * @param canvas
     *            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 paintType
     *            the paintType used to draw the crosshair line.
     * @param pathEffect
     *            the pathEffect used to draw the crosshair line.
     * 
     * @since JFreeChart 1.0.4
     */
Draws a domain crosshair.

@param canvas
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 paintType
the paintType used to draw the crosshair line.
@param pathEffect
the pathEffect used to draw the crosshair line.


Draws a domain crosshair . @param canvas 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 paintType the paintType used to draw the crosshair line . @param pathEffect the pathEffect used to draw the crosshair line .
protected void drawDomainCrosshair(Canvas canvas, RectShape dataArea,
            PlotOrientation orientation, double value, ValueAxis axis,
            Float stroke, PaintType paintType, PathEffect pathEffect) {
        if (axis.getRange().contains(value)) {
            LineShape line = null;
            if (orientation == PlotOrientation.VERTICAL) {
                double xx = axis.valueToJava2D(value, dataArea,
                        RectangleEdge.BOTTOM);
                line = new LineShape(xx, dataArea.getMinY(), xx, dataArea
                        .getMaxY());
            } else {
                double yy = axis.valueToJava2D(value, dataArea,
                        RectangleEdge.LEFT);
                line = new LineShape(dataArea.getMinX(), yy, dataArea
                        .getMaxX(), yy);
            }
            Paint paint = PaintUtility.createPaint(paintType, stroke, pathEffect);
            line.draw(canvas, paint);
        }
    }
protected void drawDomainCrosshair ( Canvas canvas , RectShape dataArea , PlotOrientation orientation , double value , ValueAxis axis , Float stroke , PaintType paintType , PathEffect pathEffect ) { if ( axis . getRange ( ) . contains ( value ) ) { LineShape line = null ; if ( orientation == PlotOrientation . VERTICAL ) { double xx = axis . valueToJava2D ( value , dataArea , RectangleEdge . BOTTOM ) ; line = new LineShape ( xx , dataArea . getMinY ( ) , xx , dataArea . getMaxY ( ) ) ; } else { double yy = axis . valueToJava2D ( value , dataArea , RectangleEdge . LEFT ) ; line = new LineShape ( dataArea . getMinX ( ) , yy , dataArea . getMaxX ( ) , yy ) ; } Paint paint = PaintUtility . createPaint ( paintType , stroke , pathEffect ) ; line . draw ( canvas , paint ) ; } }
Draws a domain crosshair.
Draws a domain crosshair .