public class SmartFormatGridLimits extends GridLimits
Modifier and Type | Field and Description |
---|---|
protected static java.text.DecimalFormat[] |
scientificFormats
The scientific formats
|
protected static java.text.DecimalFormat[] |
simpleFormats
The simple formats
|
protected boolean |
sucessX
The scale on x, x_min and x_max are defined
|
protected boolean |
sucessY
The scale on y, y_min and y_max are defined
|
protected static java.text.DecimalFormat |
univFormat
The universal format
|
protected double[] |
xSR
The array with scale on x, x_min and x_max
|
protected double[] |
ySR
The array with scale on y, y_min and y_max
|
Constructor and Description |
---|
SmartFormatGridLimits()
Constructor for the SmartFormatGridLimits object
|
Modifier and Type | Method and Description |
---|---|
protected void |
calculateScalesAndLimitsX()
Calculates smart limits for the X axis
|
protected void |
calculateScalesAndLimitsY()
Calculates smart limits for the Y axis
|
protected static java.text.DecimalFormat |
getSmartFormat(double[] arr,
int nExtraDigits)
Returns the new format that will be suitable for given limits
|
void |
setSmartLimitsX()
Sets the limits by using smart procedure for x-axis
|
void |
setSmartLimitsY()
Sets the limits by using smart procedure for x-axis
|
getColor, getGridLimitsSwitch, getMajorTicksOnX, getMajorTicksOnY, getMaxX, getMaxY, getMinX, getMinY, getNumberFormatX, getNumberFormatY, getNumMajorTicksX, getNumMajorTicksY, getNumMinorTicksX, getNumMinorTicksY, initialize, initializeX, initializeY, isSetXmax, isSetXmin, isSetYmax, isSetYmin, setColor, setGridLimitsSwitch, setLimitsAndTicksX, setLimitsAndTicksX, setLimitsAndTicksX, setLimitsAndTicksX, setLimitsAndTicksY, setLimitsAndTicksY, setLimitsAndTicksY, setLimitsAndTicksY, setMajorTicksOnX, setMajorTicksOnY, setNumberFormatX, setNumberFormatY, setNumMajorTicksX, setNumMajorTicksY, setNumMinorTicksX, setNumMinorTicksY, setSmartLimits, setXmax, setXmaxOn, setXmin, setXminOn, setYmax, setYmaxOn, setYmin, setYminOn
protected double[] xSR
protected boolean sucessX
protected double[] ySR
protected boolean sucessY
protected static java.text.DecimalFormat[] simpleFormats
protected static java.text.DecimalFormat[] scientificFormats
protected static java.text.DecimalFormat univFormat
public SmartFormatGridLimits()
public void setSmartLimitsX()
setSmartLimitsX
in class GridLimits
public void setSmartLimitsY()
setSmartLimitsY
in class GridLimits
protected void calculateScalesAndLimitsX()
protected void calculateScalesAndLimitsY()
protected static java.text.DecimalFormat getSmartFormat(double[] arr, int nExtraDigits)
arr
- The array with scale, v_min, v_maxnExtraDigits
- The additional numer of digits in mantissa