gov.sns.tools.chart
Class WaterfallPlot

java.lang.Object
  |
  +--gov.sns.tools.chart.WaterfallPlot
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class WaterfallPlot
extends java.lang.Object
implements java.awt.event.ActionListener

Display the values in a Table column using JClass. The plot is updated when the table values change, and the new values are displayed above the older ones. The values are displayed in a color rendition. This keeps happening until there is no more room in the frame at which point the oldest data (at the bottom) is discarded. The plot is a called waterfall plot.


Field Summary
protected  com.klg.jclass.chart3d.JCChart3d _chart3d
          A JClass Chart object to build this plot with
protected  Table3DPlotSource pds
          the data source for the waterfall plot
 boolean useZAutoScale
          Flag for using Z autoScale
protected  double zMaxPlot
          The maximum z value for contours
protected  double zMinPlot
          The minimum z value for contours
 
Constructor Summary
WaterfallPlot(java.lang.String name, double[] xg, javax.swing.JTable theTable, int col, java.awt.Component comp)
          the constructor for the waterfall plot
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Listener for the plot button click
 void createPlot()
          Sets up the water fall plot.
 int getBufferLength()
          get the buffer length of time points
 int getShiftRate()
          Get the number of time slices to wait per plot refresh
 java.lang.Double getZMax()
          Get the max.
 java.lang.Double getZMin()
          Get the min.
 boolean isShowing()
          returns whether this plot has been clicked for creation
 void setBufferLength(int len)
          set the shift rate of the rows.
 void setContours()
          Set the plot contour levels using internal zMaxPlot + zMinPlot
 void setContours(double[] levels)
          Set the plot contour levels
 void setShiftRate(int sr)
          Set the plot shift rate.
 void setZAutoScale(boolean tf)
          set to use autoScale to calculate contour levels
 void setZMax(double val)
          Set the max.
 void setZMin(double val)
          Set the min.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_chart3d

protected com.klg.jclass.chart3d.JCChart3d _chart3d
A JClass Chart object to build this plot with


pds

protected Table3DPlotSource pds
the data source for the waterfall plot


zMaxPlot

protected double zMaxPlot
The maximum z value for contours


zMinPlot

protected double zMinPlot
The minimum z value for contours


useZAutoScale

public boolean useZAutoScale
Flag for using Z autoScale

Constructor Detail

WaterfallPlot

public WaterfallPlot(java.lang.String name,
                     double[] xg,
                     javax.swing.JTable theTable,
                     int col,
                     java.awt.Component comp)
the constructor for the waterfall plot

Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Listener for the plot button click

Specified by:
actionPerformed in interface java.awt.event.ActionListener

createPlot

public void createPlot()
Sets up the water fall plot.


isShowing

public boolean isShowing()
returns whether this plot has been clicked for creation


setContours

public void setContours(double[] levels)
Set the plot contour levels


setZAutoScale

public void setZAutoScale(boolean tf)
set to use autoScale to calculate contour levels


setContours

public void setContours()
Set the plot contour levels using internal zMaxPlot + zMinPlot


setZMax

public void setZMax(double val)
Set the max. Z scale value for the plot contour levels


setZMin

public void setZMin(double val)
Set the min. Z scale value for the plot contour levels


getZMax

public java.lang.Double getZMax()
Get the max. Z scale value for the plot contour levels


getZMin

public java.lang.Double getZMin()
Get the min. Z scale value for the plot contour levels


setBufferLength

public void setBufferLength(int len)
set the shift rate of the rows. This is how many time slices /** set the buffer length of time points

Parameters:
len - = the number of time points to use

getBufferLength

public int getBufferLength()
get the buffer length of time points


setShiftRate

public void setShiftRate(int sr)
Set the plot shift rate.

Parameters:
sr - = the number of time slices to wait per plot refresh

getShiftRate

public int getShiftRate()
Get the number of time slices to wait per plot refresh