bicomponent.html
来自「ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.」· HTML 代码 · 共 1,491 行 · 第 1/5 页
HTML
1,491 行
<tr><td><a name="parent"></a><code>parent</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>Returns the parent component. This is the component that the current component was added to. If the current component has not been added to any componenet this returns <code>null</code>. If the real parent component is anonymous then this returns the first non anonymous ancestor.<br> <br> When setting this the component is added last to the new parent. If you set this to <code>null</code> the component is removed from its current parent</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"><img src="check.png" alt="checked"></td><td>Returns the desired height of the component. This is usually the size of the content plus the borders.</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"><img src="check.png" alt="checked"></td><td>Returns the desired width of the component. This is usually the size of the content plus the borders.</td></tr><tr><td><a name="previousSibling"></a><code>previousSibling</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 component before the current in the parent children collection. If the current component has no parent or no component comes before the current this returns <code>null</code>. This is the first non anonymous previous sibling.</td></tr><tr><td><a name="right"></a><code>right</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 right position relative to the parent inner edge. When using right a <code><a href="#width">width</a></code> should also be set. When using get the return value is always a number representing the pixel value.</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="screenLeft"></a><code>screenLeft</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 left position of the component relative to screen</td></tr><tr><td><a name="screenTop"></a><code>screenTop</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 top position of the component relative to screen</td></tr><tr><td><a name="scrollHeight"></a><code>scrollHeight</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 height of the content of the component.</td></tr><tr><td><a name="scrollLeft"></a><code>scrollLeft</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 position of the content relative to the view port of the component. This is the distance the view port has scrolled horizontally.</td></tr><tr><td><a name="scrollTop"></a><code>scrollTop</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 position of the content relative to the view port of the component. This is the distance the view port has scrolled vertically.</td></tr><tr><td><a name="scrollWidth"></a><code>scrollWidth</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 width of the content of the component.</td></tr><tr><td><a name="tabChildren"></a><code>tabChildren</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 returns an array containing the<code><a href="BiComponent.html">BiComponent</a></code> objects that should be accessible by the focus manager when navigating focusable objects using the tab key.</td></tr><tr><td><a name="tabIndex"></a><code>tabIndex</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>Setting this to less than 0 prevents the component from becoming focusable. The tab index is used to tell in what order to focus the components when naviagting between components using the tab key.</td></tr><tr><td><a name="toolTip"></a><code>toolTip</code></td><td><code class="type"> <code><a href="BiToolTip.html">BiToolTip</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>Sets the tool tip to show when the user hovers the component. Setting this to null prevents a tooltip from beeing shown (unless <code><a href="#toolTipText">toolTipText</a></code> is set.</td></tr><tr><td><a name="toolTipText"></a><code>toolTipText</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>Sets the tool tip text to show when the user hovers the component. This allows a simple plain text tool tip to be shown. This property is preferred over the <code><a href="#toolTip">toolTip</a></code> property when the extra functionality provided by the <code><a href="BiToolTip.html">BiToolTip</a></code> instance is needed.</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>The top position relative to the parent inner edge. When using get the return value is always a number representing the pixel value.</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"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>Whether the component is visible or not. Note that all the ancestors must be visible for the component to be actually shown. Use <code><a href="#isVisible">isVisible</a></code> to check that the component is shown.</td></tr><tr><td><a name="zIndex"></a><code>zIndex</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 z index of the component. A higher z index means that the component will cover components with lower z index and therefore appear to be closer to the user.</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 component to the current component. The added component becomes a child of the current component. If the component is child of another component it is first removed from that component. The second, optional, argument can be used to insert the new component before an existing child. This raises exception if oBefore is not a child of this.</td></tr><tr><td><code><a href="#contains">contains</a></code></td><td>Returns true if the componenent contains another component. This means that the current component is an ancestor of the descendant. Note that the current component contains itself so calling <code>component.contains(component)</code> will return <code>true</code>.</td></tr><tr><td><code><a href="#getHtmlProperty">getHtmlProperty</a></code></td><td>Returns the HTML property value for the HTML element represented by the component.</td></tr><tr><td><code><a href="#getStyleProperty">getStyleProperty</a></code></td><td>Returns the CSS style property value for the HTML element represented by the component. This should be used with caution since in some cases this might give unrespected results.</td></tr><tr><td><code><a href="#hasChildren">hasChildren</a></code></td><td>Returns true if the component has any child components. This does not include anonymous children so if all children are anonymous then this will return <code>false</code>.</td></tr><tr><td><code><a href="#invalidateChild">invalidateChild</a></code></td><td>This method is called when a child component no longer has valid size and/or position. For the known hints see <code><a href="#invalidateParentLayout">invalidateParentLayout</a></code>.</td></tr><tr><td><code><a href="#invalidateLayout">invalidateLayout</a></code></td><td>This method is called when a component is changed so that its internal layout is no longer valid. This schedules a call to <code><a href="#layoutAllChildren">layoutAllChildren</a></code> </td></tr><tr><td><code><a href="#invalidateParentLayout">invalidateParentLayout</a></code></td><td>This is called when the size and/or position of the component is changed and therefore the layout needs to be updated<br> The hint can be used by layout components to be more efficient and ignore hints that does not affect the layout. Known hints are:<br> "size"<br> "preferred"<br> "minimum"<br> "maximum"<br> "margin"</td></tr><tr><td><code><a href="#isFocusRoot">isFocusRoot</a></code></td><td>Whether the component is acting as a focus root or not</td></tr><tr><td><code><a href="#layoutAllChildren">layoutAllChildren</a></code></td><td>This does a layout of all the children. This is the method where layout is done and you can override this to do your own layout. If the size of a child is changed the child will in its turn call <code><a href="#layoutAllChildren">layoutAllChildren</a></code>.</td></tr><tr><td><code><a href="#layoutAllChildrenX">layoutAllChildrenX</a></code></td><td>Depreciated. Use <code><a href="#layoutAllChildren">layoutAllChildren</a></code> instead</td></tr><tr><td><code><a href="#layoutAllChildrenY">layoutAllChildrenY</a></code></td><td>Depreciated. Use <code><a href="#layoutAllChildren">layoutAllChildren</a></code> instead</td></tr><tr><td><code><a href="#layoutChild">layoutChild</a></code></td><td>This handles the layout of the child. If the child changes its size and it has any children this will also call layoutAllChildren on the child.</td></tr><tr><td><code><a href="#layoutChildX">layoutChildX</a></code></td><td>Depreciated. Use <code><a href="#layoutChild">layoutChild</a></code> instead.</td></tr><tr><td><code><a href="#layoutChildY">layoutChildY</a></code></td><td>Depreciated. Use <code><a href="#layoutChild">layoutChild</a></code> instead.</td></tr><tr><td><code><a href="#layoutComponent">layoutComponent</a></code></td><td>Handles the size and position of the current component. Most components ask their parent to do the actual layout but this can be overridden to allow the component to take care of its own size and position.</td></tr><tr>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?