|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--SSF.Util.Plot.TimeSeriesComponent
Provides a programmatic API to the SSF.Util.Plot package.
An AWT Container that holds the plot panels and provides an API to
the plots. See constructors for more details.
$Id: TimeSeriesComponent.java,v 1.5 2003/02/13 19:34:00 mili Exp $
| Nested Class Summary |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
LivePlotter[] |
_plots
Plot panels within the window |
boolean |
smallPlots
Flag if we're doing many small plots in the 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 | |
TimeSeriesComponent(int numDatasets,
int winYsize)
Constructor common for this class and subclasses. |
|
TimeSeriesComponent(int numDatasets,
java.lang.String windowTitle,
int winYsize)
Constructs a component object with an encapsulating window (Frame). |
|
| Method Summary | |
void |
addAllPoints(java.lang.Object[][] dataArray)
Add all points for "static" plot. |
void |
addLegend(int dataSet,
java.lang.String legend)
Adds a legend to one of the plots. |
void |
addPoint(int plotIndex,
double time,
float value)
Adds one data point to one of the plots. |
void |
addPoints(java.lang.Object[][] dataArray)
Adds one round of data points to all plots for a "live" plot. |
void |
continueAll()
Continues all plots. |
void |
exportAll(java.io.FileOutputStream fout)
Exports all plots in EPS format. |
void |
fillAll()
Fills all plots. |
TimeSeriesWindowCallback |
getCallbackWindow()
Gets the handle to the parent window/application. |
LivePlotter |
getPlot(int index)
Gets handle on a plot. |
boolean |
isCallbackImplemented(java.lang.Object win)
Checks if callback interface is implemented. |
protected void |
plotLayout(int plotHeights)
Layout plot panels in the container. |
void |
printAll(java.awt.Graphics printgraphics)
Prints all plots. |
void |
resetAll()
Resets all plots. |
void |
rezoom(double lowx,
double highx,
java.lang.Object caller)
Called from from one plot when it is rescaled (zoomed) to rescale (rezoom) all other plots to the same time-scale. |
void |
setBinSize(float binSize)
Sets time bin size of all plots. |
void |
setCallbackWindow(java.lang.Object win)
Sets a handle to the window to the parent window/application for callbacks. |
void |
setRescaleStep(int rescaleStep)
Sets number of steps before rescaling for all plots. |
void |
setTimeWindowSize(float winSize)
Sets time window size of all plots for a moving window plot. |
void |
setTitle(java.lang.String title)
Sets title of plot. |
void |
signalEndOfPlot()
Signals to the parent that the plot has finished. |
void |
signalPlotWindowClosed()
Signals to the plotting component that its window has been closed (deallocated). |
void |
startAll()
Starts all plots. |
void |
stopAll()
Stops all plots. |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, getAccessibleContext, 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, 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, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, 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 smallPlots
public LivePlotter[] _plots
| Constructor Detail |
public TimeSeriesComponent(int numDatasets,
int winYsize)
LivePlotters and then calls
plotLayout to display them.
numDatasets - Number of plots, i.e. plot panels.winYsize - Total component Y size (pixels). Can be set
to 0 to get a default.
public TimeSeriesComponent(int numDatasets,
java.lang.String windowTitle,
int winYsize)
throws java.lang.Exception
numDatasets - Number of plots, i.e. plot panels.windowTitle - Window title text.winYsize - Total component Y size (pixels). Can be set
to 0 to get a default.| Method Detail |
public void setCallbackWindow(java.lang.Object win)
win - Parent window.public TimeSeriesWindowCallback getCallbackWindow()
public void setTitle(java.lang.String title)
title - Plot title text.public void setBinSize(float binSize)
binSize - Time-bin width in x-scale units.public void setTimeWindowSize(float winSize)
winSize - Moving window size in x-scale units.public void setRescaleStep(int rescaleStep)
rescaleStep - Number of points plotted before rescaling.public LivePlotter getPlot(int index)
index - Index of plot, from 0.
public void addPoint(int plotIndex,
double time,
float value)
plotIndex - Index of plot panel, starting from 0.time - x coordinate.value - y coordinate.public void addPoints(java.lang.Object[][] dataArray)
addPoint
or addAllPoints methods instead.
dataArray - Data to be plotted.public void addAllPoints(java.lang.Object[][] dataArray)
dataArray - Data to be plotted. One row for each plot and
one column for each data point.public void resetAll()
public void startAll()
public void stopAll()
public void continueAll()
public void fillAll()
public void printAll(java.awt.Graphics printgraphics)
printAll in class java.awt.Componentpublic void exportAll(java.io.FileOutputStream fout)
public void signalPlotWindowClosed()
public void rezoom(double lowx,
double highx,
java.lang.Object caller)
lowx - Left x in x-axis units.highx - Right x in x-axis units.caller - Reference to calling plot (if plot) or other object.
public void addLegend(int dataSet,
java.lang.String legend)
dataSet - Index to plot, from 0.public void signalEndOfPlot()
public boolean isCallbackImplemented(java.lang.Object win)
win - Perform check on this GUI object. Presumably a parent
window.
win implements the callback interface,
otherwise false.protected void plotLayout(int plotHeights)
plotHeights - Height of each plot in pixels. Set to 0 for
default.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||