Package xal.extension.widgets.plot
Class GridLimits
java.lang.Object
xal.extension.widgets.plot.GridLimits
- Direct Known Subclasses:
SmartFormatGridLimits
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 -
Method Summary
Modifier and TypeMethodDescriptiongetColor()Returns the color of the grid linesbooleanReturns the boolean value that specifies if this GridLimits object will be used to define marks on axis and minimal and maximal valuesbooleanReturns the boolean value that defines if the major sticks number parameter will be used on the graph panelbooleanReturns the boolean value that defines if the major sticks number parameter will be used on the graph paneldoublegetMaxX()Returns the internal maximal x-valuedoublegetMaxY()Returns the internal maximal y-valuedoublegetMinX()Returns the internal minimal x-valuedoublegetMinY()Returns the internal minimal y-valueReturns the format for x-axisReturns the format for y-axisintReturns the number of major ticks on the x-axisintReturns the number of major ticks on the y-axisintReturns the number of minor ticks on the x-axisintReturns the number of minor ticks on the y-axisvoidInitializes all internal parameters in the initial statevoidInitializes all internal parameters for x-axis in the initial statevoidInitializes all internal parameters for y-axis in the initial statebooleanReturns the boolean value that defines will the internal maximal x-value be used in the graph panelbooleanReturns the boolean value that defines will the internal minimal x-value be used in the graph panelbooleanReturns the boolean value that defines will the internal maximal y-value be used in the graph panelbooleanReturns the boolean value that defines will the internal minimal y-value be used in the graph panelvoidSets the color color of the grid linesvoidsetGridLimitsSwitch(boolean gridLimitsSwitchOnYesIn) Sets the boolean value that specifies if this GridLimits object will be used to define marks on axis and minimal and maximal valuesvoidsetLimitsAndTicksX(double vMin, double vMax, double step) Sets the minimal value, maximal value, step, and number of minor ticks on the x-axis.voidsetLimitsAndTicksX(double vMin, double vMax, double step, int nMinorTicksIn) Sets the minimal value, maximal value, step, and number of minor ticks on the x-axisvoidsetLimitsAndTicksX(double vMin, double step, int nStep) Sets the minimal value, step, and number of steps on the x-axis.voidsetLimitsAndTicksX(double vMin, double step, int nStep, int nMinorTicksIn) Sets the minimal value, step, number of steps, and number of minor ticks on the x-axisvoidsetLimitsAndTicksY(double vMin, double vMax, double step) Sets the minimal value, maximal value, step, and number of minor ticks on the y-axis.voidsetLimitsAndTicksY(double vMin, double vMax, double step, int nMinorTicksIn) Sets the minimal value, maximal value, step, and number of minor ticks on the y-axisvoidsetLimitsAndTicksY(double vMin, double step, int nStep) Sets the minimal value, step, and number of steps on the y-axis.voidsetLimitsAndTicksY(double vMin, double step, int nStep, int nMinorTicksIn) Sets the minimal value, step, number of steps, and number of minor ticks on the y-axisvoidsetMajorTicksOnX(boolean majorTicksOnXIn) Sets the boolean value that defines if the major sticks number parameter will be used on the graph panelvoidsetMajorTicksOnY(boolean majorTicksOnYIn) Sets the boolean value that defines if the major sticks number parameter will be used on the graph panelvoidsetNumberFormatX(NumberFormat numberFormatXIn) Sets the numberFormatX attribute of the GridLimits objectvoidsetNumberFormatY(NumberFormat numberFormatYIn) Sets the numberFormatY attribute of the GridLimits objectvoidsetNumMajorTicksX(int nMajorTicksXIn) Sets the sets the number of major ticks on the x-axisvoidsetNumMajorTicksY(int nMajorTicksYIn) Sets the number of major ticks on the y-axisvoidsetNumMinorTicksX(int nMinorTicksXIn) Sets the number of minor ticks on the x-axisvoidsetNumMinorTicksY(int nMinorTicksYIn) Sets the number of minor ticks on the y-axisvoidSets the limits by using smart procedure for both x and y-axesvoidSets the limits by using smart procedure for x-axis.voidSets the limits by using smart procedure for x-axis This method will be defined in the sub-class.voidsetXmax(double xMax) Sets the maximal x-valuevoidsetXmaxOn(boolean ixMaxIn) Sets the boolean value that defines will the internal maximal x-value be used in the graph panelvoidsetXmin(double xMin) Sets the minimal x-valuevoidsetXminOn(boolean ixMinIn) Sets the boolean value that defines will the internal minimal x-value be used in the graph panelvoidsetYmax(double yMax) Sets the maximal y-valuevoidsetYmaxOn(boolean iyMaxIn) Sets the boolean value that defines will the internal maximal y-value be used in the graph panelvoidsetYmin(double yMin) Sets the minimal y-valuevoidsetYminOn(boolean iyMinIn) Sets the boolean value that defines will the internal minimal y-value be used in the graph panel
-
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
Sets the numberFormatX attribute of the GridLimits object- Parameters:
numberFormatXIn- The new format for x-axis
-
setNumberFormatY
Sets the numberFormatY attribute of the GridLimits object- Parameters:
numberFormatYIn- The new format for x-axis
-
getNumberFormatX
Returns the format for x-axis- Returns:
- The format for x-axis
-
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
Returns the color of the grid lines- Returns:
- The color of the grid lines
-
setColor
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 valuestep- The new stepnStep- The new number of stepsnMinorTicksIn- 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 valuestep- The new stepnStep- 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 valuestep- The new stepnStep- The new number of stepsnMinorTicksIn- 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 valuestep- The new stepnStep- 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 valuevMax- The new new maximal valuestep- The new stepnMinorTicksIn- 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 valuevMax- The new maximal valuestep- 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 valuevMax- The new new maximal valuestep- The new stepnMinorTicksIn- 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 valuevMax- The new maximal valuestep- The new step
-