bimenu.html

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

HTML
531
字号
<!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>BiMenu</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="BiMenu">BiMenu</h1><p>This class represents a menu. Menus can be filled with menu items by adding <code><a href="BiMenuItem.html">BiMenuItem</a></code> objects.<br>				<br>		 The content model for the menu is very similiar to the content model for <code><a href="BiComponent.html">BiComponent</a></code> but there are slight differences.</p><p>This class extends		<code><a href="BiEventTarget.html">BiEventTarget</a></code>		and therefore all methods and fields available for		<code><a href="BiEventTarget.html">BiEventTarget</a></code>		are also available for <code>BiMenu</code>.</p><ul class="partial-class-tree"><li><code><a href="BiObject.html">BiObject</a></code><ul><li><code><a href="BiEventTarget.html">BiEventTarget</a></code><ul><li><code>BiMenu</code><ul id="api-derived-classes"></ul></li></ul></li></ul></li></ul><h2>Constructor</h2><p><code>	new BiMenu()</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="children"></a><code>children</code></td><td><code class="type">				<code><a href="BiMenuItem.html">BiMenuItem[]</a></code>			</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The menu items added to the menu</td></tr><tr><td><a name="component"></a><code>component</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>If the menu was opened as a context menu for a component then this will point to the component that caused the menu to be shown.<br>								<br>				 This will return <code>null</code> if the menu is hidden or not opened by a component. In other words by setting <code><a href="BiComponent.html#visible">visible</a></code> manually. This is available during the <code><a href="#beforeshow">beforeshow</a></code> event even though the menu is not yet visible. It is also available when the <code><a href="#hide">hide</a></code> event fires.</td></tr><tr><td><a name="firstChild"></a><code>firstChild</code></td><td><code class="type">				<code><a href="BiMenuItem.html">BiMenuItem</a></code>			</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Returns the first menu item child</td></tr><tr><td><a name="height"></a><code>height</code></td><td><code class="type">Number</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 heightof the menu</td></tr><tr><td><a name="hideTimeStamp"></a><code>hideTimeStamp</code></td><td><code class="type">Date</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The time when the menu was hidden. This can be useful to find out whether the popup was just hidden.</td></tr><tr><td><a name="insetBottom"></a><code>insetBottom</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>Border bottom width.</td></tr><tr><td><a name="insetLeft"></a><code>insetLeft</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>Border left width.</td></tr><tr><td><a name="insetRight"></a><code>insetRight</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>Border right width.</td></tr><tr><td><a name="insetTop"></a><code>insetTop</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>Border top width.</td></tr><tr><td><a name="isVisible"></a><code>isVisible</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 menu is shown on the screen</td></tr><tr><td><a name="lastChild"></a><code>lastChild</code></td><td><code class="type">				<code><a href="BiMenuItem.html">BiMenuItem</a></code>			</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Returns the last menu item child</td></tr><tr><td><a name="left"></a><code>left</code></td><td><code class="type">Number</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>Sets or gets the left position of the menu relative to the screen</td></tr><tr><td><a name="parent"></a><code>parent</code></td><td><code class="type">				<code><a href="BiMenuItem.html">BiMenuItem</a></code>			</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The parent menu item in case the menu acts as a sub menu</td></tr><tr><td><a name="parentMenu"></a><code>parentMenu</code></td><td><code class="type">				<code><a href="BiMenu.html">BiMenu</a></code>			</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The parent menu in case the menu acts as a sub menu. This is the same as the parent of the parent menu item</td></tr><tr><td><a name="preferredHeight"></a><code>preferredHeight</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 preferred height of the menu</td></tr><tr><td><a name="preferredWidth"></a><code>preferredWidth</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 preferred width of the menu</td></tr><tr><td><a name="rightToLeft"></a><code>rightToLeft</code></td><td><code class="type">Boolean</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>Describes whether the component should be be layed out to support locales using right-to-left fonts. If this is set to <code>null</code> then the <code><a href="#rightToLeft">rightToLeft</a></code> property for the parent component is used.</td></tr><tr><td><a name="showTimeStamp"></a><code>showTimeStamp</code></td><td><code class="type">Date</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The time when the menu was shown.</td></tr><tr><td><a name="top"></a><code>top</code></td><td><code class="type">Number</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>Sets or gets the top position of the menu relative to the screen</td></tr><tr><td><a name="topLevelComponent"></a><code>topLevelComponent</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 top level ancestor component. This is usually the application window hosting the application.</td></tr><tr><td><a name="visible"></a><code>visible</code></td><td><code class="type">Boolean</code></td><td class="get-column"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>Shows or hides the menu</td></tr><tr><td><a name="width"></a><code>width</code></td><td><code class="type">Number</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 width of the menu</td></tr></tbody></table><h2>Methods</h2><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><code><a href="#add">add</a></code></td><td>Adds a menu item to the current menu. The added menu item becomes a child of the current menu. If the menu item is child of another menu it is first removed from that menu. The second, optional, argument can be used to insert the new menu item before an existing child.</td></tr><tr><td><code><a href="#contains">contains</a></code></td><td>Returns true if the menu contains another menu item or menu. This means that the current component is an ancestor of the descendant. Note that the current component contains itself so calling

⌨️ 快捷键说明

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