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

📄 bioptionpane.html

📁 在流览器上仿CS界面的JAVASCRIPT脚本
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!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>BiOptionPane</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="BiOptionPane">BiOptionPane</h1>
<p>
		This class is used to layout default dialog controls. Normally this class
		is not used directly but one of the static methods are used to create
		new dialogs.
	</p>
<p>This class extends
		<code><a href="BiComponent.html">BiComponent</a></code>
		and therefore all methods and fields available for
		<code><a href="BiComponent.html">BiComponent</a></code>
		are also available for <code>BiOptionPane</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><a href="BiComponent.html">BiComponent</a></code><ul><li><code>BiOptionPane</code><ul id="api-derived-classes"></ul></li></ul></li></ul></li></ul>
</li>
</ul>
<h2>Constructor</h2>
<p><code>

	new BiOptionPane(<span class="methodArgument">oMessage</span> [, <span class="methodArgument">sMessageType</span> [, <span class="methodArgument">sOptionType</span> [, <span class="methodArgument">oImage</span> [, <span class="methodArgument">oOptions</span> [, <span class="methodArgument">oInitialValue</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>oMessage</code></td>
<td><code class="type">Object</code></td>
<td class="optional-column"></td>
<td></td>
<td>
				The text or <code><a href="BiComponent.html">BiComponent</a></code> to show
				as a message inside the dialog
			</td>
</tr>
<tr>
<td><code>sMessageType</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td><code>plain</code></td>
<td>
				The type of the message that is shown. This sets the image on
				the option pane if no other image is provided. Valid values are:<br>
				<br>
				plain - No image<br>
				error - Shows a stop (x) image<br>
				information - Shows an image with an 'i' on<br>
				warning - Shows an image with an exclamation mark on<br>
				question - Show a question mark image
			</td>
</tr>
<tr>
<td><code>sOptionType</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td><code>default</code></td>
<td>
				The option type describes what buttons to show on the optinon pane.
				This is ignored if the <code><a href="#options">options</a></code> are set. Valid values are:<br>
				<br>
				default - Usually shows an "OK" button<br>
				yesno - Shows a "Yes" and a "No" button<br>
				yesnocancel - Shows three buttons with the text "Yes", "No" and "Cancel"<br>
				okcancel - Shows an "OK" and a "Cancel" button
			</td>
</tr>
<tr>
<td><code>oImage</code></td>
<td><code class="type"><code><a href="BiImage.html">BiImage</a></code></code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td></td>
<td>
				The image to show on the option pane. If left out then the image
				defined by the <code><a href="#messageType">messageType</a></code> is used.
			</td>
</tr>
<tr>
<td><code>oOptions</code></td>
<td><code class="type">Object[]</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td></td>
<td>
				This describes what options/buttons to show on the option pane.
				This is an array of objects and if the object is a
				<code><a href="BiComponent.html">BiComponent</a></code> then it is added as
				it is. If not, a new button is created where the text is taken
				by using the <code>toString</code> method on the object.
			</td>
</tr>
<tr>
<td><code>oInitialValue</code></td>
<td><code class="type">Object</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td></td>
<td>
				This is used to define which of the options that should be treated
				as the default <code><a href="#acceptButton">acceptButton</a></code>
			</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="acceptButton"></a><code>acceptButton</code></td>
<td><code class="type"><code><a href="BiEvenTarget.html">BiEventTarget</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 button that acts as the default accept button. If this is set
				then the <code><a href="BiButton.html#action">action</a></code>
				event is dispatched from the accept button when the enter key
				is pressed. This does not have to
				be a <code><a href="BiButton.html">BiButton</a></code>, any
				<code><a href="BiEventTarget.html">BiEventTarget</a></code> will work.
			</td>
</tr>
<tr>
<td><a name="cancelButton"></a><code>cancelButton</code></td>
<td><code class="type"><code><a href="BiEvenTarget.html">BiEventTarget</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 button that acts as the default cancel button. If this is set
				then the <code><a href="BiButton.html#action">action</a></code>
				event is dispatched from the cancel button. This does not have to
				be a <code><a href="BiButton.html">BiButton</a></code>, any
				<code><a href="BiEventTarget.html">BiEventTarget</a></code> will work.
			</td>
</tr>
<tr>
<td><a name="dialog"></a><code>dialog</code></td>
<td><code class="type"><code><a href="BiDialog.html">BiDialog</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
				If a <code><a href="BiDialog.html">dialog</a></code> has been created from
				the option pane then this points to that <code><a href="BiDialog.html">dialog</a></code>.
			</td>
</tr>
<tr>
<td><a name="image"></a><code>image</code></td>
<td><code class="type"><code><a href="BiImage.html">BiImage</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
				The image that is shown on the option pane.
			</td>
</tr>
<tr>
<td><a name="initialValue"></a><code>initialValue</code></td>
<td><code class="type">Object</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>
				This is used to define which of the <code><a href="#options">options</a></code> that
				should be treated as the default <code><a href="#acceptButton">acceptButton</a></code>.
			</td>
</tr>
<tr>
<td><a name="inputComponent"></a><code>inputComponent</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>
				This allows an input component to be shown below the message
				component. This is created when creating <code><a href="#createInputDialog">input dialogs</a></code>.
			</td>
</tr>
<tr>
<td><a name="message"></a><code>message</code></td>
<td><code class="type">Object</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
				The object used to show the message on the dialog. If the message
				is a <code><a href="BiComponent.html">BiComponent</a></code> then it is shown
				as it is, otherwise a <code><a href="BiLabel.html">BiLabel</a></code> is
				created using the <code><a href="#message">message</a></code> <code>toString</code> as
				the text.
			</td>
</tr>
<tr>
<td><a name="messageType"></a><code>messageType</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 type of the message that is shown. This sets the image on
				the option pane if no other image is provided. Valif values are:<br>
				<br>
				plain - No image<br>
				error - Shows a stop (x) image<br>
				information - Shows an image with an 'i' on<br>
				warning - Shows an image with an exclamation mark on<br>
				question - Show a question mark image
			</td>
</tr>
<tr>
<td><a name="options"></a><code>options</code></td>
<td><code class="type">Object[]</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
				This describes what option buttons to show on the option pane.
				This is an array of objects and if the object is a
				<code><a href="BiComponent.html">BiComponent</a></code> then it is added as
				it is. If not, a new <code><a href="BiButon.html">BiButon</a></code> is
				created where the text is taken by using the <code>toString</code>
				method on the object.
			</td>
</tr>
<tr>
<td><a name="optionType"></a><code>optionType</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 option type describes what buttons to show on the optinon pane.
				This is ignored if the <code><a href="#options">options</a></code> are set. Valif values are:<br>
				<br>
				default - Usually shows an "OK" button<br>
				yesno - Shows a "Yes" and a "No" button<br>
				yesnocancel - Shows three buttons with the text "Yes", "No" and "Cancel"<br>
				okcancel - Shows an "OK" and a "Cancel" button
			</td>
</tr>
<tr>
<td><a name="value"></a><code>value</code></td>
<td><code class="type">Object</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 value of the option pane. This is used as the
				<code><a href="BiDialog.html#dialogResult">dialogResult</a></code>
				when the option pane is used with a <code><a href="BiDialog.html">dialog</a></code>.
			</td>
</tr>
</tbody>
</table>
<h2>Methods</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="#createDialog">createDialog</a></code></td>
<td>
				This creates a <code><a href="BiDialog.html">dialog</a></code> where the
				option pane is used as the <code><a href="BiWindow.html#contentPane">contentPane</a></code>.
			</td>
</tr>
</tbody>
</table>
<h2>Events</h2>
<p>None.</p>
<h2>Static Methods</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="#createConfirmDialog">createConfirmDialog</a></code></td>
<td>
				Creates a new <code><a href="BiDialog.html">BiDialog</a></code> with a
				option pane as the <code><a href="BiWindow.html#contentPane">contentPane</a></code>
				of the dialog window.<br>
				<br>
				This dialog is used to ask the user to confirm something. The
				buttons shown are set by the <code><a href="#optionType">optionType</a></code>.<br>
				<br>
				The <code><a href="BiDialog.html#dialogResult">returnValue</a></code>
				for the dialog reflects the button clicked. The values are:<br>
				<br>

⌨️ 快捷键说明

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