All Packages Class Hierarchy This Package Previous Next Index
Class crw.data2.WaveformGraphSet
java.lang.Object
|
+----crw.data2.GraphSet
|
+----crw.data2.GridedGraphSet
|
+----crw.data2.WaveformGraphSet
- public class WaveformGraphSet
- extends GridedGraphSet
Moving Waveform(s) are plotted ona (grided) axes area.
There are two options in choosing the axes coordinates.
1. A smaller area in a separate image buffer. The coordinates
are wrt this double buffer image. 2. The entire working area of
the screen or a larger area that includes drawings that are
in addition to the the graph plots. In the case-2, the double
buffer image should include the other drawing area as well, or
the double buffering need be handled separately from this class,
by directly calling the drawAxes(Graphics) and drawData(Graphics) methods.
User must be very careful
to provide the proper coordinates of Axis2 begin, end, and location .
- Version:
- 1.0
- Author:
- C.Wie
-
WaveformGraphSet()
-
-
drawData(Graphics)
- Draw the waveform data.
-
getTimeBase()
- Returns the XTimeBase object of the Waveform.
-
getWaveform()
- Returns the Waveform object.
-
initWaveform(int, int)
- Initializes the Waveform object with the x-offset of the
wave train at the default value which is the y-axis
position.
-
initWaveform(int, int, int)
- Initializes the Waveform object.
-
initWaveform(XTimeBase, int)
- Initializes the Waveform object to use the shared time base.
-
pushData(double, double)
- Advances by one time step.
-
pushData(double, double[])
- Advance the waveform by one time step.
-
putData(double)
- Puts y-data for a single wave in this graph set.
-
putData(double[])
- Puts the y-data in the next index (corresponding to
the next time step) without advancing the
XTimeBase.
-
setXOffset(int)
- Sets the x-offset of the waveform.
-
setYOffset()
- Sets the y-offset to the default value which is
the x-axis location.
-
setYOffset(int)
- Sets the y-offset of the waveform plot.
WaveformGraphSet
public WaveformGraphSet()
initWaveform
public void initWaveform(int arrayLength,
int noWaves)
- Initializes the Waveform object with the x-offset of the
wave train at the default value which is the y-axis
position.
Waveform's y-offset is also set to the default value
which is the position of x-axis.
- Parameters:
- arrayLength - the array length of a wave train.
- noWaves - number of waves in this graphset.
initWaveform
public void initWaveform(int arrayLength,
int xoffset,
int noWaves)
- Initializes the Waveform object.
Waveform's y-offset is also set to the default value
which is the position of x-axis.
- Parameters:
- arrayLength - the array length of a wave train.
- xoffset - the offset position of wave train.
- noWaves - number of waves in this graphset.
initWaveform
public void initWaveform(XTimeBase timebase,
int noWaves)
- Initializes the Waveform object to use the shared time base.
Waveform's y-offset is also set to the default value
which is the position of x-axis.
- Parameters:
- timebase - the shared time base with another GraphSet obj.
- noWaves - number of waves in this graphset.
setXOffset
public void setXOffset(int x0)
- Sets the x-offset of the waveform. Default is
the y-axis location.
- Parameters:
- x0 - the new x-offset.
setYOffset
public void setYOffset(int y0)
- Sets the y-offset of the waveform plot. Default is
the x-axis location.
- Parameters:
- y0 - the new y-offset.
setYOffset
public void setYOffset()
- Sets the y-offset to the default value which is
the x-axis location.
- Parameters:
- y0 - the new y-offset.
drawData
public void drawData(Graphics g)
- Draw the waveform data.
- Overrides:
- drawData in class GraphSet
pushData
public void pushData(double dt,
double y[])
- Advance the waveform by one time step.
pushData
public void pushData(double dt,
double y)
- Advances by one time step.
to be used only if there is a single waveform data.
putData
public void putData(double y[])
- Puts the y-data in the next index (corresponding to
the next time step) without advancing the
XTimeBase. This is necessary when several
WaveformGraphSet objects share the same time base where
only one needs to advance the time step.
putData
public void putData(double y)
- Puts y-data for a single wave in this graph set.
This method is used when the WaveformGraphSet obj
has only one waveform, not an array of them.
getWaveform
public Waveform getWaveform()
- Returns the Waveform object.
getTimeBase
public XTimeBase getTimeBase()
- Returns the XTimeBase object of the Waveform.
All Packages Class Hierarchy This Package Previous Next Index