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 linesboolean
Returns the boolean value that specifies if this GridLimits object will be used to define marks on axis and minimal and maximal valuesboolean
Returns the boolean value that defines if the major sticks number parameter will be used on the graph panelboolean
Returns the boolean value that defines if the major sticks number parameter will be used on the graph paneldouble
getMaxX()
Returns the internal maximal x-valuedouble
getMaxY()
Returns the internal maximal y-valuedouble
getMinX()
Returns the internal minimal x-valuedouble
getMinY()
Returns the internal minimal y-valueReturns the format for x-axisReturns the format for y-axisint
Returns the number of major ticks on the x-axisint
Returns the number of major ticks on the y-axisint
Returns the number of minor ticks on the x-axisint
Returns the number of minor ticks on the y-axisvoid
Initializes all internal parameters in the initial statevoid
Initializes all internal parameters for x-axis in the initial statevoid
Initializes all internal parameters for y-axis in the initial stateboolean
Returns the boolean value that defines will the internal maximal x-value be used in the graph panelboolean
Returns the boolean value that defines will the internal minimal x-value be used in the graph panelboolean
Returns the boolean value that defines will the internal maximal y-value be used in the graph panelboolean
Returns the boolean value that defines will the internal minimal y-value be used in the graph panelvoid
Sets the color color of the grid linesvoid
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 valuesvoid
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-axisvoid
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-axisvoid
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-axisvoid
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-axisvoid
setMajorTicksOnX
(boolean majorTicksOnXIn) Sets the boolean value that defines if the major sticks number parameter will be used on the graph panelvoid
setMajorTicksOnY
(boolean majorTicksOnYIn) Sets the boolean value that defines if the major sticks number parameter will be used on the graph panelvoid
setNumberFormatX
(NumberFormat numberFormatXIn) Sets the numberFormatX attribute of the GridLimits objectvoid
setNumberFormatY
(NumberFormat numberFormatYIn) Sets the numberFormatY attribute of the GridLimits objectvoid
setNumMajorTicksX
(int nMajorTicksXIn) Sets the sets the number of major ticks on the x-axisvoid
setNumMajorTicksY
(int nMajorTicksYIn) Sets the number of major ticks on the y-axisvoid
setNumMinorTicksX
(int nMinorTicksXIn) Sets the number of minor ticks on the x-axisvoid
setNumMinorTicksY
(int nMinorTicksYIn) Sets the number of minor ticks on the y-axisvoid
Sets the limits by using smart procedure for both x and y-axesvoid
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-valuevoid
setXmaxOn
(boolean ixMaxIn) Sets the boolean value that defines will the internal maximal x-value be used in the graph panelvoid
setXmin
(double xMin) Sets the minimal x-valuevoid
setXminOn
(boolean ixMinIn) Sets the boolean value that defines will the internal minimal x-value be used in the graph panelvoid
setYmax
(double yMax) Sets the maximal y-valuevoid
setYmaxOn
(boolean iyMaxIn) Sets the boolean value that defines will the internal maximal y-value be used in the graph panelvoid
setYmin
(double yMin) Sets the minimal y-valuevoid
setYminOn
(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
-