?? graph.dataset.html
字號:
<!--NewPage--><html><head><!-- Generated by javadoc on Wed Oct 23 13:30:49 EST 1996 --><a name="_top_"></a><title> Class graph.DataSet</title></head><body><pre><a href="packages.html">All Packages</a> <a href="tree.html">Class Hierarchy</a> <a href="Package-graph.html">This Package</a> <a href="graph.Contour.html#_top_">Previous</a> <a href="graph.G2Dint.html#_top_">Next</a> <a href="AllNames.html">Index</a></pre><hr><h1> Class graph.DataSet</h1><pre><a href="java.lang.Object.html#_top_">java.lang.Object</a> | +----graph.DataSet</pre><hr><dl> <dt> public class <b>DataSet</b> <dt> extends <a href="java.lang.Object.html#_top_">Object</a></dl>This class is designed to hold the data to be plotted. It is to be used in conjunction with the Graph2D class and Axis class for plotting 2D graphs.<dl> <dt> <b>Version:</b> <dd> 1.15, 1996/09/24 05:23:41 <dt> <b>Author:</b> <dd> Leigh Brookshaw</dl><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="#clipping"><b>clipping</b></a> <dd> Boolean to control clipping of the data window. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#data"><b>data</b></a> <dd> The array containing the actual data <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#dxmax"><b>dxmax</b></a> <dd> The data X maximum. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#dxmin"><b>dxmin</b></a> <dd> The data X minimum. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#dymax"><b>dymax</b></a> <dd> The data Y maximum. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#dymin"><b>dymin</b></a> <dd> The data Y minimum. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#g2d"><b>g2d</b></a> <dd> The Graphics canvas that is driving the whole show. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#increment"><b>increment</b></a> <dd> The amount to increment the data array when the append method is being used. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#legend_dx"><b>legend_dx</b></a> <dd> The X data position of the data legend <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#legend_dy"><b>legend_dy</b></a> <dd> The Y data position of the data legend <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#legend_ix"><b>legend_ix</b></a> <dd> The X pixel position of the data legend <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#legend_iy"><b>legend_iy</b></a> <dd> The Y pixel position of the data legend <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#legend_length"><b>legend_length</b></a> <dd> The length of the example line in the data legend. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#legend_text"><b>legend_text</b></a> <dd> The legend text <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#length"><b>length</b></a> <dd> The number of data points stored in the data array <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o "> <a href="#LINE"><b>LINE</b></a> <dd> A constant value flag used to specify that a straight line segment is to join the data points. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#linecolor"><b>linecolor</b></a> <dd> The color of the straight line segments <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#linestyle"><b>linestyle</b></a> <dd> The linestyle to employ when joining the data points with straight line segments. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#marker"><b>marker</b></a> <dd> The index of the marker to use at the data points. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#markercolor"><b>markercolor</b></a> <dd> The marker color <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#markerscale"><b>markerscale</b></a> <dd> The scaling factor for the marker. <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o "> <a href="#NOLINE"><b>NOLINE</b></a> <dd> A constant value flag used to specify no straight line segment is to join the data points <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#stride"><b>stride</b></a> <dd> The stride of the data. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#xaxis"><b>xaxis</b></a> <dd> The Axis object the X data is attached to. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#xmax"><b>xmax</b></a> <dd> The current plottable X maximum of the data. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#xmin"><b>xmin</b></a> <dd> The current plottable X minimum of the data. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#xrange"><b>xrange</b></a> <dd> The X range of the clipped data <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#yaxis"><b>yaxis</b></a> <dd> The Axis object the Y data is attached to. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#ymax"><b>ymax</b></a> <dd> The current plottable Y maximum of the data. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#ymin"><b>ymin</b></a> <dd> The current plottable Y minimum of the data. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#yrange"><b>yrange</b></a> <dd> The Y range of the clipped data</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="#DataSet()"><b>DataSet</b></a>() <dd> Instantiate an empty data set. <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o "> <a href="#DataSet(double[], int)"><b>DataSet</b></a>(double[], int) <dd> Instantiate a DataSet with the parsed data. <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o "> <a href="#DataSet(double[], int, int)"><b>DataSet</b></a>(double[], int, int) <dd> Instantiate a DataSet with the parsed data. <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o "> <a href="#DataSet(int)"><b>DataSet</b></a>(int) <dd> Instantiate an empty data set.</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="#append(double[], int)"><b>append</b></a>(double[], int) <dd> Append data to the data set. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#dataPoints()"><b>dataPoints</b></a>() <dd> Return the number of data points in the DataSet <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#delete(int, int)"><b>delete</b></a>(int, int) <dd> Delete data from the data set (start and end are inclusive). <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#deleteData()"><b>deleteData</b></a>() <dd> Delete all the data from the data set. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#draw_data(java.awt.Graphics, java.awt.Rectangle)"><b>draw_data</b></a>(Graphics, Rectangle) <dd> Draw the straight line segments and/or the markers at thedata points. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#draw_legend(java.awt.Graphics, java.awt.Rectangle)"><b>draw_legend</b></a>(Graphics, Rectangle) <dd> Draw a legend for this data set <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#draw_lines(java.awt.Graphics, java.awt.Rectangle)"><b>draw_lines</b></a>(Graphics, Rectangle) <dd> Draw into the data window the straight line segments joining thedata points. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#draw_markers(java.awt.Graphics, java.awt.Rectangle)"><b>draw_markers</b></a>(Graphics, Rectangle) <dd> Draw the markers. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getClosestPoint(double, double)"><b>getClosestPoint</b></a>(double, double) <dd> Return the data point that is closest to the parsed (x,y) position <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getPoint(int)"><b>getPoint</b></a>(int) <dd> get the data point at the parsed index. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getXmax()"><b>getXmax</b></a>() <dd> return the data X maximum. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getXmin()"><b>getXmin</b></a>() <dd> return the data X minimum. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getYmax()"><b>getYmax</b></a>() <dd> return the data Y maximum. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getYmin()"><b>getYmin</b></a>() <dd> return the data Y minimum. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#inside(double, double)"><b>inside</b></a>(double, double) <dd> Return true if the point (x,y) is inside the allowed data range. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#legend(double, double, java.lang.String)"><b>legend</b></a>(double, double, String) <dd> Define a data legend in the graph window <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#legend(int, int, java.lang.String)"><b>legend</b></a>(int, int, String) <dd> Define a data legend in the graph window <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#legendColor(java.awt.Color)"><b>legendColor</b></a>(Color) <dd> Set the color for the legend text <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#legendFont(java.awt.Font)"><b>legendFont</b></a>(Font) <dd> Set the font to be used in the legend <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#range(int)"><b>range</b></a>(int) <dd> Calculate the range of the data.</dl><a name="variables"></a><h2> <img src="images/variables.gif" width=153 height=38 alt="Variables"></h2><a name="NOLINE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a><b>NOLINE</b><pre> public final static int NOLINE</pre><dl> <dd> A constant value flag used to specify no straight line segment is to join the data points</dl><a name="LINE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a><b>LINE</b><pre> public final static int LINE</pre><dl> <dd> A constant value flag used to specify that a straight line segment is to join the data points.</dl><a name="g2d"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>g2d</b><pre> public <a href="graph.Graph2D.html#_top_">Graph2D</a> g2d</pre><dl> <dd> The Graphics canvas that is driving the whole show. <dl> <dt> <b>See Also:</b> <dd> <a href="graph.Graph2D.html#_top_">Graph2D</a> </dl></dl><a name="linestyle"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>linestyle</b><pre> public int linestyle</pre><dl> <dd> The linestyle to employ when joining the data points with straight line segments. Currently only solid and no line are supported.</dl><a name="linecolor"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>linecolor</b><pre> public <a href="java.awt.Color.html#_top_">Color</a> linecolor</pre><dl> <dd> The color of the straight line segments</dl><a name="marker"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>marker</b><pre> public int marker</pre><dl> <dd> The index of the marker to use at the data points. <dl> <dt> <b>See Also:</b> <dd> <a href="graph.Markers.html#_top_">Markers</a> </dl></dl><a name="markercolor"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>markercolor</b><pre> public <a href="java.awt.Color.html#_top_">Color</a> markercolor</pre><dl> <dd> The marker color</dl><a name="markerscale"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>markerscale</b><pre> public double markerscale</pre><dl> <dd> The scaling factor for the marker. Default value is 1.</dl><a name="xaxis"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>xaxis</b><pre> public <a href="graph.Axis.html#_top_">Axis</a> xaxis</pre><dl> <dd> The Axis object the X data is attached to. From the Axis object the scaling for the data can be derived. <dl> <dt> <b>See Also:</b> <dd> <a href="graph.Axis.html#_top_">Axis</a> </dl></dl><a name="yaxis"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>yaxis</b><pre> public <a href="graph.Axis.html#_top_">Axis</a> yaxis</pre><dl> <dd> The Axis object the Y data is attached to. <dl> <dt> <b>See Also:</b> <dd> <a href="graph.Axis.html#_top_">Axis</a> </dl></dl><a name="xmax"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>xmax</b><pre> public double xmax</pre><dl> <dd> The current plottable X maximum of the data. This can be very different fromtrue data X maximum. The data is clipped when plotted.</dl><a name="xmin"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>xmin</b><pre> public double xmin</pre><dl> <dd> The current plottable X minimum of the data. This can be very different fromtrue data X minimum. The data is clipped when plotted.</dl><a name="ymax"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>ymax</b><pre> public double ymax</pre><dl> <dd> The current plottable Y maximum of the data. This can be very different fromtrue data Y maximum. The data is clipped when plotted.</dl><a name="ymin"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>ymin</b><pre> public double ymin</pre><dl> <dd> The current plottable Y minimum of the data. This can be very different fromtrue data Y minimum. The data is clipped when plotted.</dl><a name="clipping"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>clipping</b><pre> public boolean clipping</pre><dl> <dd> Boolean to control clipping of the data window.Default value is <em>true</em>, clip the data window.</dl><a name="dxmax"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>dxmax</b><pre> protected double dxmax</pre><dl> <dd> The data X maximum. Once the data is loaded this will never change.</dl><a name="dxmin"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>dxmin</b><pre> protected double dxmin</pre><dl> <dd> The data X minimum. Once the data is loaded this will never change.</dl><a name="dymax"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>dymax</b><pre> protected double dymax</pre><dl> <dd> The data Y maximum. Once the data is loaded this will never change.</dl><a name="dymin"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>dymin</b><pre> protected double dymin</pre><dl> <dd> The data Y minimum. Once the data is loaded this will never change.</dl><a name="data"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -