/** * Considers the current (x, y) coordinate and updates the crosshair point * if it meets the criteria (usually means the (x, y) coordinate is the * closest to the anchor point so far). * * @param crosshairState the crosshair state (<code>null</code> permitted, * but the method does nothing in that case). * @param rowKey the row key. * @param columnKey the column key. * @param value the data value. * @param datasetIndex the dataset index. * @param transX the x-value translated to Java2D space. * @param transY the y-value translated to Java2D space. * @param orientation the plot orientation (<code>null</code> not * permitted). * * @since 1.0.11 */ protected void updateCrosshairValues(CategoryCrosshairState crosshairState, Comparable rowKey, Comparable columnKey, double value, int datasetIndex, double transX, double transY, PlotOrientation orientation) { ParamChecks.nullNotPermitted(orientation, "orientation"); if (crosshairState != null) { if (this.plot.isRangeCrosshairLockedOnData()) { // both axes crosshairState.updateCrosshairPoint(rowKey, columnKey, value, datasetIndex, transX, transY, orientation); } else { crosshairState.updateCrosshairX(rowKey, columnKey, datasetIndex, transX, orientation); } } }
/** * Considers the current (x, y) coordinate and updates the crosshair point * if it meets the criteria (usually means the (x, y) coordinate is the * closest to the anchor point so far). * * @param crosshairState the crosshair state ({@code null} permitted, * but the method does nothing in that case). * @param rowKey the row key. * @param columnKey the column key. * @param value the data value. * @param datasetIndex the dataset index. * @param transX the x-value translated to Java2D space. * @param transY the y-value translated to Java2D space. * @param orientation the plot orientation ({@code null} not * permitted). * * @since 1.0.11 */ protected void updateCrosshairValues(CategoryCrosshairState crosshairState, Comparable rowKey, Comparable columnKey, double value, int datasetIndex, double transX, double transY, PlotOrientation orientation) { Args.nullNotPermitted(orientation, "orientation"); if (crosshairState != null) { if (this.plot.isRangeCrosshairLockedOnData()) { // both axes crosshairState.updateCrosshairPoint(rowKey, columnKey, value, datasetIndex, transX, transY, orientation); } else { crosshairState.updateCrosshairX(rowKey, columnKey, datasetIndex, transX, orientation); } } }
/** * Considers the current (x, y) coordinate and updates the crosshair point * if it meets the criteria (usually means the (x, y) coordinate is the * closest to the anchor point so far). * * @param crosshairState the crosshair state (<code>null</code> permitted, * but the method does nothing in that case). * @param rowKey the row key. * @param columnKey the column key. * @param value the data value. * @param datasetIndex the dataset index. * @param transX the x-value translated to Java2D space. * @param transY the y-value translated to Java2D space. * @param orientation the plot orientation (<code>null</code> not * permitted). * * @since 1.0.11 */ protected void updateCrosshairValues(CategoryCrosshairState crosshairState, Comparable rowKey, Comparable columnKey, double value, int datasetIndex, double transX, double transY, PlotOrientation orientation) { if (orientation == null) { throw new IllegalArgumentException("Null 'orientation' argument."); } if (crosshairState != null) { if (this.plot.isRangeCrosshairLockedOnData()) { // both axes crosshairState.updateCrosshairPoint(rowKey, columnKey, value, datasetIndex, transX, transY, orientation); } else { crosshairState.updateCrosshairX(rowKey, columnKey, datasetIndex, transX, orientation); } } }
/** * Returns the crosshair state, if any. * * @return The crosshair state (possibly <code>null</code>). * * @since 1.0.11 * * @see #setCrosshairState(CategoryCrosshairState) */ public CategoryCrosshairState getCrosshairState() { return this.crosshairState; }
/** * Sets the crosshair state. * * @param state the new state (<code>null</code> permitted). * * @since 1.0.11 * * @see #getCrosshairState() */ public void setCrosshairState(CategoryCrosshairState state) { this.crosshairState = state; }
/** * Returns the crosshair state, if any. * * @return The crosshair state (possibly {@code null}). * * @since 1.0.11 * * @see #setCrosshairState(CategoryCrosshairState) */ public CategoryCrosshairState getCrosshairState() { return this.crosshairState; }
/** * Sets the crosshair state. * * @param state the new state ({@code null} permitted). * * @since 1.0.11 * * @see #getCrosshairState() */ public void setCrosshairState(CategoryCrosshairState state) { this.crosshairState = state; }