|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.quinncurtis.chart2djava.ChartObj
com.quinncurtis.chart2djava.GraphObj
com.quinncurtis.chart2djava.Axis
com.quinncurtis.spcchartjava.ProbabilityAxis
public class ProbabilityAxis
The ProbabilityAxis class implements a probability axis where the major tick marks are placed at intervals appropriate to a cumulative probability scale.
Field Summary |
---|
Constructor Summary | |
---|---|
ProbabilityAxis()
The default ProbabilityAxis constructor. |
|
ProbabilityAxis(ProbabilityCoordinates transform,
int axtype)
This constructor creates a new ProbabilityAxis object of the specified type and scales it to match the minimum and maximum values of the specified PhysicalCoordinates object. |
|
ProbabilityAxis(ProbabilityCoordinates transform,
int axtype,
boolean axisinversion)
This constructor creates a new ProbabilityAxis object of the specified type and scales it to match the minimum and maximum values of the specified PhysicalCoordinates object. |
|
ProbabilityAxis(ProbabilityCoordinates transform,
int axtype,
double minval,
double maxval)
This constructor creates a new ProbabilityAxis object of a specified type, and scales it to match the specified minimum and maximum values. |
Method Summary | |
---|---|
void |
calcAutoAxis()
This method uses the current minimum and maximum values in the chartObjScale object to determine the minimum and maximum value for the axis, and the appropriate tick mark spacing. |
void |
calcAutoAxis(double rmin,
double rmax)
This auto-axis method uses the supplied axis extents and calculates the appropriate ancillary properties. |
int |
calcAxisLabelsDecimalPos()
A dummy method. |
int |
calcAxisLabelsDecimalPos(double r)
Returns an integer value that is the number of digits that should be displayed to the right of the decimal point when labeling the axis tick marks. |
boolean |
checkIntersection(ChartPoint2D testpoint,
NearestPointData np)
The CheckIntersection method. |
java.lang.Object |
clone()
Returns an object that is a clone of this ProbabilityAxis object. |
void |
copy(ProbabilityAxis source)
Copies the source ProbabilityAxis object. |
void |
draw(java.awt.Graphics2D g2)
The draw method for this class. |
int |
errorCheck(int nerror)
Checks the current axis object for common errors. |
AxisLabels |
getCompatibleAxisLabels()
This method returns an AxisLabels object that is compatible with this ProbabilityAxis object. |
int |
getProbabilityTickFormat()
Returns the value of the probabilityTickFormat field. |
void |
initProbabilityAxis(ProbabilityCoordinates transform,
int axtype,
boolean axisinversion)
This method initializes a new ProbabilityAxis object of the specified type and scales it to match the minimum and maximum values of the specified PhysicalCoordinates object. |
void |
setAxisTicks(double tickorigin,
int tickformat)
This method is used to initialize the minor and major tick mark spacing, and the tick mark origin. |
void |
setAxisTicks(double origin,
int tickformat,
double minorticklength,
double majorticklength,
int tickdir)
This method is used to initialize the minor and major tick mark spacing, and the tick mark origin. |
void |
setProbabilityTickFormat(int tickformat)
This method specifies which minor tick marks are flagged for labels. |
Methods inherited from class com.quinncurtis.chart2djava.ChartObj |
---|
copy, getChartObjIDCntr, getChartObjType, getThisChartObjID, TypeSafeVectorCopy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProbabilityAxis()
public ProbabilityAxis(ProbabilityCoordinates transform, int axtype)
transform
- Sets the minimum and maximum value of the axis to the associated minimum
and maximum value of the coordinate system transform.axtype
- Specifies if the axis is an x-axis (X_AXIS), or a y-axis (Y_AXIS).public ProbabilityAxis(ProbabilityCoordinates transform, int axtype, boolean axisinversion)
transform
- Sets the minimum and maximum value of the axis to the associated minimum
and maximum value of the coordinate system transform.axtype
- Specifies if the axis is an x-axis (X_AXIS), or a y-axis (Y_AXIS).axisinversion
- Set to true to invert the axis from normal sense.public ProbabilityAxis(ProbabilityCoordinates transform, int axtype, double minval, double maxval)
transform
- Places the axes in the coordinate system defined by transform.axtype
- Specifies if the axis is an x-axis (X_AXIS), or a y-axis (Y_AXIS).minval
- Sets the minimum value for the axis.maxval
- Sets the maximum value for the axis.Method Detail |
---|
public void calcAutoAxis()
calcAutoAxis
in class Axis
public void calcAutoAxis(double rmin, double rmax)
rmin
- The axis minimum valuermax
- The axis maximum valuepublic int calcAxisLabelsDecimalPos()
calcAxisLabelsDecimalPos
in class Axis
public int calcAxisLabelsDecimalPos(double r)
r
- The numeric value, in physical coordinates, of the tick mark.
public boolean checkIntersection(ChartPoint2D testpoint, NearestPointData np)
checkIntersection
in class Axis
testpoint
- The test pointnp
- Nearest point information for data based objects.
public java.lang.Object clone()
clone
in class GraphObj
public void copy(ProbabilityAxis source)
source
- The source ProbabilityAxis object.public void draw(java.awt.Graphics2D g2)
draw
in class GraphObj
g2
- The graphics context.public int errorCheck(int nerror)
errorCheck
in class Axis
nerror
- Current error state
public AxisLabels getCompatibleAxisLabels()
getCompatibleAxisLabels
in class Axis
public int getProbabilityTickFormat()
public void initProbabilityAxis(ProbabilityCoordinates transform, int axtype, boolean axisinversion)
transform
- Sets the minimum and maximum value of the axis to the associated minimum
and maximum value of the coordinate system transform.axtype
- Specifies if the axis is an x-axis (X_AXIS), or a y-axis (Y_AXIS).axisinversion
- Set to true to invert the axis from normal sense.public void setAxisTicks(double tickorigin, int tickformat)
tickorigin
- The tick marks start at this value.tickformat
- Unused at this time.public void setAxisTicks(double origin, int tickformat, double minorticklength, double majorticklength, int tickdir)
origin
- The tick marks start at this value.tickformat
- Unused at this time.minorticklength
- The length of minor tick marks, in window device coordinates.majorticklength
- The length of major tick marks, in window device coordinates.tickdir
- The direction of the tick marks. Use one of the tick mark direction constants:
AXIS_MIN, AXIS_CENTER, or AXIS_MAX.public void setProbabilityTickFormat(int tickformat)
tickformat
- This parameter specifies which minor tick marks are flagged for labels.
The values are interpreted as follows: 0 No minor tick mark labels 1 Place a label at tick mark 0 in
each decade. 2 Place a label at minor tick marks 1 and 5 in each decade.
3 Place a label at minor tick marks 1, 2 and 5 in each decade.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |