bioptionpane.html

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

HTML
984
字号
 ok - The "OK" button was clicked<br>				 cancel - The "Cancel" button was clicked<br>				 yes - The "Yes" button was clicked<br>				 no  - The "No" button was clicked</td></tr><tr><td><code><a href="#createInputDialog">createInputDialog</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 allow the user to enter a text value. The default text value can be provided using the <code>sDefaultValue</code> argument. The buttons provided for these dialogs are always an "OK" and a "Cancel" button.<br>								<br>				 The <code><a href="BiDialog.html#dialogResult">returnValue</a></code> for the dialog reflects whether the user entered any value and pressed "OK" or pressed "Cancel". The value is <code>null</code> when the user canceled the dialog, otherwise the entered string value is used.</td></tr><tr><td><code><a href="#createMessageDialog">createMessageDialog</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 show a simple message. The iamge can either be set using the option type or by setting using the image argument.<br>								<br>				 The <code><a href="BiDialog.html#dialogResult">returnValue</a></code> for the dialog reflects the button clicked. The values are:<br>								<br>				 ok - The "OK" button was clicked<br>				 cancel - The "Cancel" button was clicked<br>				 yes - The "Yes" button was clicked<br>				 no  - The "No" button was clicked</td></tr><tr><td><code><a href="#createOptionDialog">createOptionDialog</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 show custom option buttons that the user can select between. The options argument should be used to define the buttons to use.<br>								<br>				 The <code><a href="BiDialog.html#dialogResult">returnValue</a></code> for the dialog reflects the button clicked. The value will be the object that the clicked button was created from.</td></tr><tr><td><code><a href="#getComponentFromObject">getComponentFromObject</a></code></td><td>Returns a component from the object. If the object is already a<code><a href="BiComponent.html">BiComponent</a></code> then it is returned as it is, otherwise a<code><a href="BiLabel.html">BiLabel</a></code> is created where the text on the label is the object <code>toString</code>.</td></tr><tr><td><code><a href="#getImageFromOptionType">getImageFromOptionType</a></code></td><td>Returns the<code><a href="BiImage.html">BiImage</a></code> derived from the option type string argument. Valid values for the argument string are the same as for the <code><a href="#optionType">optionType</a></code> property.</td></tr></tbody></table><h2>Static Fields</h2><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>BUTTONS_GAP</code></td><td><code class="type">Number</code></td><td>The distance between the option buttons</td></tr><tr><td><code>IMAGE_MESSAGE_GAP</code></td><td><code class="type">Number</code></td><td>The distance between the message and the image</td></tr><tr><td><code>MESSAGE_BUTTONS_GAP</code></td><td><code class="type">Number</code></td><td>The distance between the message/input component and the buttons</td></tr><tr><td><code>MESSAGE_INPUT_GAP</code></td><td><code class="type">Number</code></td><td>The gap distance between the message and the input component</td></tr><tr><td><code>PADDING_BOTTOM</code></td><td><code class="type">Number</code></td><td>The padding at the bottom edge</td></tr><tr><td><code>PADDING_LEFT</code></td><td><code class="type">Number</code></td><td>The padding at the left edge</td></tr><tr><td><code>PADDING_RIGHT</code></td><td><code class="type">Number</code></td><td>The padding at the right edge</td></tr><tr><td><code>PADDING_TOP</code></td><td><code class="type">Number</code></td><td>The padding at the top edge</td></tr></tbody></table><h2>Remarks</h2><p>When creating dialogs, beware that closing the dialog will dispose the 			option pane.<br>				<br>		          The labels for the buttons are provided by a<code><a href="BiStringBundle.html">BiStringBundle</a></code> and          the following keys are used:<br>				<br>		          OptionPaneYes<br>		          OptionPaneNo<br>		          OptionPaneOK<br>		          OptionPaneCancel<br>		          OptionPaneMessage<br>		          OptionPaneSelectAnOption<br>		          OptionPaneInput</p><h2>Method Details</h2><h3><a name="createDialog"></a>createDialog</h3><p>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>.</p><h4>Syntax</h4><pre class="method-syntax">object.createDialog([<span class="methodArgument">sCaption</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>sCaption</code></td><td><code class="type">String</code></td><td class="optional-column"><img src="check.png" alt="checked"></td><td></td><td>The caption text on the dialog window </td></tr></tbody></table><h4>Return Type</h4><p><code class="type">					<code><a href="BiDialog.html">BiDialog</a></code>				</code></p><h2>Static Method Details</h2><h3><a name="createConfirmDialog"></a>createConfirmDialog</h3><p>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>				 ok - The "OK" button was clicked<br>				 cancel - The "Cancel" button was clicked<br>				 yes - The "Yes" button was clicked<br>				 no  - The "No" button was clicked</p><h4>Syntax</h4><pre class="method-syntax">BiOptionPane.createConfirmDialog(<span class="methodArgument">oMessage</span> [, <span class="methodArgument">sCaption</span> [, <span class="methodArgument">sMessageType</span> [, <span class="methodArgument">sOptionType</span> [, <span class="methodArgument">oImage</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>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>sCaption</code></td><td><code class="type">String</code></td><td class="optional-column"><img src="check.png" alt="checked"></td><td><code>Select an Option</code></td><td>The caption text to show on the dialog window </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>question</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>yesnocancel</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></tbody></table><h4>Return Type</h4><p><code class="type">					<code><a href="BiDialog.html">BiDialog</a></code>				</code></p><h3><a name="createInputDialog"></a>createInputDialog</h3><p>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 allow the user to enter a text value. The default text value can be provided using the <code>sDefaultValue</code> argument. The buttons provided for these dialogs are always an "OK" and a "Cancel" button.<br>								<br>				 The <code><a href="BiDialog.html#dialogResult">returnValue</a></code> for the dialog reflects whether the user entered any value and pressed "OK" or pressed "Cancel". The value is <code>null</code> when the user canceled the dialog, otherwise the entered string value is used.</p><h4>Syntax</h4><pre class="method-syntax">BiOptionPane.createInputDialog(<span class="methodArgument">oMessage</span> [, <span class="methodArgument">sCaption</span> [, <span class="methodArgument">sMessageType</span> [, <span class="methodArgument">oImage</span>, <span class="methodArgument">sDefaultValue</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>

⌨️ 快捷键说明

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