Module xaos.ui.plot

Class ErrorSeries.ErrorData<X,​Y>

  • Enclosing class:
    ErrorSeries<X,​Y>

    public static final class ErrorSeries.ErrorData<X,​Y>
    extends Object
    • Constructor Detail

      • ErrorData

        public ErrorData​(XYChart.Data<X,​Y> data,
                         double yError)
        Creates an error data element without no X error data.
        Parameters:
        data - The data point around which the error exists.
        yError - The Y error around the data point:
         ---
          |
          |
          y
          |
          |
         ---
        Double.NaN is used to indicate no Y error value.
      • ErrorData

        public ErrorData​(XYChart.Data<X,​Y> data,
                         double xError,
                         double yError)
        Creates an error data element.
        Parameters:
        data - The data point around which the error exists.
        xError - The X error around the data point: |---x---|. Double.NaN is used to indicate no X error value.
        yError - The Y error around the data point:
         ---
          |
          |
          y
          |
          |
         ---
        Double.NaN is used to indicate no Y error value.
      • ErrorData

        protected ErrorData​(XYChart.Data<X,​Y> data)
        Initializes the data point and the 2 Paths.
        Parameters:
        data - The data point.
    • Method Detail

      • getDataPoint

        public XYChart.Data<X,​Y> getDataPoint()
        Returns:
        The data point around which the error exists.
      • getNode

        public Node getNode()
        Returns:
        The data point's Node.
      • getXError

        public double getXError()
        Returns:
        The X error around the data point: |---x---|. Double.NaN is used to indicate no X error value.
      • getXErrorPath

        public Path getXErrorPath()
        Returns:
        The Path used to draw the X error: |---x---|.
      • getYError

        public double getYError()
        Returns:
        The Y error around the data point:
         ---
          |
          |
          y
          |
          |
         ---
        Double.NaN is used to indicate no Y error value.
      • getYErrorPath

        public Path getYErrorPath()
        Returns:
        The Path used to draw the Y error:
         ---
          |
          |
          y
          |
          |
         ---
      • isXErrorValid

        public boolean isXErrorValid()
        Returns:
        Return true if the X error around the data point is not Double.NaN.
      • isYErrorValid

        public boolean isYErrorValid()
        Returns:
        Return true if the Y error around the data point is not Double.NaN.
      • match

        public boolean match​(XYChart.Data<X,​Y> dataPoint)
        Parameters:
        dataPoint - The data point to be compared with the one in this object.
        Returns:
        true if the given data point matches the one stored in this object.
      • setDataPoint

        public void setDataPoint​(XYChart.Data<X,​Y> data)
        Parameters:
        data - The new data point around which the error exists.
      • setErrors

        public void setErrors​(double xError,
                              double yError)
        Sets the X and Y errors.
        Parameters:
        xError - The X error around the data point: |---x---|. Double.NaN is used to indicate no X error value.
        yError - The Y error around the data point:
         ---
          |
          |
          y
          |
          |
         ---
        Double.NaN is used to indicate no Y error value.
      • setXError

        public void setXError​(double xError)
        Parameters:
        xError - The X error around the data point: |---x---|. Double.NaN is used to indicate no X error value.
      • setYErrorBar

        public void setYErrorBar​(double yError)
        Parameters:
        yError - The Y error around the data point:
         ---
          |
          |
          y
          |
          |
         ---
        Double.NaN is used to indicate no Y error value.
      • show

        public void show​(Axis<X> xAxis,
                         Axis<Y> yAxis,
                         double dataX,
                         double dataY)
        Shows the error bar(s) at the given center point.
        Parameters:
        xAxis - The X axis.
        yAxis - The Y axis.
        dataX - The display data X coordinate.
        dataY - The display data Y coordinate.