?? graph.axis.html
字號:
<!--NewPage--><html><head><!-- Generated by javadoc on Wed Oct 23 13:30:49 EST 1996 --><a name="_top_"></a><title> Class graph.Axis</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="Package-graph.html">Previous</a> <a href="graph.BuildGraph.html#_top_">Next</a> <a href="AllNames.html">Index</a></pre><hr><h1> Class graph.Axis</h1><pre><a href="java.lang.Object.html#_top_">java.lang.Object</a> | +----graph.Axis</pre><hr><dl> <dt> public class <b>Axis</b> <dt> extends <a href="java.lang.Object.html#_top_">Object</a></dl>This class controls the look and feel of axes. It is designed to be used in conjunction with the Graph2D class and DataSet class for plotting 2D graphs.To work with the other classes a system of registration is used.The axes have to be attached to the controlling Graph2D classand the DataSet's have to be attached to both the Graph2D classand the Axis class.This way the 3 main classes Graph2D, Axis and DataSet know of eachothers existence.This does not mean the classes cannot be used independently, they canbut in this mode nothing is automated, the user must code everythingmanually<dl> <dt> <b>Version:</b> <dd> 1.12, 1996/09/12 03:27:07. <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="#amax"><b>amax</b></a> <dd> The position in pixels of the maximum point of the axis line <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#amin"><b>amin</b></a> <dd> The position in pixels of the minimum point of the axis line <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#axiscolor"><b>axiscolor</b></a> <dd> Color of the Axis. <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o "> <a href="#BOTTOM"><b>BOTTOM</b></a> <dd> Constant flagging Axis position on the graph. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#data_window"><b>data_window</b></a> <dd> Before the Axis can be positioned correctly and drawn the data windowneeds to be calculated and passed to the Axis. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#dataset"><b>dataset</b></a> <dd> Vector containing a list of attached DataSets <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#drawgrid"><b>drawgrid</b></a> <dd> If <i>true</i> draw a grid positioned on major ticks over the graph <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#drawzero"><b>drawzero</b></a> <dd> If <i>true</i> draw a line positioned on the Zero label tick mark. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#exponent"><b>exponent</b></a> <dd> Textline class to hold the label's exponent (if it has one). <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#force_end_labels"><b>force_end_labels</b></a> <dd> Rescale the axis so that labels fall at the end of the Axis. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#g2d"><b>g2d</b></a> <dd> The graph canvas this axis is attached to (if it is attached to any) <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#gridcolor"><b>gridcolor</b></a> <dd> Color of the grid <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#guess_label_number"><b>guess_label_number</b></a> <dd> Initial guess for the number of labels required <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#label"><b>label</b></a> <dd> Textline class to hold the labels before printing. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#label_count"><b>label_count</b></a> <dd> The number of labels required <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#label_exponent"><b>label_exponent</b></a> <dd> The label exponent <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#label_start"><b>label_start</b></a> <dd> The starting value of the labels <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#label_step"><b>label_step</b></a> <dd> The increment between labels <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#label_string"><b>label_string</b></a> <dd> String to contain the labels. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#label_value"><b>label_value</b></a> <dd> The actual values of the axis labels <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o "> <a href="#LEFT"><b>LEFT</b></a> <dd> Constant flagging Axis position on the graph. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#major_tic_size"><b>major_tic_size</b></a> <dd> Size in pixels of the major tick marks <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#manualRange"><b>manualRange</b></a> <dd> If true the axis range must be manually set by setting theAxis.minimum and Axis.maximum variables. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#max_label_width"><b>max_label_width</b></a> <dd> The width of the maximum label. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#maximum"><b>maximum</b></a> <dd> Maximum data value of the axis. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#minimum"><b>minimum</b></a> <dd> Minimum data value of the axis. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#minor_tic_count"><b>minor_tic_count</b></a> <dd> Number of minor tick marks between major tick marks <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#minor_tic_size"><b>minor_tic_size</b></a> <dd> Size in pixels of the minor tick marks <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#orientation"><b>orientation</b></a> <dd> The orientation of the axis. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#position"><b>position</b></a> <dd> The position of the axis. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#redraw"><b>redraw</b></a> <dd> Default value <i>true</i>. <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o "> <a href="#RIGHT"><b>RIGHT</b></a> <dd> Constant flagging Axis position on the graph. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#title"><b>title</b></a> <dd> Textline class to contain the title of the axis. <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o "> <a href="#TOP"><b>TOP</b></a> <dd> Constant flagging Axis position on the graph. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#width"><b>width</b></a> <dd> The width of the Axis. <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o "> <a href="#zerocolor"><b>zerocolor</b></a> <dd> Color of the line at the Zero label</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="#Axis()"><b>Axis</b></a>() <dd> Instantiate the class. <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o "> <a href="#Axis(int)"><b>Axis</b></a>(int) <dd> Instantiate the class.</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="#attachDataSet(graph.DataSet)"><b>attachDataSet</b></a>(DataSet) <dd> Attach a DataSet for the Axis to manage. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#attachXdata(graph.DataSet)"><b>attachXdata</b></a>(DataSet) <dd> Attach a DataSet to a Horizontal Axis <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#attachYdata(graph.DataSet)"><b>attachYdata</b></a>(DataSet) <dd> Attach a DataSet to a Vertical Axis <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#calculateGridLabels()"><b>calculateGridLabels</b></a>() <dd> calculate the labels <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#detachAll()"><b>detachAll</b></a>() <dd> Detach All attached dataSets. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#detachDataSet(graph.DataSet)"><b>detachDataSet</b></a>(DataSet) <dd> Detach an attached DataSet <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#drawAxis(java.awt.Graphics)"><b>drawAxis</b></a>(Graphics) <dd> Draw the axis using the passed Graphics context. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#drawHAxis(java.awt.Graphics)"><b>drawHAxis</b></a>(Graphics) <dd> Draw a Horizontal Axis. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#drawVAxis(java.awt.Graphics)"><b>drawVAxis</b></a>(Graphics) <dd> Draw a Vertical Axis. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getAxisPos()"><b>getAxisPos</b></a>() <dd> Return the position of the Axis. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getAxisWidth(java.awt.Graphics)"><b>getAxisWidth</b></a>(Graphics) <dd> Return the width of the axis. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getDataMax()"><b>getDataMax</b></a>() <dd> Return the maximum value of All datasets attached to the axis. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getDataMin()"><b>getDataMin</b></a>() <dd> Return the minimum value of All datasets attached to the axis. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getDouble(int)"><b>getDouble</b></a>(int) <dd> Return the data value equivalent of the passed pixel position. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getInteger(double)"><b>getInteger</b></a>(double) <dd> Return the pixel equivalent of the passed data value. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#isVertical()"><b>isVertical</b></a>() <dd> If the Axis is Vertical return <i>true</i>. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#positionAxis(int, int, int, int)"><b>positionAxis</b></a>(int, int, int, int) <dd> Position the axis at the passed coordinates. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#resetRange()"><b>resetRange</b></a>() <dd> Reset the range of the axis (the minimum and maximum values) to thedefault data values. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#setExponentColor(java.awt.Color)"><b>setExponentColor</b></a>(Color) <dd> Set the color of the exponent <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#setExponentFont(java.awt.Font)"><b>setExponentFont</b></a>(Font) <dd> Set the font of the exponent <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#setLabelColor(java.awt.Color)"><b>setLabelColor</b></a>(Color) <dd> Set the color of the labels <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#setLabelFont(java.awt.Font)"><b>setLabelFont</b></a>(Font) <dd> Set the font of the labels. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#setManualRange(boolean)"><b>setManualRange</b></a>(boolean) <dd> Is the range of the axis to be set automatically (based on the data)or manually by setting the values Axis.minimum and Axis.maximum? <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#setPosition(int)"><b>setPosition</b></a>(int) <dd> Set the axis position. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#setTitleColor(java.awt.Color)"><b>setTitleColor</b></a>(Color) <dd> Set the color of the title <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#setTitleFont(java.awt.Font)"><b>setTitleFont</b></a>(Font) <dd> Set the font of the title <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#setTitleRotation(int)"><b>setTitleRotation</b></a>(int) <dd> Set the title rotation angle. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#setTitleText(java.lang.String)"><b>setTitleText</b></a>(String) <dd> Set the title of the axis</dl><a name="variables"></a><h2> <img src="images/variables.gif" width=153 height=38 alt="Variables"></h2><a name="LEFT"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a><b>LEFT</b><pre> public final static int LEFT</pre><dl> <dd> Constant flagging Axis position on the graph. Left side => Vertical</dl><a name="RIGHT"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a><b>RIGHT</b><pre> public final static int RIGHT</pre><dl> <dd> Constant flagging Axis position on the graph. Right side => Vertical</dl><a name="TOP"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a><b>TOP</b><pre> public final static int TOP</pre><dl> <dd> Constant flagging Axis position on the graph. Top side => Horizontal</dl><a name="BOTTOM"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a><b>BOTTOM</b><pre> public final static int BOTTOM</pre><dl> <dd> Constant flagging Axis position on the graph. Bottom side => Horizontal</dl><a name="drawgrid"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>drawgrid</b><pre>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -