All Packages Class Hierarchy This Package Previous Next Index
Class crw.data.DataWrapper
java.lang.Object
|
+----crw.data.DataWrapper
- public class DataWrapper
- extends Object
A Data wrapper class, is the holding place for all physical data and
prepares them for plot. A DataWrapper object is associated with one
PlotCanvas object. This object uses a Conversion object which is
created based on the data range, xRange and yRange, and the size of
the PlotCanvas. One DataWrapper object can hold many physical Data
objects in a Vector. This class is responsible for plotting all data
in the PlotCanvas drawing area. This class is not usually used in an
application, but used by the system (in PlotCanvas). A DataWrapper object
is obtained by calling PlotCanvas.getData() method.
This class is compatible with JDK1.0. In order to make it compatible with JDK1.1,
replace all occurences of size() by getSize().
- Version:
- 1.0 10/2/1998
- Author:
- C.R.Wie
-
add(Data)
- Adds a data object into this wrapper class.
-
drawCurrent(Graphics, Color)
- Draws a curve corresponding to the current parameter value using the Color
provided.
-
drawFull(Graphics)
- Draws all data curves for all parameter values in the background image
object.
-
drawSpot(Graphics, Color)
- Draws the current spot with the given color.
-
getLogOrigin()
- Returns the value at the axis origin if log scale plot is
employed.
-
getOrigin()
-
-
getRangeX()
-
-
getRangeY()
-
-
isEmpty()
-
-
remove(Data)
- Removes a Data object.
-
removeAll()
- Removes all data object stored in the vector.
-
setCurrentP(double)
- Sets the current parameter value.
-
setCurrentX(double)
- Sets the current x-value.
-
setRange()
- Finds the range of all physical data based on the function of array data.
-
showCurrentSpot(boolean)
- Whether to show the current spot or not.
removeAll
public void removeAll()
- Removes all data object stored in the vector.
remove
public boolean remove(Data d)
- Removes a Data object.
- Parameters:
- d - the Data object to remove from this.
add
public void add(Data d)
- Adds a data object into this wrapper class.
- Parameters:
- d - the Data object to plot.
setRange
public void setRange()
- Finds the range of all physical data based on the function of array data.
When the function parameters change, i.e. when the data changes, this method
should be called in the application code.
drawFull
public void drawFull(Graphics g)
- Draws all data curves for all parameter values in the background image
object.
- Parameters:
- g - the Graphics context.
drawCurrent
public void drawCurrent(Graphics g,
Color c)
- Draws a curve corresponding to the current parameter value using the Color
provided.
- Parameters:
- g - the Graphics context.
- c - the Color of the curve.
showCurrentSpot
public void showCurrentSpot(boolean show)
- Whether to show the current spot or not.
- Parameters:
- show - true if wish to show
drawSpot
public void drawSpot(Graphics g,
Color c)
- Draws the current spot with the given color.
- Parameters:
- g - the Graphics context
- c - the Color of the current spot.
setCurrentP
public void setCurrentP(double p)
- Sets the current parameter value.
- Parameters:
- p - the new parameter value.
setCurrentX
public void setCurrentX(double x)
- Sets the current x-value.
- Parameters:
- x - the x-value.
isEmpty
public boolean isEmpty()
- Returns:
- true if there is no data to plot.
getRangeX
public FloatRange getRangeX()
- Returns:
- the total range of x-values.
getRangeY
public FloatRange getRangeY()
- Returns:
- the total range of y-values.
getOrigin
public FloatPoint getOrigin()
- Returns:
- x and y-values at the origin.
getLogOrigin
public Point getLogOrigin()
- Returns the value at the axis origin if log scale plot is
employed. Used by Axis.
- Returns:
- the log value at origin.
All Packages Class Hierarchy This Package Previous Next Index