Class GridLimits

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

public class GridLimits extends Object
The grid limits class that specifies minimal and maximal values for x and y variables, numbers of major and minor ticks on the axes, and formats of the markers
Version:
1.0
Author:
shishlo
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for the GridLimits object
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the color of the grid lines
    boolean
    Returns the boolean value that specifies if this GridLimits object will be used to define marks on axis and minimal and maximal values
    boolean
    Returns the boolean value that defines if the major sticks number parameter will be used on the graph panel
    boolean
    Returns the boolean value that defines if the major sticks number parameter will be used on the graph panel
    double
    Returns the internal maximal x-value
    double
    Returns the internal maximal y-value
    double
    Returns the internal minimal x-value
    double
    Returns the internal minimal y-value
    Returns the format for x-axis
    Returns the format for y-axis
    int
    Returns the number of major ticks on the x-axis
    int
    Returns the number of major ticks on the y-axis
    int
    Returns the number of minor ticks on the x-axis
    int
    Returns the number of minor ticks on the y-axis
    void
    Initializes all internal parameters in the initial state
    void
    Initializes all internal parameters for x-axis in the initial state
    void
    Initializes all internal parameters for y-axis in the initial state
    boolean
    Returns the boolean value that defines will the internal maximal x-value be used in the graph panel
    boolean
    Returns the boolean value that defines will the internal minimal x-value be used in the graph panel
    boolean
    Returns the boolean value that defines will the internal maximal y-value be used in the graph panel
    boolean
    Returns the boolean value that defines will the internal minimal y-value be used in the graph panel
    void
    Sets the color color of the grid lines
    void
    setGridLimitsSwitch(boolean gridLimitsSwitchOnYesIn)
    Sets the boolean value that specifies if this GridLimits object will be used to define marks on axis and minimal and maximal values
    void
    setLimitsAndTicksX(double vMin, double vMax, double step)
    Sets the minimal value, maximal value, step, and number of minor ticks on the x-axis.
    void
    setLimitsAndTicksX(double vMin, double vMax, double step, int nMinorTicksIn)
    Sets the minimal value, maximal value, step, and number of minor ticks on the x-axis
    void
    setLimitsAndTicksX(double vMin, double step, int nStep)
    Sets the minimal value, step, and number of steps on the x-axis.
    void
    setLimitsAndTicksX(double vMin, double step, int nStep, int nMinorTicksIn)
    Sets the minimal value, step, number of steps, and number of minor ticks on the x-axis
    void
    setLimitsAndTicksY(double vMin, double vMax, double step)
    Sets the minimal value, maximal value, step, and number of minor ticks on the y-axis.
    void
    setLimitsAndTicksY(double vMin, double vMax, double step, int nMinorTicksIn)
    Sets the minimal value, maximal value, step, and number of minor ticks on the y-axis
    void
    setLimitsAndTicksY(double vMin, double step, int nStep)
    Sets the minimal value, step, and number of steps on the y-axis.
    void
    setLimitsAndTicksY(double vMin, double step, int nStep, int nMinorTicksIn)
    Sets the minimal value, step, number of steps, and number of minor ticks on the y-axis
    void
    setMajorTicksOnX(boolean majorTicksOnXIn)
    Sets the boolean value that defines if the major sticks number parameter will be used on the graph panel
    void
    setMajorTicksOnY(boolean majorTicksOnYIn)
    Sets the boolean value that defines if the major sticks number parameter will be used on the graph panel
    void
    setNumberFormatX(NumberFormat numberFormatXIn)
    Sets the numberFormatX attribute of the GridLimits object
    void
    setNumberFormatY(NumberFormat numberFormatYIn)
    Sets the numberFormatY attribute of the GridLimits object
    void
    setNumMajorTicksX(int nMajorTicksXIn)
    Sets the sets the number of major ticks on the x-axis
    void
    setNumMajorTicksY(int nMajorTicksYIn)
    Sets the number of major ticks on the y-axis
    void
    setNumMinorTicksX(int nMinorTicksXIn)
    Sets the number of minor ticks on the x-axis
    void
    setNumMinorTicksY(int nMinorTicksYIn)
    Sets the number of minor ticks on the y-axis
    void
    Sets the limits by using smart procedure for both x and y-axes
    void
    Sets the limits by using smart procedure for x-axis.
    void
    Sets the limits by using smart procedure for x-axis This method will be defined in the sub-class.
    void
    setXmax(double xMax)
    Sets the maximal x-value
    void
    setXmaxOn(boolean ixMaxIn)
    Sets the boolean value that defines will the internal maximal x-value be used in the graph panel
    void
    setXmin(double xMin)
    Sets the minimal x-value
    void
    setXminOn(boolean ixMinIn)
    Sets the boolean value that defines will the internal minimal x-value be used in the graph panel
    void
    setYmax(double yMax)
    Sets the maximal y-value
    void
    setYmaxOn(boolean iyMaxIn)
    Sets the boolean value that defines will the internal maximal y-value be used in the graph panel
    void
    setYmin(double yMin)
    Sets the minimal y-value
    void
    setYminOn(boolean iyMinIn)
    Sets the boolean value that defines will the internal minimal y-value be used in the graph panel

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GridLimits

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

    • setSmartLimits

      public void setSmartLimits()
      Sets the limits by using smart procedure for both x and y-axes
    • setSmartLimitsX

      public void setSmartLimitsX()
      Sets the limits by using smart procedure for x-axis. This method will be defined in the sub-class. Here it is empty
    • setSmartLimitsY

      public void setSmartLimitsY()
      Sets the limits by using smart procedure for x-axis This method will be defined in the sub-class. Here it is empty
    • setNumberFormatX

      public void setNumberFormatX(NumberFormat numberFormatXIn)
      Sets the numberFormatX attribute of the GridLimits object
      Parameters:
      numberFormatXIn - The new format for x-axis
    • setNumberFormatY

      public void setNumberFormatY(NumberFormat numberFormatYIn)
      Sets the numberFormatY attribute of the GridLimits object
      Parameters:
      numberFormatYIn - The new format for x-axis
    • getNumberFormatX

      public NumberFormat getNumberFormatX()
      Returns the format for x-axis
      Returns:
      The format for x-axis
    • getNumberFormatY

      public NumberFormat getNumberFormatY()
      Returns the format for y-axis
      Returns:
      The format for y-axis
    • setXmin

      public void setXmin(double xMin)
      Sets the minimal x-value
      Parameters:
      xMin - The new minimal x-value
    • setYmin

      public void setYmin(double yMin)
      Sets the minimal y-value
      Parameters:
      yMin - The new minimal y-value
    • setXmax

      public void setXmax(double xMax)
      Sets the maximal x-value
      Parameters:
      xMax - The new maximal x-value
    • setYmax

      public void setYmax(double yMax)
      Sets the maximal y-value
      Parameters:
      yMax - The new maximal y-value
    • setXminOn

      public void setXminOn(boolean ixMinIn)
      Sets the boolean value that defines will the internal minimal x-value be used in the graph panel
      Parameters:
      ixMinIn - The boolean value
    • setYminOn

      public void setYminOn(boolean iyMinIn)
      Sets the boolean value that defines will the internal minimal y-value be used in the graph panel
      Parameters:
      iyMinIn - The boolean value
    • setXmaxOn

      public void setXmaxOn(boolean ixMaxIn)
      Sets the boolean value that defines will the internal maximal x-value be used in the graph panel
      Parameters:
      ixMaxIn - The boolean value
    • setYmaxOn

      public void setYmaxOn(boolean iyMaxIn)
      Sets the boolean value that defines will the internal maximal y-value be used in the graph panel
      Parameters:
      iyMaxIn - The boolean value
    • isSetXmin

      public boolean isSetXmin()
      Returns the boolean value that defines will the internal minimal x-value be used in the graph panel
      Returns:
      The boolean value
    • isSetYmin

      public boolean isSetYmin()
      Returns the boolean value that defines will the internal minimal y-value be used in the graph panel
      Returns:
      The boolean value
    • isSetXmax

      public boolean isSetXmax()
      Returns the boolean value that defines will the internal maximal x-value be used in the graph panel
      Returns:
      The boolean value
    • isSetYmax

      public boolean isSetYmax()
      Returns the boolean value that defines will the internal maximal y-value be used in the graph panel
      Returns:
      The boolean value
    • getMinX

      public double getMinX()
      Returns the internal minimal x-value
      Returns:
      The internal minimal x-value
    • getMinY

      public double getMinY()
      Returns the internal minimal y-value
      Returns:
      The internal minimal y-value
    • getMaxX

      public double getMaxX()
      Returns the internal maximal x-value
      Returns:
      The internal maximal x-value
    • getMaxY

      public double getMaxY()
      Returns the internal maximal y-value
      Returns:
      The internal maximal y-value
    • initialize

      public void initialize()
      Initializes all internal parameters in the initial state
    • initializeX

      public void initializeX()
      Initializes all internal parameters for x-axis in the initial state
    • initializeY

      public void initializeY()
      Initializes all internal parameters for y-axis in the initial state
    • getGridLimitsSwitch

      public boolean getGridLimitsSwitch()
      Returns the boolean value that specifies if this GridLimits object will be used to define marks on axis and minimal and maximal values
      Returns:
      The boolean value
    • setGridLimitsSwitch

      public void setGridLimitsSwitch(boolean gridLimitsSwitchOnYesIn)
      Sets the boolean value that specifies if this GridLimits object will be used to define marks on axis and minimal and maximal values
      Parameters:
      gridLimitsSwitchOnYesIn - The boolean value
    • getColor

      public Color getColor()
      Returns the color of the grid lines
      Returns:
      The color of the grid lines
    • setColor

      public void setColor(Color clr)
      Sets the color color of the grid lines
      Parameters:
      clr - The new color the grid lines
    • setNumMajorTicksX

      public void setNumMajorTicksX(int nMajorTicksXIn)
      Sets the sets the number of major ticks on the x-axis
      Parameters:
      nMajorTicksXIn - The number of major ticks on the x-axis
    • getNumMajorTicksX

      public int getNumMajorTicksX()
      Returns the number of major ticks on the x-axis
      Returns:
      The number of major ticks on the x-axis
    • setNumMajorTicksY

      public void setNumMajorTicksY(int nMajorTicksYIn)
      Sets the number of major ticks on the y-axis
      Parameters:
      nMajorTicksYIn - The number of major ticks on the y-axis
    • getNumMajorTicksY

      public int getNumMajorTicksY()
      Returns the number of major ticks on the y-axis
      Returns:
      The number of major ticks on the y-axis
    • setNumMinorTicksX

      public void setNumMinorTicksX(int nMinorTicksXIn)
      Sets the number of minor ticks on the x-axis
      Parameters:
      nMinorTicksXIn - The number of minor ticks on the x-axis
    • getNumMinorTicksX

      public int getNumMinorTicksX()
      Returns the number of minor ticks on the x-axis
      Returns:
      The number of minor ticks on the x-axis
    • setNumMinorTicksY

      public void setNumMinorTicksY(int nMinorTicksYIn)
      Sets the number of minor ticks on the y-axis
      Parameters:
      nMinorTicksYIn - The number of minor ticks on the y-axis
    • getNumMinorTicksY

      public int getNumMinorTicksY()
      Returns the number of minor ticks on the y-axis
      Returns:
      The number of minor ticks on the y-axis
    • setMajorTicksOnX

      public void setMajorTicksOnX(boolean majorTicksOnXIn)
      Sets the boolean value that defines if the major sticks number parameter will be used on the graph panel
      Parameters:
      majorTicksOnXIn - The boolean value
    • getMajorTicksOnX

      public boolean getMajorTicksOnX()
      Returns the boolean value that defines if the major sticks number parameter will be used on the graph panel
      Returns:
      The boolean value
    • setMajorTicksOnY

      public void setMajorTicksOnY(boolean majorTicksOnYIn)
      Sets the boolean value that defines if the major sticks number parameter will be used on the graph panel
      Parameters:
      majorTicksOnYIn - The boolean value
    • getMajorTicksOnY

      public boolean getMajorTicksOnY()
      Returns the boolean value that defines if the major sticks number parameter will be used on the graph panel
      Returns:
      The boolean value
    • setLimitsAndTicksX

      public void setLimitsAndTicksX(double vMin, double step, int nStep, int nMinorTicksIn)
      Sets the minimal value, step, number of steps, and number of minor ticks on the x-axis
      Parameters:
      vMin - The new minimal value
      step - The new step
      nStep - The new number of steps
      nMinorTicksIn - The new number of minor ticks
    • setLimitsAndTicksX

      public void setLimitsAndTicksX(double vMin, double step, int nStep)
      Sets the minimal value, step, and number of steps on the x-axis. The number of minor ticks will be what is was before
      Parameters:
      vMin - The new minimal value
      step - The new step
      nStep - The new number of steps
    • setLimitsAndTicksY

      public void setLimitsAndTicksY(double vMin, double step, int nStep, int nMinorTicksIn)
      Sets the minimal value, step, number of steps, and number of minor ticks on the y-axis
      Parameters:
      vMin - The new minimal value
      step - The new step
      nStep - The new number of steps
      nMinorTicksIn - The new number of minor ticks
    • setLimitsAndTicksY

      public void setLimitsAndTicksY(double vMin, double step, int nStep)
      Sets the minimal value, step, and number of steps on the y-axis. The number of minor ticks will be what is was before
      Parameters:
      vMin - The new minimal value
      step - The new step
      nStep - The new number of steps
    • setLimitsAndTicksX

      public void setLimitsAndTicksX(double vMin, double vMax, double step, int nMinorTicksIn)
      Sets the minimal value, maximal value, step, and number of minor ticks on the x-axis
      Parameters:
      vMin - The new new minimal value
      vMax - The new new maximal value
      step - The new step
      nMinorTicksIn - The new number of minor ticks
    • setLimitsAndTicksX

      public void setLimitsAndTicksX(double vMin, double vMax, double step)
      Sets the minimal value, maximal value, step, and number of minor ticks on the x-axis. The number of minor ticks will be what is was before
      Parameters:
      vMin - The new minimal value
      vMax - The new maximal value
      step - The new step
    • setLimitsAndTicksY

      public void setLimitsAndTicksY(double vMin, double vMax, double step, int nMinorTicksIn)
      Sets the minimal value, maximal value, step, and number of minor ticks on the y-axis
      Parameters:
      vMin - The new new minimal value
      vMax - The new new maximal value
      step - The new step
      nMinorTicksIn - The new number of minor ticks
    • setLimitsAndTicksY

      public void setLimitsAndTicksY(double vMin, double vMax, double step)
      Sets the minimal value, maximal value, step, and number of minor ticks on the y-axis. The number of minor ticks will be what is was before
      Parameters:
      vMin - The new minimal value
      vMax - The new maximal value
      step - The new step