|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--ptolemy.plot.PlotBox | +--ptolemy.plot.Plot | +--ptolemy.plot.PlotLive
Plot signals dynamically, where points can be added at any time and the display will be updated. This should be normally used with some finite persistence so that old points are erased as new points are added. Unfortunately, the most efficient way to erase old points is to draw graphics using the "exclusive or" mode, which introduces quite a number of artifacts. When lines are drawn between points, where they overlap the points the line becomes white. Moreover, if two lines or points overlap completely, they disappear.
This class is abstract, so it must be used by creating a derived class. To use it, create a derived class with an addPoints() method. Your class may also set graph parameters like titles and axis labels in the constructor by calling methods in the Plot or PlotBox classes (both of which are base classes). The addPoints() method should call addPoint() of the Plot base class to dynamically add points to the plot. This method is called within a thread separate from the applet thread, so the zooming mechanism and buttons remain live.
Inner classes inherited from class ptolemy.plot.PlotBox |
PlotBox.DragListener,
PlotBox.ZoomListener |
Fields inherited from class ptolemy.plot.Plot |
_currentdataset,
_marks,
_painted,
_points |
Fields inherited from class ptolemy.plot.PlotBox |
_background,
_bottomPadding,
_colors,
_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 |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
PlotLive()
|
Method Summary | |
abstract void |
addPoints()
Redefine in derived classes to add points to the plot. |
void |
makeButtons()
Deprecated. |
void |
pause()
Pause the plot. |
void |
run()
This is the body of a thread that repeatedly calls addPoints() if the plot is active. |
void |
setButtons(boolean visible)
If the argument is true, make a start, stop, and fill button visible at the upper right. |
void |
start()
Make the plot active. |
void |
stop()
Stop the plot. |
Methods inherited from class ptolemy.plot.Plot |
_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 ptolemy.plot.PlotBox |
_help,
_setButtonsVisibility,
addXTick,
addYTick,
export,
getColor,
getColorByName,
getDataurl,
getDocumentBase,
getGrid,
getLegend,
getMinimumSize,
getPreferredSize,
getTitle,
getXLabel,
getXLog,
getXRange,
getXTicks,
getYLabel,
getYLog,
getYRange,
getYTicks,
init,
paint,
parseFile,
read,
setBackground,
setBounds,
setColor,
setDataurl,
setDocumentBase,
setForeground,
setGrid,
setLabelFont,
setSize,
setTitle,
setTitleFont,
setWrap,
setXLabel,
setXLog,
setXRange,
setYLabel,
setYLog,
setYRange,
update,
write,
write,
writeOldSyntax,
zoom |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getInsets,
getLayout,
getMaximumSize,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
paramString,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
removeNotify,
setCursor,
setFont,
setLayout,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
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,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBounds,
setComponentOrientation,
setDropTarget,
setEnabled,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public PlotLive()
Method Detail |
public abstract void addPoints()
public void makeButtons()
public void pause()
public void run()
public void setButtons(boolean visible)
public void start()
public void stop()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |