⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 graph.g2dint.html

📁 java 作图的程序
💻 HTML
字号:
<!--NewPage--><html><head><!-- Generated by javadoc on Wed Oct 23 13:30:49 EST 1996 --><a name="_top_"></a><title>  Class graph.G2Dint</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.DataSet.html#_top_">Previous</a>  <a href="graph.Graph2D.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre><hr><h1>  Class graph.G2Dint</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>                   |                   +----<a href="graph.Graph2D.html#_top_">graph.Graph2D</a>                           |                           +----graph.G2Dint</pre><hr><dl>  <dt> public class <b>G2Dint</b>  <dt> extends <a href="graph.Graph2D.html#_top_">Graph2D</a></dl>This class is an extension of Graph2D class.   It adds interactive selection of the plotting range   and can display the mouse position in user coordinates.   <h4>Mouse Events</h4>   <dl>    <dt>MouseDown    <dd>Starts the range selection    <dt>MouseDrag    <dd>Drag out a rectangular range selection    <dt>MouseUp    <dd>Replot with modified plotting range.    <dt>   </dl>   <h4>KeyDown Events</h4>   <dl>    <dt>R    <dd>Redraw plot with default limits    <dt>r    <dd>Redraw plot using current limits    <dt>m    <dd>Pop window to enter manually plot range    <dt>c    <dd>Toggle pop-up window that displays the mouse position        in user coordinates    <dt>d    <dd>Show coordinates of the closest data point to the cursor    <dt>D    <dd>Hide data coordinates pop-window    <dt>h    <dd>This key pressed in Any pop-window at any-time will hide it.   </dl>   <P>   <B>Note:</B> To hide Any pop-window press the key <B>h</B> in the   window. This will hide the window at any time. Depending on your   windowing system the mouse button might have to be pressed in the   popup window to ensure it has the keyboard focus.<dl>  <dt> <b>Version:</b>  <dd> 1.9, 1996/07/02 06:01:12.  <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="#drag"><b>drag</b></a>  <dd>    Set to true when a rectangle is being dragged out by the mouse  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#userlimits"><b>userlimits</b></a>  <dd>    User limits.  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#xaxis"><b>xaxis</b></a>  <dd>    Attached X Axis which must be registered with this class.  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#yaxis"><b>yaxis</b></a>  <dd>    Attached Y Axis which must be registered with this class.</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="#G2Dint()"><b>G2Dint</b></a>()  <dd> </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="#action(java.awt.Event, java.lang.Object)"><b>action</b></a>(Event, Object)  <dd> Handle the Action Events.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#attachAxis(graph.Axis)"><b>attachAxis</b></a>(Axis)  <dd>    Attach axis to be used for the drag scaling.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#createXAxis()"><b>createXAxis</b></a>()  <dd>    Create Xaxis to be used for the drag scaling  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#createYAxis()"><b>createYAxis</b></a>()  <dd>    Create Yaxis to be used for the drag scaling  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getClosestPoint(int, int)"><b>getClosestPoint</b></a>(int, int)  <dd>   Find the closest data point to the cursor  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#keyDown(java.awt.Event, int)"><b>keyDown</b></a>(Event, int)  <dd> Handle the Key Down events.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#mouseDown(java.awt.Event, int, int)"><b>mouseDown</b></a>(Event, int, int)  <dd> Handle the Mouse Down events  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#mouseDrag(java.awt.Event, int, int)"><b>mouseDrag</b></a>(Event, int, int)  <dd> Handle the Mouse Drag events  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#mouseMove(java.awt.Event, int, int)"><b>mouseMove</b></a>(Event, int, int)  <dd> Handle the Mouse Mouve events  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#mouseUp(java.awt.Event, int, int)"><b>mouseUp</b></a>(Event, int, int)  <dd> Handle the Mouse Up events  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#update(java.awt.Graphics)"><b>update</b></a>(Graphics)  <dd>  New update method incorporating mouse dragging.</dl><a name="variables"></a><h2>  <img src="images/variables.gif" width=153 height=38 alt="Variables"></h2><a name="drag"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>drag</b><pre>  protected boolean drag</pre><dl>  <dd> Set to true when a rectangle is being dragged out by the mouse</dl><a name="userlimits"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>userlimits</b><pre>  protected boolean userlimits</pre><dl>  <dd> User limits. The user has set the limits using the mouse drag option</dl><a name="xaxis"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>xaxis</b><pre>  protected <a href="graph.Axis.html#_top_">Axis</a> xaxis</pre><dl>  <dd> Attached X Axis which must be registered with this class.   This is one of the axes used to find the drag range.   If no X axis is registered no mouse drag.</dl><a name="yaxis"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>yaxis</b><pre>  protected <a href="graph.Axis.html#_top_">Axis</a> yaxis</pre><dl>  <dd> Attached Y Axis which must be registered with this class.   This is one of the axes used to find the drag range.   If no Y axis is registered no mouse drag.</dl><a name="constructors"></a><h2>  <img src="images/constructors.gif" width=231 height=38 alt="Constructors"></h2><a name="G2Dint"></a><a name="G2Dint()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>G2Dint</b><pre>  public G2Dint()</pre><a name="methods"></a><h2>  <img src="images/methods.gif" width=151 height=38 alt="Methods"></h2><a name="createXAxis()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="createXAxis"><b>createXAxis</b></a><pre>  public <a href="graph.Axis.html#_top_">Axis</a> createXAxis()</pre><dl>  <dd> Create Xaxis to be used for the drag scaling</dl><a name="createYAxis()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="createYAxis"><b>createYAxis</b></a><pre>  public <a href="graph.Axis.html#_top_">Axis</a> createYAxis()</pre><dl>  <dd> Create Yaxis to be used for the drag scaling</dl><a name="attachAxis(graph.Axis)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="attachAxis"><b>attachAxis</b></a><pre>  public void attachAxis(<a href="graph.Axis.html#_top_">Axis</a> a)</pre><dl>  <dd> Attach axis to be used for the drag scaling. X axes are assumed to   have Axis position Axis.BOTTOM or Axis.TOP. Y axes are assumed   to have position Axis.LEFT or Axis.RIGHT.  <dl>    <dt> <b>Parameters:</b>    <dd> a - Axis to attach    <dt> <b>Overrides:</b>    <dd> <a href="graph.Graph2D.html#attachAxis(graph.Axis)">attachAxis</a> in class <a href="graph.Graph2D.html#_top_">Graph2D</a>    <dt> <b>See Also:</b>    <dd> <a href="graph.Axis.html#_top_">Axis</a>  </dl></dl><a name="update(java.awt.Graphics)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="update"><b>update</b></a><pre>  public void update(<a href="java.awt.Graphics.html#_top_">Graphics</a> g)</pre><dl>  <dd> New update method incorporating mouse dragging.  <dl>    <dt> <b>Overrides:</b>    <dd> <a href="graph.Graph2D.html#update(java.awt.Graphics)">update</a> in class <a href="graph.Graph2D.html#_top_">Graph2D</a>  </dl></dl><a name="keyDown(java.awt.Event, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="keyDown"><b>keyDown</b></a><pre>  public boolean keyDown(<a href="java.awt.Event.html#_top_">Event</a> e,                         int key)</pre><dl>  <dd> Handle the Key Down events.  <dl>    <dt> <b>Overrides:</b>    <dd> <a href="graph.Graph2D.html#keyDown(java.awt.Event, int)">keyDown</a> in class <a href="graph.Graph2D.html#_top_">Graph2D</a>  </dl></dl><a name="mouseDown(java.awt.Event, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="mouseDown"><b>mouseDown</b></a><pre>  public boolean mouseDown(<a href="java.awt.Event.html#_top_">Event</a> e,                           int x,                           int y)</pre><dl>  <dd> Handle the Mouse Down events  <dl>    <dt> <b>Overrides:</b>    <dd> <a href="java.awt.Component.html#mouseDown(java.awt.Event, int, int)">mouseDown</a> in class <a href="java.awt.Component.html#_top_">Component</a>  </dl></dl><a name="mouseUp(java.awt.Event, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="mouseUp"><b>mouseUp</b></a><pre>  public boolean mouseUp(<a href="java.awt.Event.html#_top_">Event</a> e,                         int x,                         int y)</pre><dl>  <dd> Handle the Mouse Up events  <dl>    <dt> <b>Overrides:</b>    <dd> <a href="java.awt.Component.html#mouseUp(java.awt.Event, int, int)">mouseUp</a> in class <a href="java.awt.Component.html#_top_">Component</a>  </dl></dl><a name="mouseDrag(java.awt.Event, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="mouseDrag"><b>mouseDrag</b></a><pre>  public boolean mouseDrag(<a href="java.awt.Event.html#_top_">Event</a> e,                           int x,                           int y)</pre><dl>  <dd> Handle the Mouse Drag events  <dl>    <dt> <b>Overrides:</b>    <dd> <a href="java.awt.Component.html#mouseDrag(java.awt.Event, int, int)">mouseDrag</a> in class <a href="java.awt.Component.html#_top_">Component</a>  </dl></dl><a name="mouseMove(java.awt.Event, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="mouseMove"><b>mouseMove</b></a><pre>  public boolean mouseMove(<a href="java.awt.Event.html#_top_">Event</a> e,                           int x,                           int y)</pre><dl>  <dd> Handle the Mouse Mouve events  <dl>    <dt> <b>Overrides:</b>    <dd> <a href="java.awt.Component.html#mouseMove(java.awt.Event, int, int)">mouseMove</a> in class <a href="java.awt.Component.html#_top_">Component</a>  </dl></dl><a name="action(java.awt.Event, java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="action"><b>action</b></a><pre>  public boolean action(<a href="java.awt.Event.html#_top_">Event</a> e,                        <a href="java.lang.Object.html#_top_">Object</a> a)</pre><dl>  <dd> Handle the Action Events.This handler allows external classes (pop-up windows etc.) tocommunicate to this class asyncronously.  <dl>    <dt> <b>Overrides:</b>    <dd> <a href="java.awt.Component.html#action(java.awt.Event, java.lang.Object)">action</a> in class <a href="java.awt.Component.html#_top_">Component</a>  </dl></dl><a name="getClosestPoint(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getClosestPoint"><b>getClosestPoint</b></a><pre>  protected double[] getClosestPoint(int ix,                                     int iy)</pre><dl>  <dd> Find the closest data point to the cursor</dl><hr><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.DataSet.html#_top_">Previous</a>  <a href="graph.Graph2D.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -