📄 bidragevent.html
字号:
<!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>BiDragEvent</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="BiDragEvent">BiDragEvent</h1><p>This event is used in drag and drop sesssions</p><p>This class extends <code><a href="BiMouseEvent.html">BiMouseEvent</a></code> and therefore all methods and fields available for <code><a href="BiMouseEvent.html">BiMouseEvent</a></code> are also available for <code>BiDragEvent</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><a href="BiMouseEvent.html">BiMouseEvent</a></code><ul><li><code>BiDragEvent</code><ul id="api-derived-classes"><li><code><a href="BiOlapGridDragEvent.html">BiOlapGridDragEvent</a></code></li></ul></li></ul></li></ul></li></ul></li></ul><h2>Constructor</h2><p><code> new BiDragEvent(<span class="methodArgument">sType</span>, <span class="methodArgument">oMouseEvent</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 of the event</td></tr><tr><td><code>oMouseEvent</code></td><td><code class="type"> <code><a href="BiMouseEvent.html">BiMouseEvent</a></code> </code></td><td class="optional-column"></td><td></td><td>The mouse event object used to initiate this event</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="action"></a><code>action</code></td><td><code class="type">String</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Returns the action that the session is currently using</td></tr><tr><td><a name="dragIcon"></a><code>dragIcon</code></td><td><code class="type"> <code><a href="BiComponent.html">BiComponent</a></code> </code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>The component to use as the icon next to the pointer</td></tr><tr><td><a name="dropDataTypes"></a><code>dropDataTypes</code></td><td><code class="type">String[]</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Returns the types that the data is avaible for</td></tr><tr><td><a name="manager"></a><code>manager</code></td><td><code class="type"> <code><a href="BiDragAndDropManager.html">BiDragAndDropManager</a></code> </code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>This returns the drag and drop manager used in the drag and drop session</td></tr><tr><td><a name="realTarget"></a><code>realTarget</code></td><td><code class="type"> <code><a href="BiComponent.html">BiComponent</a></code> </code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>This is the component that mouse is currently over. This is useful in case You want to show a drop marker relative to the component below the pointer and that component is not a valid drop target</td></tr><tr><td><a name="relatedTarget"></a><code>relatedTarget</code></td><td><code class="type"> <code><a href="BiComponent.html">BiComponent</a></code> </code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Returns the related component in the drag'n drop session<br> <br> For <code>dragover</code> this returns the component that was left (if a valid drop target)<br> For <code>dragout</code> this returns the component that was entered (if a valid drop target)<br> For <code>dragdrop</code> this returns the source of the drag'n drop<br> For <code>dragend</code> this returns the destination (drop target)</td></tr></tbody></table><h2>Methods</h2><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><code><a href="#addAction">addAction</a></code></td><td>Adds an action supported by the drag and drop session</td></tr><tr><td><code><a href="#addData">addData</a></code></td><td>This adds some data to be used in the drag and drop session</td></tr><tr><td><code><a href="#clearActions">clearActions</a></code></td><td>Removes the supported actions for the current drag and drop session</td></tr><tr><td><code><a href="#clearData">clearData</a></code></td><td>Clears the data associated with the drag and drop session</td></tr><tr><td><code><a href="#getData">getData</a></code></td><td>Returns the data for the given type</td></tr><tr><td><code><a href="#removeAction">removeAction</a></code></td><td>Removes an action which is no longer supported by the drag and drop session</td></tr><tr><td><code><a href="#startDrag">startDrag</a></code></td><td>Call this in a <code><a href="BiComponent.html#dragstart">dragstart</a></code> event to start the actual drag and drop session.</td></tr></tbody></table><h2>Events</h2><p>None.</p><h2>Static Methods</h2><p>None.</p><h2>Static Fields</h2><p>None.</p><h2>Remarks</h2><p>Unlike<code><a href="BiMouseEvent.html">BiMouseEvent</a></code> the target (and relatedTarget) is not always the direct component under the mouse pointer but the first valid drop target (or the source of the drag'n drop).<br> <br> Valid drop targets are decided based on the <code><a href="BiComponent.html#dropDataTypes">drop data types</a></code> and the data in the drag'n drop session.</p><h2>Method Details</h2><h3><a name="addAction"></a>addAction</h3><p>Adds an action supported by the drag and drop session</p><h4>Syntax</h4><pre class="method-syntax">object.addAction(<span class="methodArgument">sAction</span>)</pre><h4>Parameters</h4><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>sAction</code></td><td><code class="type">String</code></td><td class="optional-column"></td><td></td><td>The name of the action to add</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="addData"></a>addData</h3><p>This adds some data to be used in the drag and drop session</p><h4>Syntax</h4><pre class="method-syntax">object.addData(<span class="methodArgument">sType</span>, <span class="methodArgument">oData</span>)</pre><h4>Parameters</h4><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>A string identifying the data</td></tr><tr><td><code>oData</code></td><td><code class="type">Object</code></td><td class="optional-column"></td><td></td><td>The data to be used</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="clearActions"></a>clearActions</h3><p>Removes the supported actions for the current drag and drop session</p><h4>Syntax</h4><pre class="method-syntax">object.clearActions()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="clearData"></a>clearData</h3><p>Clears the data associated with the drag and drop session</p><h4>Syntax</h4><pre class="method-syntax">object.clearData()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="getData"></a>getData</h3><p>Returns the data for the given type</p><h4>Syntax</h4><pre class="method-syntax">object.getData(<span class="methodArgument">sType</span>)</pre><h4>Parameters</h4><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 string identifying the data</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Object</code></p><h3><a name="removeAction"></a>removeAction</h3><p>Removes an action which is no longer supported by the drag and drop session</p><h4>Syntax</h4><pre class="method-syntax">object.removeAction(<span class="methodArgument">sAction</span>)</pre><h4>Parameters</h4><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>sAction</code></td><td><code class="type">String</code></td><td class="optional-column"></td><td></td><td>The name of the action to remove</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="startDrag"></a>startDrag</h3><p>Call this in a <code><a href="BiComponent.html#dragstart">dragstart</a></code> event to start the actual drag and drop session.</p><h4>Syntax</h4><pre class="method-syntax">object.startDrag()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">void</code></p></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -