bidraganddropmanager.html

来自「ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.」· HTML 代码 · 共 636 行 · 第 1/2 页

HTML
636
字号
<!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>BiDragAndDropManager</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="BiDragAndDropManager">BiDragAndDropManager</h1><p>This class is used to manage the drag and drop system</p><p>This class extends		<code><a href="BiObject.html">BiObject</a></code>		and therefore all methods and fields available for		<code><a href="BiObject.html">BiObject</a></code>		are also available for <code>BiDragAndDropManager</code>.</p><ul class="partial-class-tree"><li><code><a href="BiObject.html">BiObject</a></code><ul><li><code>BiDragAndDropManager</code><ul id="api-derived-classes"></ul></li></ul></li></ul><h2>Constructor</h2><p><code>	new BiDragAndDropManager()</code></p><h3>Parameters</h3><p>No parameters.</p><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"><img src="check.png" alt="checked"></td><td>The desired action to use for the drag and drop session</td></tr><tr><td><a name="destination"></a><code>destination</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>The drop target</td></tr><tr><td><a name="dragIcon"></a><code>dragIcon</code></td><td><code class="type">oComp :<code><a href="BiComponent.html">BiComponent</a></code>	The component to show</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 cursor when doing drag and drop. When this is set to null images are shown that represents the action</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>The union of the supported data types by the drop target and the drag and drop session</td></tr><tr><td><a name="source"></a><code>source</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>The component that started the drag and drop session</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 a supported action. Valid values are <br>								<br>				 copy<br>				 alias<br>				 move</td></tr><tr><td><code><a href="#addData">addData</a></code></td><td>Adds data with the given type</td></tr><tr><td><code><a href="#cancelDrag">cancelDrag</a></code></td><td>Ends the current drag and drop session and fires dragend on the source</td></tr><tr><td><code><a href="#clearActions">clearActions</a></code></td><td>Clears the supported action.</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="#getDropTarget">getDropTarget</a></code></td><td>Gets first component that can support the data type.</td></tr><tr><td><code><a href="#handleKeyboardEvent">handleKeyboardEvent</a></code></td><td>Called by the event manager when a mouse event occurs</td></tr><tr><td><code><a href="#handleKeyDown">handleKeyDown</a></code></td><td>This is called by the event system when a keydown event occurs</td></tr><tr><td><code><a href="#handleKeyUp">handleKeyUp</a></code></td><td>This is called by the event system when a keyup event occurs</td></tr><tr><td><code><a href="#handleMouseDown">handleMouseDown</a></code></td><td>This is called by the event system when a mousedown event occurs</td></tr><tr><td><code><a href="#handleMouseEvent">handleMouseEvent</a></code></td><td>Called by the event manager when a mouse event occurs</td></tr><tr><td><code><a href="#handleMouseMove">handleMouseMove</a></code></td><td>This is called by the event system when a mousemove event occurs</td></tr><tr><td><code><a href="#handleMouseUp">handleMouseUp</a></code></td><td>This is called by the event system when a mouseup event occurs</td></tr><tr><td><code><a href="#removeAction">removeAction</a></code></td><td>Removes an action.</td></tr><tr><td><code><a href="#startDrag">startDrag</a></code></td><td>This initiates the drag and drop session and can only be called during a <code><a href="BiComponent.html#dragstart">dragstart</a></code> event</td></tr><tr><td><code><a href="#supportsDrop">supportsDrop</a></code></td><td>Tests that the component supports the data type</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>	</p><h2>Method Details</h2><h3><a name="addAction"></a>addAction</h3><p>Adds a supported action. Valid values are <br>								<br>				 copy<br>				 alias<br>				 move</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 action to add support for</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="addData"></a>addData</h3><p>Adds data with the given type</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 type of the data</td></tr><tr><td><code>oData</code></td><td><code class="type">Obejct</code></td><td class="optional-column"></td><td></td><td>The data to ue</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="cancelDrag"></a>cancelDrag</h3><p>Ends the current drag and drop session and fires dragend on the source</p><h4>Syntax</h4><pre class="method-syntax">object.cancelDrag(<span class="methodArgument">e</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>e</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 event that caused this to be canceled</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="clearActions"></a>clearActions</h3><p>Clears the supported action.</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>

⌨️ 快捷键说明

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