All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.awt.Component | +----java.awt.Container | +----java.awt.Panel | +----ptplot.PlotBox | +----ptplot.Plot | +----ptplot.PlotLive
This class is abstract, so it must be used by creating a derived
class. To use it, create a derived class with init()
and addPoints()
methods. The init()
method can call methods in the Plot
or
PlotBox
classes (both of which are base classes) to
set the static properties of the graph, such as the title, axis
ranges, and axis labels. 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.
The init()
method must call
super.init()
somewhere in its body; along with general
initialization, this reads a file given by a URL if the dataurl
applet parameter is specified. Thus, the initial configuration can
be specified in a separate file rather than in Java code.
enable()
and disable
.
enable()
or disable()
methods has
been called most recently, to determine whether to patiently
wait or to call the addPoints()
method.
public PlotLive()
public boolean action(Event evt, Object arg)
public abstract synchronized void addPoints()
public void makeButtons()
enable()
and disable
. Alternatively,
a derived class might invoke these directly and dispense with
the buttons. This should be called within the
init()
method in derived classes.
public void run()
enable()
or disable()
methods has
been called most recently, to determine whether to patiently
wait or to call the addPoints()
method. Between
calls to addPoints()
, it calls
Thread.yield()
so that the thread does not hog all
the resources. This somewhat slows down execution, so derived
classes may wish to plot quite a few points in their
addPoints()
method, if possible. However,
plotting more points at once may also decrease the
responsiveness of the user interface.
public void setPlotting(boolean plotting)
public void start()
public void stop()
All Packages Class Hierarchy This Package Previous Next Index