bimouseevent.html
来自「ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.」· HTML 代码 · 共 356 行
HTML
356 行
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><!--Generated using api.website.xsl version 2003-07-17--><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"><title>BiMouseEvent</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type="text/css" rel="stylesheet" href="api.css"><script type="text/javascript"> function showDerivedClasses() { var ul = document.getElementById("api-derived-classes"); var lis = ul.childNodes; var l = lis.length; for (var i = 1; i < l; i++) lis[i].style.display = ""; lis[0].style.display = "none"; } </script></head><body><h1 id="BiMouseEvent">BiMouseEvent</h1><p>This class describes event objects used in mouse events.<br> <br> All mouse events bubble by default. This means that once all the event listeners have been notified the event propagates to the parent <code><a href="BiComponent.html">BiComponent</a></code>. To prevent the event to bubble to the parent call <code><a href="BiEvent.html#stopPropagation"> stopPropagation()</a></code> on the event object.<br> <br> The currently supported events by <code><a href="BiComponent.html">BiComponent</a></code> are:<br> <br> <code><a href="BiComponent.html#mousedown">mousedown</a></code> <br> <code><a href="BiComponent.html#mouseup">mouseup</a></code> <br> <code><a href="BiComponent.html#click">click</a></code> <br> <code><a href="BiComponent.html#dblclick">dblclick</a></code> <br> <code><a href="BiComponent.html#contextmenu">contextmenu</a></code> - this one is a bit tricky since it might also be dispatched when the user presses the context menu key on their keyboard<br> <code><a href="BiComponent.html#mouseover">mouseover</a></code> <br> <code><a href="BiComponent.html#mouseout">mouseout</a></code> <br> <code><a href="BiComponent.html#mousemove">mousemove</a></code> <br> <code><a href="BiComponent.html#mousewheel">mousewheel</a></code> <br> <br> When a user double clicks on a component the order of the mouse events is the following:<br> <code><a href="BiComponent.html#mousedown">mousedown</a></code> <br> <code><a href="BiComponent.html#mouseup">mouseup</a></code> <br> <code><a href="BiComponent.html#click">click</a></code> <br> <code><a href="BiComponent.html#mousedown">mousedown</a></code> <br> <code><a href="BiComponent.html#mouseup">mouseup</a></code> <br> <code><a href="BiComponent.html#click">click</a></code> <br> <code><a href="BiComponent.html#dblclick">dblclick</a></code> <br> <br> This object should not be created by the user. It is created as needed by the event system.</p><p>This class extends <code><a href="BiEvent.html">BiEvent</a></code> and therefore all methods and fields available for <code><a href="BiEvent.html">BiEvent</a></code> are also available for <code>BiMouseEvent</code>.</p><ul class="partial-class-tree"><li><code><a href="BiObject.html">BiObject</a></code><ul><li><code><a href="BiEvent.html">BiEvent</a></code><ul><li><code>BiMouseEvent</code><ul id="api-derived-classes"><li><code><a href="BiChartMouseEvent.html">BiChartMouseEvent</a></code></li><li><code><a href="BiDragEvent.html">BiDragEvent</a></code></li></ul></li></ul></li></ul></li></ul><h2>Constructor</h2><p><code> new BiMouseEvent(<span class="methodArgument">sType</span>, <span class="methodArgument">oEvent</span>)</code></p><h3>Parameters</h3><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>sType</code></td><td><code class="type">String</code></td><td class="optional-column"></td><td></td><td>The type (name) of the event.</td></tr><tr><td><code>oEvent</code></td><td><code class="type">Object</code></td><td class="optional-column"></td><td></td><td>This is the internal browser event object.</td></tr></tbody></table><h2>Properties</h2><table><thead><tr><td>Name</td><td>Type</td><td class="get-header">get</td><td class="set-header">set</td><td>Descripton</td></tr></thead><tbody><tr><td><a name="altKey"></a><code>altKey</code></td><td><code class="type">Boolean</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Whether the alt key pressed.</td></tr><tr><td><a name="button"></a><code>button</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Returns a number representing the mouse button that is pressed.</td></tr><tr><td><a name="clientX"></a><code>clientX</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The position of the mouse pointer relative to the browser viewport.</td></tr><tr><td><a name="clientY"></a><code>clientY</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The position of the mouse pointer relative to the browser viewport.</td></tr><tr><td><a name="ctrlKey"></a><code>ctrlKey</code></td><td><code class="type">Boolean</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Whether the ctrl key pressed.</td></tr><tr><td><a name="offsetX"></a><code>offsetX</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The position of the mouse pointer relative to the event target.</td></tr><tr><td><a name="offsetY"></a><code>offsetY</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The position of the mouse pointer relative to the event target.</td></tr><tr><td><a name="relatedTarget"></a><code>relatedTarget</code></td><td><code class="type"> <code><a href="BiEventTarget.html">BiEventTarget</a></code> </code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The related target is used with mouseover and mouseout events. In a mouseover event the related target is the component that the mouse pointer left and for a mouseout it is the component that the mouse entered.</td></tr><tr><td><a name="screenX"></a><code>screenX</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The position of the mouse pointer relative to the screen.</td></tr><tr><td><a name="screenY"></a><code>screenY</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The position of the mouse pointer relative to the screen.</td></tr><tr><td><a name="shiftKey"></a><code>shiftKey</code></td><td><code class="type">Boolean</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Whether the shift key pressed.</td></tr><tr><td><a name="wheelDelta"></a><code>wheelDelta</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The amount that the user scrolled the mouse wheel.</td></tr></tbody></table><h2>Methods</h2><p>None.</p><h2>Events</h2><p>None.</p><h2>Static Methods</h2><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><code><a href="#getButton">getButton</a></code></td><td>Returns the last recorded mouse button used in a mouse event.</td></tr><tr><td><code><a href="#getClientX">getClientX</a></code></td><td>This returns the last recorded left mouse position relative to the browser view port (client area).</td></tr><tr><td><code><a href="#getClientY">getClientY</a></code></td><td>This returns the last recorded top mouse position relative to the browser view port (client area).</td></tr><tr><td><code><a href="#getScreenX">getScreenX</a></code></td><td>This returns the last recorded left mouse position relative to the screen.</td></tr><tr><td><code><a href="#getScreenY">getScreenY</a></code></td><td>This returns the last recorded top mouse position relative to the screen.</td></tr></tbody></table><h2>Static Fields</h2><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>LEFT</code></td><td><code class="type">Number</code></td><td>Constant used to test whether the left button is pressed.</td></tr><tr><td><code>MIDDLE</code></td><td><code class="type">Number</code></td><td>Constant used to test whether the right button is pressed.</td></tr><tr><td><code>RIGHT</code></td><td><code class="type">Number</code></td><td>Constant used to test whether the middle button is pressed.</td></tr></tbody></table><h2>Remarks</h2><p>This object should not be created by the user. It is created as needed by the event system.</p><h2>Static Method Details</h2><h3><a name="getButton"></a>getButton</h3><p>Returns the last recorded mouse button used in a mouse event.</p><h4>Syntax</h4><pre class="method-syntax">BiMouseEvent.getButton()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">Number</code></p><h3><a name="getClientX"></a>getClientX</h3><p>This returns the last recorded left mouse position relative to the browser view port (client area).</p><h4>Syntax</h4><pre class="method-syntax">BiMouseEvent.getClientX()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">Number</code></p><h3><a name="getClientY"></a>getClientY</h3><p>This returns the last recorded top mouse position relative to the browser view port (client area).</p><h4>Syntax</h4><pre class="method-syntax">BiMouseEvent.getClientY()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">Number</code></p><h3><a name="getScreenX"></a>getScreenX</h3><p>This returns the last recorded left mouse position relative to the screen.</p><h4>Syntax</h4><pre class="method-syntax">BiMouseEvent.getScreenX()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">Number</code></p><h3><a name="getScreenY"></a>getScreenY</h3><p>This returns the last recorded top mouse position relative to the screen.</p><h4>Syntax</h4><pre class="method-syntax">BiMouseEvent.getScreenY()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">Number</code></p></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?