Class DefaultAxisDescription

    • Constructor Detail

      • DefaultAxisDescription

        public DefaultAxisDescription​(int dimIndex)
        default constructor
        Parameters:
        dimIndex - numeric dimension index this AxisDescription refers to (e.g. for a euclidean system '0: x-axis', '1: y-axis', ...)
      • DefaultAxisDescription

        public DefaultAxisDescription​(AxisDescription axisDesc)
        Copy constructor to generate axisDescriptions for datasets from existing Axis Descriptions
        Parameters:
        axisDesc - axis Description to copy all data except dataSet from
      • DefaultAxisDescription

        public DefaultAxisDescription​(int dimIndex,
                                      java.lang.String axisName,
                                      java.lang.String... axisUnit)
        Parameters:
        dimIndex - numeric dimension index this AxisDescription refers to (e.g. for a euclidean system '0: x-axis', '1: y-axis', ...)
        axisName - the new axis name
        axisUnit - the new axis unit
      • DefaultAxisDescription

        public DefaultAxisDescription​(int dimIndex,
                                      java.lang.String axisName,
                                      java.lang.String axisUnit,
                                      double rangeMin,
                                      double rangeMax)
        Parameters:
        dimIndex - numeric dimension index this AxisDescription refers to (e.g. for a euclidean system '0: x-axis', '1: y-axis', ...)
        axisName - the new axis name
        axisUnit - the new axis unit
        rangeMin - the user-provided new minimum value of the DataSet/Axis range
        rangeMax - the user-provided new maximum value of the DataSet/Axis range
    • Method Detail

      • add

        public boolean add​(double value)
        Adds value to this range.
        Specified by:
        add in interface AxisDescription
        Overrides:
        add in class DataRange
        Parameters:
        value - value to be added
        Returns:
        true if the value becomes min or max.
      • add

        public boolean add​(double[] values,
                           int length)
        Adds values to this range.
        Specified by:
        add in interface AxisDescription
        Overrides:
        add in class DataRange
        Parameters:
        values - values to be added
        length - the maximum array length that should be taken into account
        Returns:
        true if the value becomes min or max.
      • autoNotification

        public java.util.concurrent.atomic.AtomicBoolean autoNotification()
        Description copied from interface: EventSource
        Set the automatic notification of invalidation listeners. In general, data sets should notify registered invalidation listeners, if the data in the data set has changed. Charts usually register an invalidation listener with the data set to be notified of any changes and update the charts. Setting the automatic notification to false, allows applications to prevent this behaviour, in case data sets are updated multiple times during an acquisition cycle but the chart update is only required at the end of the cycle. true for automatic notification
        Specified by:
        autoNotification in interface EventSource
        Returns:
        the atomic boolean
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class DataRange
      • equals

        public boolean equals​(java.lang.Object obj,
                              double epsilon)
        Parameters:
        obj - object to compare to
        epsilon - allow for fuzzy comparisons of min/max
        Returns:
        true: matches, false otherwise
      • getDimIndex

        public final int getDimIndex()
        Specified by:
        getDimIndex in interface AxisDescription
        Returns:
        numeric dimension index this AxisDescription refers to (e.g. for a euclidean system '0: x-axis', '1: y-axis', ...)
      • getName

        public final java.lang.String getName()
        Specified by:
        getName in interface AxisDescription
        Returns:
        axis name
      • getUnit

        public final java.lang.String getUnit()
        Specified by:
        getUnit in interface AxisDescription
        Returns:
        the unit of the axis, typically in SI units such as 's', 'V' etc. or 'a.u.'
      • set

        public boolean set​(DataRange range)
        Description copied from class: DataRange
        Sets updates range to the specified one.
        Overrides:
        set in class DataRange
        Parameters:
        range - other DataRange object
        Returns:
        true if the value becomes min or max.
      • set

        public boolean set​(double min,
                           double max)
        Description copied from class: DataRange
        Sets min and max values for this range.
        Specified by:
        set in interface AxisDescription
        Overrides:
        set in class DataRange
        Parameters:
        min - new minimum of the range
        max - new maximum of the range
        Returns:
        true if the values becomes the new min or max.
      • set

        public final boolean set​(java.lang.String axisName,
                                 java.lang.String axisUnit,
                                 double rangeMin,
                                 double rangeMax)
        Specified by:
        set in interface AxisDescription
        Parameters:
        axisName - the new axis name
        axisUnit - the new axis unit
        rangeMin - the user-provided new minimum value of the DataSet/Axis range
        rangeMax - the user-provided new maximum value of the DataSet/Axis range
        Returns:
        true if this setter invalidates the existing min/max range
        See Also:
        event if only the name/unit changed, or, event if only the range changed, or, for a full change
      • setMax

        public boolean setMax​(double max)
        Description copied from class: DataRange
        Sets max value for this range.
        Specified by:
        setMax in interface AxisDescription
        Overrides:
        setMax in class DataRange
        Parameters:
        max - the new max value
        Returns:
        true if the value becomes the new max.
      • setMin

        public boolean setMin​(double min)
        Description copied from class: DataRange
        Sets min value for this range.
        Specified by:
        setMin in interface AxisDescription
        Overrides:
        setMin in class DataRange
        Parameters:
        min - the new data range minimum
        Returns:
        true if the value becomes the new min.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class DataRange
      • updateEventListener

        public java.util.List<EventListener> updateEventListener()
        Specified by:
        updateEventListener in interface EventSource
        Returns:
        list containing all update event listener (needs to be provided by implementing class)