Java Code Examples for org.jfree.chart.plot.CrosshairState#updateCrosshairX()
The following examples show how to use
org.jfree.chart.plot.CrosshairState#updateCrosshairX() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractXYItemRenderer.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * 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 x the x-value (in data space). * @param y the y-value (in data space). * @param domainAxisIndex the index of the domain axis for the point. * @param rangeAxisIndex the index of the range axis for the point. * @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.4 */ protected void updateCrosshairValues(CrosshairState crosshairState, double x, double y, int domainAxisIndex, int rangeAxisIndex, double transX, double transY, PlotOrientation orientation) { ParamChecks.nullNotPermitted(orientation, "orientation"); if (crosshairState != null) { // do we need to update the crosshair values? if (this.plot.isDomainCrosshairLockedOnData()) { if (this.plot.isRangeCrosshairLockedOnData()) { // both axes crosshairState.updateCrosshairPoint(x, y, domainAxisIndex, rangeAxisIndex, transX, transY, orientation); } else { // just the domain axis... crosshairState.updateCrosshairX(x, domainAxisIndex); } } else { if (this.plot.isRangeCrosshairLockedOnData()) { // just the range axis... crosshairState.updateCrosshairY(y, rangeAxisIndex); } } } }
Example 2
Source File: AbstractXYItemRenderer.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * 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 x the x-value (in data space). * @param y the y-value (in data space). * @param domainAxisIndex the index of the domain axis for the point. * @param rangeAxisIndex the index of the range axis for the point. * @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.4 */ protected void updateCrosshairValues(CrosshairState crosshairState, double x, double y, int domainAxisIndex, int rangeAxisIndex, double transX, double transY, PlotOrientation orientation) { ParamChecks.nullNotPermitted(orientation, "orientation"); if (crosshairState != null) { // do we need to update the crosshair values? if (this.plot.isDomainCrosshairLockedOnData()) { if (this.plot.isRangeCrosshairLockedOnData()) { // both axes crosshairState.updateCrosshairPoint(x, y, domainAxisIndex, rangeAxisIndex, transX, transY, orientation); } else { // just the domain axis... crosshairState.updateCrosshairX(x, domainAxisIndex); } } else { if (this.plot.isRangeCrosshairLockedOnData()) { // just the range axis... crosshairState.updateCrosshairY(y, rangeAxisIndex); } } } }
Example 3
Source File: AbstractXYItemRenderer.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
/** * 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 x the x-value (in data space). * @param y the y-value (in data space). * @param domainAxisIndex the index of the domain axis for the point. * @param rangeAxisIndex the index of the range axis for the point. * @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.4 */ protected void updateCrosshairValues(CrosshairState crosshairState, double x, double y, int domainAxisIndex, int rangeAxisIndex, double transX, double transY, PlotOrientation orientation) { ParamChecks.nullNotPermitted(orientation, "orientation"); if (crosshairState != null) { // do we need to update the crosshair values? if (this.plot.isDomainCrosshairLockedOnData()) { if (this.plot.isRangeCrosshairLockedOnData()) { // both axes crosshairState.updateCrosshairPoint(x, y, domainAxisIndex, rangeAxisIndex, transX, transY, orientation); } else { // just the domain axis... crosshairState.updateCrosshairX(x, domainAxisIndex); } } else { if (this.plot.isRangeCrosshairLockedOnData()) { // just the range axis... crosshairState.updateCrosshairY(y, rangeAxisIndex); } } } }
Example 4
Source File: AbstractXYItemRenderer.java From ECG-Viewer with GNU General Public License v2.0 | 5 votes |
/** * 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 x the x-value (in data space). * @param y the y-value (in data space). * @param domainAxisIndex the index of the domain axis for the point. * @param rangeAxisIndex the index of the range axis for the point. * @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.4 */ protected void updateCrosshairValues(CrosshairState crosshairState, double x, double y, int domainAxisIndex, int rangeAxisIndex, double transX, double transY, PlotOrientation orientation) { ParamChecks.nullNotPermitted(orientation, "orientation"); if (crosshairState != null) { // do we need to update the crosshair values? if (this.plot.isDomainCrosshairLockedOnData()) { if (this.plot.isRangeCrosshairLockedOnData()) { // both axes crosshairState.updateCrosshairPoint(x, y, domainAxisIndex, rangeAxisIndex, transX, transY, orientation); } else { // just the domain axis... crosshairState.updateCrosshairX(x, domainAxisIndex); } } else { if (this.plot.isRangeCrosshairLockedOnData()) { // just the range axis... crosshairState.updateCrosshairY(y, rangeAxisIndex); } } } }
Example 5
Source File: AbstractXYItemRenderer.java From astor with GNU General Public License v2.0 | 5 votes |
/** * 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 x the x-value (in data space). * @param y the y-value (in data space). * @param domainAxisIndex the index of the domain axis for the point. * @param rangeAxisIndex the index of the range axis for the point. * @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.4 */ protected void updateCrosshairValues(CrosshairState crosshairState, double x, double y, int domainAxisIndex, int rangeAxisIndex, double transX, double transY, PlotOrientation orientation) { if (orientation == null) { throw new IllegalArgumentException("Null 'orientation' argument."); } if (crosshairState != null) { // do we need to update the crosshair values? if (this.plot.isDomainCrosshairLockedOnData()) { if (this.plot.isRangeCrosshairLockedOnData()) { // both axes crosshairState.updateCrosshairPoint(x, y, domainAxisIndex, rangeAxisIndex, transX, transY, orientation); } else { // just the domain axis... crosshairState.updateCrosshairX(x, domainAxisIndex); } } else { if (this.plot.isRangeCrosshairLockedOnData()) { // just the range axis... crosshairState.updateCrosshairY(y, rangeAxisIndex); } } } }
Example 6
Source File: AbstractXYItemRenderer.java From astor with GNU General Public License v2.0 | 5 votes |
/** * 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 x the x-value (in data space). * @param y the y-value (in data space). * @param domainAxisIndex the index of the domain axis for the point. * @param rangeAxisIndex the index of the range axis for the point. * @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.4 */ protected void updateCrosshairValues(CrosshairState crosshairState, double x, double y, int domainAxisIndex, int rangeAxisIndex, double transX, double transY, PlotOrientation orientation) { if (orientation == null) { throw new IllegalArgumentException("Null 'orientation' argument."); } if (crosshairState != null) { // do we need to update the crosshair values? if (this.plot.isDomainCrosshairLockedOnData()) { if (this.plot.isRangeCrosshairLockedOnData()) { // both axes crosshairState.updateCrosshairPoint(x, y, domainAxisIndex, rangeAxisIndex, transX, transY, orientation); } else { // just the domain axis... crosshairState.updateCrosshairX(x, domainAxisIndex); } } else { if (this.plot.isRangeCrosshairLockedOnData()) { // just the range axis... crosshairState.updateCrosshairY(y, rangeAxisIndex); } } } }
Example 7
Source File: AbstractXYItemRenderer.java From opensim-gui with Apache License 2.0 | 5 votes |
/** * 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 x the x-value (in data space). * @param y the y-value (in data space). * @param domainAxisIndex the index of the domain axis for the point. * @param rangeAxisIndex the index of the range axis for the point. * @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.4 */ protected void updateCrosshairValues(CrosshairState crosshairState, double x, double y, int domainAxisIndex, int rangeAxisIndex, double transX, double transY, PlotOrientation orientation) { if (orientation == null) { throw new IllegalArgumentException("Null 'orientation' argument."); } if (crosshairState != null) { // do we need to update the crosshair values? if (this.plot.isDomainCrosshairLockedOnData()) { if (this.plot.isRangeCrosshairLockedOnData()) { // both axes crosshairState.updateCrosshairPoint(x, y, domainAxisIndex, rangeAxisIndex, transX, transY, orientation); } else { // just the domain axis... crosshairState.updateCrosshairX(x, domainAxisIndex); } } else { if (this.plot.isRangeCrosshairLockedOnData()) { // just the range axis... crosshairState.updateCrosshairY(y, rangeAxisIndex); } } } }
Example 8
Source File: AbstractXYItemRenderer.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * 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 x the x-value (in data space). * @param y the y-value (in data space). * @param domainAxisIndex the index of the domain axis for the point. * @param rangeAxisIndex the index of the range axis for the point. * @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.4 */ protected void updateCrosshairValues(CrosshairState crosshairState, double x, double y, int domainAxisIndex, int rangeAxisIndex, double transX, double transY, PlotOrientation orientation) { ParamChecks.nullNotPermitted(orientation, "orientation"); if (crosshairState != null) { // do we need to update the crosshair values? if (this.plot.isDomainCrosshairLockedOnData()) { if (this.plot.isRangeCrosshairLockedOnData()) { // both axes crosshairState.updateCrosshairPoint(x, y, domainAxisIndex, rangeAxisIndex, transX, transY, orientation); } else { // just the domain axis... crosshairState.updateCrosshairX(x, domainAxisIndex); } } else { if (this.plot.isRangeCrosshairLockedOnData()) { // just the range axis... crosshairState.updateCrosshairY(y, rangeAxisIndex); } } } }
Example 9
Source File: AbstractXYItemRenderer.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * 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 x the x-value (in data space). * @param y the y-value (in data space). * @param domainAxisIndex the index of the domain axis for the point. * @param rangeAxisIndex the index of the range axis for the point. * @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.4 */ protected void updateCrosshairValues(CrosshairState crosshairState, double x, double y, int domainAxisIndex, int rangeAxisIndex, double transX, double transY, PlotOrientation orientation) { ParamChecks.nullNotPermitted(orientation, "orientation"); if (crosshairState != null) { // do we need to update the crosshair values? if (this.plot.isDomainCrosshairLockedOnData()) { if (this.plot.isRangeCrosshairLockedOnData()) { // both axes crosshairState.updateCrosshairPoint(x, y, domainAxisIndex, rangeAxisIndex, transX, transY, orientation); } else { // just the domain axis... crosshairState.updateCrosshairX(x, domainAxisIndex); } } else { if (this.plot.isRangeCrosshairLockedOnData()) { // just the range axis... crosshairState.updateCrosshairY(y, rangeAxisIndex); } } } }