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.


Constructor Index

 o GraphDiagram()
Constructs a graph which runs in its own thread.

Method Index

 o addGraphListener(GraphListener)
Adds a graph listener to the output.
 o clear()
Clears the graph
 o data(String, double, double)
Adds a data element
 o display()
Displays the graph
 o forwardGraph(GraphEventObject)
Sends graph events to any listeners
 o get_diag()
Returns the panel associated with this graph
 o handleGraph(GraphEventObject)
Deals with incoming graph events
 o init()
Sets up graph diagram display
 o main(String[])
Constructs an example using the graph, by connecting a GraphEqn object to its input to display sine waves.
 o removeGraphListener(GraphListener)
Removes a graph listener from the output.
 o run()
Draws graph
 o setAxes(String, String)
Sets the axes labels
 o setScale(double, double, double, double)
Sets the scale

Constructors

 o GraphDiagram
 public GraphDiagram()
Constructs a graph which runs in its own thread.

Methods

 o run
 public void run()
Draws graph

 o addGraphListener
 public synchronized void addGraphListener(GraphListener l)
Adds a graph listener to the output.

 o removeGraphListener
 public synchronized void removeGraphListener(GraphListener l)
Removes a graph listener from the output.

 o handleGraph
 public void handleGraph(GraphEventObject e)
Deals with incoming graph events

 o forwardGraph
 public void forwardGraph(GraphEventObject e)
Sends graph events to any listeners

 o init
 public void init()
Sets up graph diagram display

Overrides:
init in class Applet
 o get_diag
 public GraphPanel get_diag()
Returns the panel associated with this graph

 o clear
 public void clear()
Clears the graph

 o setAxes
 public void setAxes(String xax,
                     String yax)
Sets the axes labels

 o setScale
 public void setScale(double xmin,
                      double xmax,
                      double ymin,
                      double ymax)
Sets the scale

 o data
 public void data(String linename,
                  double x,
                  double y)
Adds a data element

 o display
 public void display()
Displays the graph

 o 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