Class LivePlotter

All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer,

public class LivePlotter
extends MultiPlot

Does a "live" plot of the data file.
One LivePlotter is created per dataset, i.e. one per "graph" in a multiplot window. $Id:,v 1.9 2003/02/13 19:32:00 mili Exp $

See Also:
Serialized Form

Nested Class Summary
Nested classes inherited from class SSF.Util.Plot.MultiPlotBox
MultiPlotBox.DragListener, MultiPlotBox.ZoomListener
Nested classes inherited from class java.awt.Panel
Nested classes inherited from class java.awt.Container
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
protected  float _binSize
          Time bin size.
protected  boolean _firstLoop
          True if first time plotting points.
protected  TimeSeriesComponent _ownerAppl
          Ref to owning application window if there is one.
protected  int _plotIndex
          Current plot point.
protected  double _savedXrangeHigh
          Saved values of plot range.
protected  double _savedXrangeLow
          Saved values of plot range.
 boolean barGraph
          Plot type, default: bar-graph, false = line-graph
Fields inherited from class SSF.Util.Plot.MultiPlot
_currentdataset, _marks, _painted, _points
Fields inherited from class SSF.Util.Plot.MultiPlotBox
_background, _bottomPadding, _colors, _disableTitle, _disableXscale, _documentBase, _foreground, _grid, _height, _leftPadding, _LOG10SCALE, _lrx, _lry, _PADDING, _rangesGivenByZooming, _rightPadding, _topPadding, _ulx, _uly, _usecolor, _width, _wrap, _xBottom, _xhighgiven, _xlog, _xlowgiven, _xMax, _xMin, _xRangeGiven, _xscale, _xTop, _yBottom, _yhighgiven, _ylog, _ylowgiven, _yMax, _yMin, _yRangeGiven, _yscale, _yTop
Fields inherited from class java.awt.Component
Fields inherited from interface java.awt.image.ImageObserver
Constructor Summary
          Minimal constructor
Method Summary
 void addAllPoints(java.lang.Object[][] dataArray, int index)
          Add all points for static plot.
 void addPoint(java.lang.Object[][] dataArray, int index)
          Add one point to plot from the given data array, and given data row index.
 void addSinglePoint(double time, float value)
          Add a single data point to plot.
 void continuePlot()
          Continue this live plot.
 void resetPlot()
          Restart live plot from beginning.
 void setBinSize(float binSize)
          Set bin size.
 void setDatasetName(java.lang.String datasetName)
          Set dataset name for this plot panel.
 void setFieldSelectorName(java.lang.String fieldSelectorName)
          Set dataset name for this plot panel.
 void setOwnerAppl(TimeSeriesComponent ownerAppl)
          Set owner application window.
 void setRescaleStep(int rescaleStep)
          Set number of points to add before rescaling.
 void setTimeWindowSize(float winSize)
          Set time-window size.
 void startPlot()
          Start this live plot.
 void stopPlot()
          Interrupt the this live plot.
Methods inherited from class SSF.Util.Plot.MultiPlot
_checkDatasetIndex, _drawBar, _drawErrorBar, _drawImpulse, _drawLine, _drawPlot, _drawPoint, _parseLine, _write, _writeOldSyntax, addLegend, addPoint, addPointWithErrorBars, clear, clear, erasePoint, fillPlot, getConnected, getImpulses, getMarksStyle, getMaxDataSets, getNumDataSets, parseFile, read, samplePlot, setBars, setBars, setConnected, setConnected, setImpulses, setImpulses, setMarksStyle, setMarksStyle, setNumSets, setPointsPersistence, setReuseDatasets, setSweepsPersistence
Methods inherited from class SSF.Util.Plot.MultiPlotBox
_help, _setButtonsVisibility, addXTick, addYTick, export, fillYPlot, getColor, getColorByName, getDataurl, getDocumentBase, getGrid, getLegend, getMinimumSize, getPreferredSize, getTitle, getXLabel, getXLog, getXRange, getXTicks, getYLabel, getYLog, getYRange, getYTicks, init, paint, parseFile, read, setBackground, setBounds, setButtons, setColor, setDataurl, setDocumentBase, setForeground, setGrid, setLabelFont, setOwner, setSize, setTitle, setTitleFont, setWrap, setXLabel, setXLog, setXRange, setYLabel, setYLog, setYRange, update, write, write, writeOldSyntax, zoom, zoomX
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setVisible, 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


public boolean barGraph
Plot type, default: bar-graph, false = line-graph


protected float _binSize
Time bin size.


protected int _plotIndex
Current plot point.


protected boolean _firstLoop
True if first time plotting points.


protected TimeSeriesComponent _ownerAppl
Ref to owning application window if there is one. Otherwise null.


protected double _savedXrangeLow
Saved values of plot range.


protected double _savedXrangeHigh
Saved values of plot range.

Constructor Detail


public LivePlotter()
Minimal constructor

Method Detail


public void setBinSize(float binSize)
Set bin size.


public void setDatasetName(java.lang.String datasetName)
Set dataset name for this plot panel.


public void setFieldSelectorName(java.lang.String fieldSelectorName)
Set dataset name for this plot panel.


public void setTimeWindowSize(float winSize)
Set time-window size. NOTE: bin size must already have been set.


public void setRescaleStep(int rescaleStep)
Set number of points to add before rescaling.


public void setOwnerAppl(TimeSeriesComponent ownerAppl)
Set owner application window. User for signaling to keep state of menu options consistent with plot state.


public void addPoint(java.lang.Object[][] dataArray,
                     int index)
Add one point to plot from the given data array, and given data row index. The x coordinate for the plot is the binIndex * binSize to give a proper impression for the transitions in the graph, i.e. all state changes during the interval are completed by the end of the interval.


public void addAllPoints(java.lang.Object[][] dataArray,
                         int index)
Add all points for static plot. From given array and given data row index. The x coordinate for the plot is the binIndex * binSize to give a proper impression for the transitions in the graph, i.e. all state changes during the interval are completed by the end of the interval.


public void addSinglePoint(double time,
                           float value)
Add a single data point to plot.


public void startPlot()
Start this live plot.


public void stopPlot()
Interrupt the this live plot.


public void continuePlot()
Continue this live plot.


public void resetPlot()
Restart live plot from beginning.