COSC-4P82-Final-Project/lib/lilgp/lilgpMonitor/javadocs/Graph.html

271 lines
9.5 KiB
HTML

<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Sat May 10 12:23:02 1997 -->
<a name="_top_"></a>
<title>
Class Graph
</title>
</head>
<body>
<h1>
Class Graph
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
|
+----<a href="java.awt.Component.html#_top_">java.awt.Component</a>
|
+----<a href="java.awt.Canvas.html#_top_">java.awt.Canvas</a>
|
+----Graph
</pre>
<hr>
<dl>
<dt> public class <b>Graph</b>
<dt> extends <a href="java.awt.Canvas.html#_top_">Canvas</a>
</dl>
This class is responsible for drawing and refreshing
the graph.
<hr>
<a name="index"></a>
<h2>
<img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
<dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#graphHeight"><b>graphHeight</b></a>
<dd>
<dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#graphWidth"><b>graphWidth</b></a>
<dd>
</dl>
<h2>
<img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
<dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#Graph()"><b>Graph</b></a>()
<dd> The constructor method creates storage for data for each
of the curves, initializes some variables, and resizes the
graph.
</dl>
<h2>
<img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#backgroundPaint(java.awt.Graphics)"><b>backgroundPaint</b></a>(Graphics)
<dd> This method is actually in charge of calling each of the drawing
methods.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#clearGraphData()"><b>clearGraphData</b></a>()
<dd> This method deletes the old graph data
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#drawPoint(java.awt.Graphics, int, int)"><b>drawPoint</b></a>(Graphics, int, int)
<dd> This method draws a small diamond at the specified point
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#drawTicks(java.awt.Graphics, java.util.Vector, java.lang.String)"><b>drawTicks</b></a>(Graphics, Vector, String)
<dd> This method draws the y-axis tick marks and labelling them
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#getImage()"><b>getImage</b></a>()
<dd> This method returns the offscreen image for creating the GIF file.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#paint(java.awt.Graphics)"><b>paint</b></a>(Graphics)
<dd> This method attempts to create an off screen image and then calls the
background paint method.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#setGraphData(java.util.Vector, java.util.Vector)"><b>setGraphData</b></a>(Vector, Vector)
<dd> This method assigns new data to the curve vectors
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#setLineStyle(java.lang.String)"><b>setLineStyle</b></a>(String)
<dd> This method is used to update the line style selected
by the user.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#updateScale(java.lang.String)"><b>updateScale</b></a>(String)
<dd> This method is called by external classes to update the scale
selection.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#updateUserScale(java.lang.String, double)"><b>updateUserScale</b></a>(String, double)
<dd> This method allows external classes to update the manual
scale mechanisms.
</dl>
<a name="variables"></a>
<h2>
<img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="graphWidth"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>graphWidth</b>
<pre>
public final int graphWidth
</pre>
<a name="graphHeight"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>graphHeight</b>
<pre>
public final int graphHeight
</pre>
<a name="constructors"></a>
<h2>
<img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="Graph"></a>
<a name="Graph()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Graph</b>
<pre>
public Graph()
</pre>
<dl>
<dd> The constructor method creates storage for data for each
of the curves, initializes some variables, and resizes the
graph.
</dl>
<a name="methods"></a>
<h2>
<img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="updateScale(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="updateScale"><b>updateScale</b></a>
<pre>
public void updateScale(<a href="java.lang.String.html#_top_">String</a> s)
</pre>
<dl>
<dd> This method is called by external classes to update the scale
selection.
<dl>
<dt> <b>Parameters:</b>
<dd> s - string parameter containing either RED, BLUE, or INDEPENDENT
<dt> <b>See Also:</b>
<dd> <a href="lilgpMonitor.html#_top_">lilgpMonitor</a>
</dl>
</dl>
<a name="updateUserScale(java.lang.String, double)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="updateUserScale"><b>updateUserScale</b></a>
<pre>
public void updateUserScale(<a href="java.lang.String.html#_top_">String</a> which,
double s)
</pre>
<dl>
<dd> This method allows external classes to update the manual
scale mechanisms.
<dl>
<dt> <b>Parameters:</b>
<dd> which - is used to determine which scale to adjust either RED or BLUE
<dd> s - is the scale value
<dt> <b>See Also:</b>
<dd> <a href="lilgpMonitor.html#_top_">lilgpMonitor</a>
</dl>
</dl>
<a name="clearGraphData()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="clearGraphData"><b>clearGraphData</b></a>
<pre>
public void clearGraphData()
</pre>
<dl>
<dd> This method deletes the old graph data
</dl>
<a name="setGraphData(java.util.Vector, java.util.Vector)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setGraphData"><b>setGraphData</b></a>
<pre>
public void setGraphData(<a href="java.util.Vector.html#_top_">Vector</a> metricOne,
<a href="java.util.Vector.html#_top_">Vector</a> metricTwo)
</pre>
<dl>
<dd> This method assigns new data to the curve vectors
<dl>
<dt> <b>Parameters:</b>
<dd> metricOne - specifies the data for the red curve
<dd> metricTwo - specifies the data for the blue curve
</dl>
</dl>
<a name="setLineStyle(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setLineStyle"><b>setLineStyle</b></a>
<pre>
public void setLineStyle(<a href="java.lang.String.html#_top_">String</a> style)
</pre>
<dl>
<dd> This method is used to update the line style selected
by the user.
<dl>
<dt> <b>Parameters:</b>
<dd> style - specifes the line style, either LINES or LINESPOINTS
</dl>
</dl>
<a name="drawTicks(java.awt.Graphics, java.util.Vector, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="drawTicks"><b>drawTicks</b></a>
<pre>
public void drawTicks(<a href="java.awt.Graphics.html#_top_">Graphics</a> g,
<a href="java.util.Vector.html#_top_">Vector</a> theData,
<a href="java.lang.String.html#_top_">String</a> anchor)
</pre>
<dl>
<dd> This method draws the y-axis tick marks and labelling them
<dl>
<dt> <b>Parameters:</b>
<dd> g - the graphics context
<dd> theData - current curve data
<dd> anchor - specifies which axis to draw the ticks on, either EAST or WEST
</dl>
</dl>
<a name="drawPoint(java.awt.Graphics, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="drawPoint"><b>drawPoint</b></a>
<pre>
public void drawPoint(<a href="java.awt.Graphics.html#_top_">Graphics</a> g,
int x,
int y)
</pre>
<dl>
<dd> This method draws a small diamond at the specified point
<dl>
<dt> <b>Parameters:</b>
<dd> g - the graphics context
<dd> x - the x coordinate of the data point
<dd> y - the y coordinate of the data point
</dl>
</dl>
<a name="backgroundPaint(java.awt.Graphics)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="backgroundPaint"><b>backgroundPaint</b></a>
<pre>
public void backgroundPaint(<a href="java.awt.Graphics.html#_top_">Graphics</a> g)
</pre>
<dl>
<dd> This method is actually in charge of calling each of the drawing
methods.
<dl>
<dt> <b>Parameters:</b>
<dd> g - the graphics context
</dl>
</dl>
<a name="paint(java.awt.Graphics)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="paint"><b>paint</b></a>
<pre>
public void paint(<a href="java.awt.Graphics.html#_top_">Graphics</a> g)
</pre>
<dl>
<dd> This method attempts to create an off screen image and then calls the
background paint method. If it fails, then it simply paints on the
visible graphics context.
<dl>
<dt> <b>Parameters:</b>
<dd> g - the graphics context
<dt> <b>Overrides:</b>
<dd> <a href="java.awt.Canvas.html#paint(java.awt.Graphics)">paint</a> in class <a href="java.awt.Canvas.html#_top_">Canvas</a>
</dl>
</dl>
<a name="getImage()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getImage"><b>getImage</b></a>
<pre>
public <a href="java.awt.Image.html#_top_">Image</a> getImage()
</pre>
<dl>
<dd> This method returns the offscreen image for creating the GIF file.
</dl>
</body>
</html>