Class SmartFormatGridLimits

java.lang.Object
xal.extension.widgets.plot.GridLimits
xal.extension.widgets.plot.SmartFormatGridLimits
Direct Known Subclasses:
SmartGridLimits

public class SmartFormatGridLimits extends GridLimits
This is subclass of grid limits class (GridLimits) with non-empty setSmartLimitsX() and setSmartLimitsY() methods. These methods will redefine format to beautify the axes markers
Version:
1.0
Author:
shishlo
  • Field Details

    • xSR

      protected double[] xSR
      The array with scale on x, xMin and xMax
    • sucessX

      protected boolean sucessX
      The scale on x, xMin and xMax are defined
    • ySR

      protected double[] ySR
      The array with scale on y, yMin and yMax
    • sucessY

      protected boolean sucessY
      The scale on y, yMin and yMax are defined
    • simpleFormats

      protected static NumberFormat[] simpleFormats
      The simple formats
    • scientificFormats

      protected static NumberFormat[] scientificFormats
      The scientific formats
    • univFormat

      protected static NumberFormat univFormat
      The universal format
  • Constructor Details

    • SmartFormatGridLimits

      public SmartFormatGridLimits()
      Constructor for the SmartFormatGridLimits object
  • Method Details

    • setSmartLimitsX

      public void setSmartLimitsX()
      Sets the limits by using smart procedure for x-axis
      Overrides:
      setSmartLimitsX in class GridLimits
    • setSmartLimitsY

      public void setSmartLimitsY()
      Sets the limits by using smart procedure for x-axis
      Overrides:
      setSmartLimitsY in class GridLimits
    • calculateScalesAndLimitsX

      protected void calculateScalesAndLimitsX()
      Calculates smart limits for the X axis
    • calculateScalesAndLimitsY

      protected void calculateScalesAndLimitsY()
      Calculates smart limits for the Y axis
    • getSmartFormat

      protected static NumberFormat getSmartFormat(double[] arr, int nExtraDigits)
      Returns the new format that will be suitable for given limits
      Parameters:
      arr - The array with scale, vMin, vMax
      nExtraDigits - The additional number of digits in mantissa
      Returns:
      The format