Java Code Examples for org.jfree.chart.plot.CategoryCrosshairState#updateCrosshairPoint()

The following examples show how to use org.jfree.chart.plot.CategoryCrosshairState#updateCrosshairPoint() . 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: jKali_0031_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 2
Source File: Cardumen_000_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 3
Source File: Chart_1_AbstractCategoryItemRenderer_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 4
Source File: jKali_0019_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 5
Source File: Cardumen_00191_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 6
Source File: Cardumen_00139_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 7
Source File: JGenProg2017_0078_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 8
Source File: jMutRepair_0020_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 9
Source File: JGenProg2017_00102_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 10
Source File: Arja_00112_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 11
Source File: jMutRepair_000_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 12
Source File: jKali_000_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 13
Source File: AbstractCategoryItemRenderer.java    From ECG-Viewer with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 14
Source File: Elixir_000_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 15
Source File: Arja_000_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 16
Source File: AbstractCategoryItemRenderer.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 17
Source File: AbstractCategoryItemRenderer.java    From ccu-historian with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 18
Source File: Cardumen_00139_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 19
Source File: 1_AbstractCategoryItemRenderer.java    From SimFix with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 20
Source File: 1_AbstractCategoryItemRenderer.java    From SimFix with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
        }
    }
}