All Packages Class Hierarchy This Package Previous Next Index
Class crw.data.Data
java.lang.Object
|
+----crw.data.Data
- public abstract class Data
- extends Object
Abtract class representing the physical data to plot. Its subclasses
represent a FunctionData or an ArrayData (from experiement, for example).
A Data object is added to a DataWrapper object which really represent all the
data to be plotted. A concrete subclass must implement the getX() method
which specifies the points of independent x-variable.
The x-range and y-range are set in the constructor.
- Version:
- 0.0 3/31/1998
- Author:
- C.R.Wie
-
xRange
-
-
Data()
-
-
getColor()
- Returns the plotting color of this data.
-
getFormatP()
-
-
getNameP()
- Returns the Parameter name for display in a
parameterized curve family.
-
getParam()
- If data is a family of curves, the subclass must override this
method and return the parameter values of each curve.
-
getRangeX()
- Range is used by other library classes to find the conversion factor, etc.
-
getRangeY()
- This method is used by the system to figure the overall y-range
from the data, which is used in the Conversion factor, etc.
-
getX()
- Must be specified in the concrete subclass.
-
getY()
- Is implemented in the subclass FunctionData or ArrayData.
-
init()
- initializing subclass variables needed for
setting the range (a placeholder method).
-
setColor(Color)
- Sets the plotting color for this data.
-
setFormatP(Format)
- Sets a new format for parameter display.
-
setNameP(String)
- Sets a new parameter name to be displayed.
-
setParam(double[])
- Sets a new list of parameter values.
-
setRange()
- Calculates and sets the xRange and yRange based on x[] and y[][] data.
-
setXRange(double, double)
- Any subclass can use this method to set the xRange.
xRange
protected FloatRange xRange
Data
protected Data()
getX
public abstract double[] getX()
- Must be specified in the concrete subclass.
- Returns:
- the x-points.
getY
public abstract double[][] getY()
- Is implemented in the subclass FunctionData or ArrayData.
- Returns:
- the y-points (parameterized curve family)
getParam
public double[] getParam()
- If data is a family of curves, the subclass must override this
method and return the parameter values of each curve. The getY() method
the FunctionData class uses this method to get the parameter array,
and the DataWrapper class uses it to see if it is a family of curves or a
single curve in the DataWrapper.drawFull(g) method.
- Returns:
- the parameter array for this data.
setParam
public void setParam(double p[])
- Sets a new list of parameter values.
- Parameters:
- p - the new parameter array.
getRangeX
public FloatRange getRangeX()
- Range is used by other library classes to find the conversion factor, etc.
This info is not needed by client programs.
- Returns:
- the range of x-values.
getRangeY
public FloatRange getRangeY()
- This method is used by the system to figure the overall y-range
from the data, which is used in the Conversion factor, etc.
- Returns:
- the overall y-range.
getNameP
public String getNameP()
- Returns the Parameter name for display in a
parameterized curve family.
- Returns:
- the parameter name.
setNameP
public void setNameP(String p)
- Sets a new parameter name to be displayed.
- Parameters:
- new - name for parameter.
getFormatP
public Format getFormatP()
- Returns:
- the parameter format.
setFormatP
public void setFormatP(Format f)
- Sets a new format for parameter display.
- Parameters:
- f - the new display format for parameter values.
getColor
public Color getColor()
- Returns the plotting color of this data.
Default color is BLUE.
- Returns:
- the curve color.
setColor
public void setColor(Color color)
- Sets the plotting color for this data.
- Parameters:
- color - the new plotting color;
init
protected void init()
- initializing subclass variables needed for
setting the range (a placeholder method).
setRange
protected void setRange()
- Calculates and sets the xRange and yRange based on x[] and y[][] data.
setXRange
protected void setXRange(double min,
double max)
- Any subclass can use this method to set the xRange.
for example, setXRange(-13.5, 50.0) sets xRange.min=-13.5, xRange.max=50.0
All Packages Class Hierarchy This Package Previous Next Index