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

Constructor Index

 o WaveformGraphSet()

Method Index

 o drawData(Graphics)
Draw the waveform data.
 o getTimeBase()
Returns the XTimeBase object of the Waveform.
 o getWaveform()
Returns the Waveform object.
 o 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.
 o initWaveform(int, int, int)
Initializes the Waveform object.
 o initWaveform(XTimeBase, int)
Initializes the Waveform object to use the shared time base.
 o pushData(double, double)
Advances by one time step.
 o pushData(double, double[])
Advance the waveform by one time step.
 o putData(double)
Puts y-data for a single wave in this graph set.
 o putData(double[])
Puts the y-data in the next index (corresponding to the next time step) without advancing the XTimeBase.
 o setXOffset(int)
Sets the x-offset of the waveform.
 o setYOffset()
Sets the y-offset to the default value which is the x-axis location.
 o setYOffset(int)
Sets the y-offset of the waveform plot.

Constructors

 o WaveformGraphSet
 public WaveformGraphSet()

Methods

 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o setYOffset
 public void setYOffset()
Sets the y-offset to the default value which is the x-axis location.

Parameters:
y0 - the new y-offset.
 o drawData
 public void drawData(Graphics g)
Draw the waveform data.

Overrides:
drawData in class GraphSet
 o pushData
 public void pushData(double dt,
                      double y[])
Advance the waveform by one time step.

 o pushData
 public void pushData(double dt,
                      double y)
Advances by one time step. to be used only if there is a single waveform data.

 o 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.

 o 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.

 o getWaveform
 public Waveform getWaveform()
Returns the Waveform object.

 o getTimeBase
 public XTimeBase getTimeBase()
Returns the XTimeBase object of the Waveform.


All Packages  Class Hierarchy  This Package  Previous  Next  Index