All Packages Class Hierarchy This Package Previous Next Index
Class eduni.simdiag.GraphDiagram
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----eduni.simdiag.GraphDiagram
- public class GraphDiagram
- extends Applet
- implements GraphListener, Runnable
This class represents the graph application.
-
GraphDiagram()
- Constructs a graph which runs in its own thread.
-
addGraphListener(GraphListener)
- Adds a graph listener to the output.
-
clear()
- Clears the graph
-
data(String, double, double)
- Adds a data element
-
display()
- Displays the graph
-
forwardGraph(GraphEventObject)
- Sends graph events to any listeners
-
get_diag()
- Returns the panel associated with this graph
-
handleGraph(GraphEventObject)
- Deals with incoming graph events
-
init()
- Sets up graph diagram display
-
main(String[])
- Constructs an example using the graph, by connecting a
GraphEqn object to its input to display sine waves.
-
removeGraphListener(GraphListener)
- Removes a graph listener from the output.
-
run()
- Draws graph
-
setAxes(String, String)
- Sets the axes labels
-
setScale(double, double, double, double)
- Sets the scale
GraphDiagram
public GraphDiagram()
- Constructs a graph which runs in its own thread.
run
public void run()
- Draws graph
addGraphListener
public synchronized void addGraphListener(GraphListener l)
- Adds a graph listener to the output.
removeGraphListener
public synchronized void removeGraphListener(GraphListener l)
- Removes a graph listener from the output.
handleGraph
public void handleGraph(GraphEventObject e)
- Deals with incoming graph events
forwardGraph
public void forwardGraph(GraphEventObject e)
- Sends graph events to any listeners
init
public void init()
- Sets up graph diagram display
- Overrides:
- init in class Applet
get_diag
public GraphPanel get_diag()
- Returns the panel associated with this graph
clear
public void clear()
- Clears the graph
setAxes
public void setAxes(String xax,
String yax)
- Sets the axes labels
setScale
public void setScale(double xmin,
double xmax,
double ymin,
double ymax)
- Sets the scale
data
public void data(String linename,
double x,
double y)
- Adds a data element
display
public void display()
- Displays the graph
main
public static void main(String args[])
- Constructs an example using the graph, by connecting a
GraphEqn object to its input to display sine waves.
All Packages Class Hierarchy This Package Previous Next Index