⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bithememanager.html

📁 ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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>BiThemeManager</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="BiThemeManager">BiThemeManager</h1><p>This singleton class is used for theme support in Bindows</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>BiThemeManager</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>BiThemeManager</code><ul id="api-derived-classes"></ul></li></ul></li></ul></li></ul><h2>Constructor</h2><p><code>	new BiThemeManager()</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="defaultTheme"></a><code>defaultTheme</code></td><td><code class="type">				<code><a href="BiTheme.html">BiTheme</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 theme that is currently being used</td></tr><tr><td><a name="themes"></a><code>themes</code></td><td><code class="type">				<code><a href="BiTheme.html">BiTheme[]</a></code>			</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>This is an array containing the added themes.</td></tr></tbody></table><h2>Methods</h2><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><code><a href="#addAppearance">addAppearance</a></code></td><td>This assigns the appearance to a component and adds event listeners that allows the look and feel to change based on the states</td></tr><tr><td><code><a href="#addAppearanceListeners">addAppearanceListeners</a></code></td><td>This adds event listeners to the component so that the interactive appearance states are applied as needed.</td></tr><tr><td><code><a href="#addCssRule">addCssRule</a></code></td><td>Adds a CSS rule to the document</td></tr><tr><td><code><a href="#addState">addState</a></code></td><td>Adds a pseudo state to the appearance for the given component. For example adding "active" to the component will result in taking the look of an active appearance the next time <code><a href="#applyAppearance">applyAppearance</a></code> is called.</td></tr><tr><td><code><a href="#addTheme">addTheme</a></code></td><td>Adds a theme to the theme manager</td></tr><tr><td><code><a href="#applyAppearance">applyAppearance</a></code></td><td>Updates the appearance of the given component. This basically updates the CSS class name to reflect the current state.</td></tr><tr><td><code><a href="#getAppearanceStates">getAppearanceStates</a></code></td><td>This returns the states that the appearance supports</td></tr><tr><td><code><a href="#getAppearanceTag">getAppearanceTag</a></code></td><td>This returns a string that is added to the CSS class name for the element representing a component.</td></tr><tr><td><code><a href="#getCurrentState">getCurrentState</a></code></td><td>Returns the current state of the component</td></tr><tr><td><code><a href="#getHasInteractiveTheme">getHasInteractiveTheme</a></code></td><td>This returns true if the given component has any interactive appearance states</td></tr><tr><td><code><a href="#getThemeStates">getThemeStates</a></code></td><td>This returns a hash (Object) containing the names of the interactive appearance states that the component has.</td></tr><tr><td><code><a href="#removeAppearanceListeners">removeAppearanceListeners</a></code></td><td>This removes event listeners from the component so that the interactive appearance states are no longer automaticallye applied.</td></tr><tr><td><code><a href="#removeCssRule">removeCssRule</a></code></td><td>Removes all CSS rule that matches the given selector</td></tr><tr><td><code><a href="#removeState">removeState</a></code></td><td>Removes a pseudo state to the appearance for the given component.</td></tr><tr><td><code><a href="#removeTheme">removeTheme</a></code></td><td>Removes a theme from the theme manager</td></tr><tr><td><code><a href="#setAppearance">setAppearance</a></code></td><td>Makes the component use a certain appearance</td></tr><tr><td><code><a href="#setClassAppearance">setClassAppearance</a></code></td><td>Makes all component of this class use a certain appearance</td></tr><tr><td><code><a href="#setStateValue">setStateValue</a></code></td><td>Adds or removes a pseudo state from the appearance for the given component.</td></tr></tbody></table><h2>Events</h2><table><thead><tr><td>Name</td><td>Type</td><td class="bubbles-header">Bubbles</td><td>Descripton</td></tr></thead><tbody><tr><td><a name="themechanged"></a><code>themechanged</code></td><td><code class="type">				<code><a href="BiEvent.html">BiEvent</a></code>			</code></td><td class="bubbles-column"></td><td>This event is fired when the <code><a href="#defaultTheme">default 									theme</a></code> changes.</td></tr></tbody></table><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="addAppearance"></a>addAppearance</h3><p>This assigns the appearance to a component and adds event listeners that allows the look and feel to change based on the states</p><h4>Syntax</h4><pre class="method-syntax">object.addAppearance(<span class="methodArgument">oComp</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>oComp</code></td><td><code class="type">						<code><a href="BiComponent.html">BiComponent</a></code>					</code></td><td class="optional-column"></td><td></td><td>The component to set the appearance on</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="addAppearanceListeners"></a>addAppearanceListeners</h3><p>This adds event listeners to the component so that the interactive appearance states are applied as needed.</p><h4>Syntax</h4><pre class="method-syntax">object.addAppearanceListeners(<span class="methodArgument">oComp</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>oComp</code></td><td><code class="type">						<code><a href="BiComponent.html">BiComponent</a></code>					</code></td><td class="optional-column"></td><td></td><td>The component to add the event listeners to</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="addCssRule"></a>addCssRule</h3><p>Adds a CSS rule to the document</p><h4>Syntax</h4><pre class="method-syntax">object.addCssRule(<span class="methodArgument">sSelector</span>, <span class="methodArgument">sStyle</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>sSelector</code></td><td><code class="type">String</code></td><td class="optional-column"></td><td></td><td>The selector describing which elements the rule 								applies to</td></tr><tr><td><code>sStyle</code></td><td><code class="type">String</code></td><td class="optional-column"></td><td></td><td>The CSS text describing the style of the rule.</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="addState"></a>addState</h3><p>Adds a pseudo state to the appearance for the given component. For example adding "active" to the component will result in taking the look of an active appearance the next time <code><a href="#applyAppearance">applyAppearance</a></code> is called.</p><h4>Syntax</h4><pre class="method-syntax">object.addState(<span class="methodArgument">oComp</span>, <span class="methodArgument">sPseudo</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>oComp</code></td><td><code class="type">						<code><a href="BiComponent.html">BiComponent</a></code>					</code></td><td class="optional-column"></td><td></td><td>The component to add the appearance state to</td></tr><tr><td><code>sPseudo</code></td><td><code class="type">String</code></td><td class="optional-column"></td><td></td><td>The pseudo state to add to the appearance</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="addTheme"></a>addTheme</h3><p>Adds a theme to the theme manager</p><h4>Syntax</h4><pre class="method-syntax">object.addTheme(<span class="methodArgument">oTheme</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>oTheme</code></td><td><code class="type">						<code><a href="BiTheme.html">BiTheme</a></code>					</code></td><td class="optional-column"></td><td></td><td>The theme object to add</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="applyAppearance"></a>applyAppearance</h3><p>Updates the appearance of the given component. This basically updates the CSS class name to reflect the current state.</p><h4>Syntax</h4><pre class="method-syntax">object.applyAppearance(<span class="methodArgument">oComp</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>oComp</code></td><td><code class="type">						<code><a href="BiComponent.html">BiComponent</a></code>					</code></td><td class="optional-column"></td><td></td><td>The component to apply the appearance to.</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="getAppearanceStates"></a>getAppearanceStates</h3><p>This returns the states that the appearance supports</p><h4>Syntax</h4><pre class="method-syntax">object.getAppearanceStates(<span class="methodArgument">sName</span>)</pre><h4>Parameters</h4><table><thead>

⌨️ 快捷键说明

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