gov.sns.tools.chart
Class WaterfallPlotPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--gov.sns.tools.chart.WaterfallPlotPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class WaterfallPlotPanel
extends javax.swing.JPanel
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. This version is mounted on a JPanel.

See Also:
Serialized Form

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
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
WaterfallPlotPanel(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 closePlot(java.awt.event.WindowEvent evt)
           
 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.
 void startPlot()
          Method for starting the plot
 void stopPlot()
          Method for stopping the plot
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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

WaterfallPlotPanel

public WaterfallPlotPanel(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.


startPlot

public void startPlot()
Method for starting the plot


stopPlot

public void stopPlot()
Method for stopping the plot


isShowing

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

Overrides:
isShowing in class java.awt.Component

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


closePlot

public void closePlot(java.awt.event.WindowEvent evt)