Class AxisRange


  • public class AxisRange
    extends de.gsi.dataset.spi.DataRange
    Holds the range of the axis along with scale and tick numbers format to be used.
    Author:
    rstein
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected double axisLength  
      protected double scale  
      protected double tickUnit  
      • Fields inherited from class de.gsi.dataset.spi.DataRange

        max, min
    • Constructor Summary

      Constructors 
      Constructor Description
      AxisRange()  
      AxisRange​(double lowerBound, double upperBound, double axisLength, double scale, double tickUnit)  
      AxisRange​(AxisRange other)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(AxisRange range)
      Add the specified data range to this range.
      AxisRange copy()  
      boolean equals​(java.lang.Object obj)  
      double getAxisLength()  
      double getLowerBound()  
      double getScale()  
      double getTickUnit()  
      double getUpperBound()  
      int hashCode()  
      void setAxisLength​(double length, Side side)
      Calculate a new scale for this axis.
      java.lang.String toString()  
      • Methods inherited from class de.gsi.dataset.spi.DataRange

        add, add, add, add, clear, contains, getLength, getMax, getMin, isDefined, isMaxDefined, isMinDefined, set, set, setMax, setMin
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • axisLength

        protected double axisLength
      • scale

        protected double scale
      • tickUnit

        protected double tickUnit
    • Constructor Detail

      • AxisRange

        public AxisRange()
      • AxisRange

        public AxisRange​(AxisRange other)
      • AxisRange

        public AxisRange​(double lowerBound,
                         double upperBound,
                         double axisLength,
                         double scale,
                         double tickUnit)
    • Method Detail

      • add

        public boolean add​(AxisRange range)
        Add the specified data range to this range.
        Parameters:
        range - range to be added
        Returns:
        true if added range causes a change in range
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class de.gsi.dataset.spi.DataRange
      • getAxisLength

        public double getAxisLength()
        Returns:
        the axis length in display (ie. pixel) units
      • getLowerBound

        public double getLowerBound()
        Returns:
        the lower bound of the axis
      • getScale

        public double getScale()
        Returns:
        the calculated scale
      • getTickUnit

        public double getTickUnit()
      • getUpperBound

        public double getUpperBound()
        Returns:
        the upper bound of the axis
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class de.gsi.dataset.spi.DataRange
      • setAxisLength

        public void setAxisLength​(double length,
                                  Side side)
        Calculate a new scale for this axis. This should not effect any state(properties) of this axis.
        Parameters:
        length - The display length of the axis
        side - axis side
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class de.gsi.dataset.spi.DataRange