author | serb |
Thu, 31 May 2018 09:52:32 -0700 | |
changeset 50358 | 1ba28f0dbc33 |
parent 48264 | efda6932a433 |
child 52831 | 4e9739110cf1 |
permissions | -rw-r--r-- |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
1 |
<!doctype html> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
2 |
<html lang="en"> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
3 |
<head> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
4 |
<meta charset="utf-8"/> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
5 |
<title>The AWT Modality</title> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
6 |
</head> |
2 | 7 |
<!-- |
50358 | 8 |
Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. |
2 | 9 |
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
10 |
||
11 |
This code is free software; you can redistribute it and/or modify it |
|
12 |
under the terms of the GNU General Public License version 2 only, as |
|
5506 | 13 |
published by the Free Software Foundation. Oracle designates this |
2 | 14 |
particular file as subject to the "Classpath" exception as provided |
5506 | 15 |
by Oracle in the LICENSE file that accompanied this code. |
2 | 16 |
|
17 |
This code is distributed in the hope that it will be useful, but WITHOUT |
|
18 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
19 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
20 |
version 2 for more details (a copy is included in the LICENSE file that |
|
21 |
accompanied this code). |
|
22 |
||
23 |
You should have received a copy of the GNU General Public License version |
|
24 |
2 along with this work; if not, write to the Free Software Foundation, |
|
25 |
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
26 |
||
5506 | 27 |
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
28 |
or visit www.oracle.com if you need additional information or have any |
|
29 |
questions. |
|
2 | 30 |
--> |
31 |
||
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
32 |
<body> |
50358 | 33 |
<main role="main"> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
34 |
<h1>The AWT Modality</h1> |
2 | 35 |
|
36 |
<p> |
|
37 |
This document, together with the API documentation for modality-related |
|
38 |
classes (such as <code>java.awt.Dialog</code>), briefly describes the new |
|
39 |
modality features and how to use them. It contains the following sections: |
|
40 |
</p><ul> |
|
41 |
<li><a href="#Definitions">Definitions</a></li> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
42 |
<li><a href="#ModalityTypes">Modality types</a></li> |
2 | 43 |
<li><a href="#ShowHideBlocking">Show/hide blocking</a></li> |
44 |
<li><a href="#ModalExclusion">Modal exclusion</a></li> |
|
45 |
<li><a href="#Related">Related AWT features</a></li> |
|
46 |
<li><a href="#Security">Security</a></li> |
|
47 |
<li><a href="#PlatformSupport">Platform support</a></li> |
|
48 |
<li><a href="#Compatibility">Compatibility</a></li> |
|
49 |
<li><a href="#Examples">Examples</a></li> |
|
50 |
</ul> |
|
51 |
||
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
52 |
<a id="Definitions"></a> |
50358 | 53 |
<h2>Definitions</h2> |
2 | 54 |
|
55 |
<p> |
|
56 |
<u>Document</u> - a window without an owner that, together with |
|
57 |
all its child hierarchy, may be operated on as a single self-contained |
|
58 |
document. |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
59 |
Every window belongs to some document — its root can be found as |
2 | 60 |
the closest ancestor window without an owner. |
61 |
</p><p> |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
62 |
<a id="ModalBlocked"></a> |
2 | 63 |
<u>Modal blocked window</u> - a window, that: |
64 |
</p><ul> |
|
65 |
<li>doesn't receive any user input events |
|
66 |
</li><li>doesn't receive input focus |
|
67 |
</li><li>keeps its Z-order below the modal dialog that blocks it |
|
68 |
</li></ul> |
|
69 |
<blockquote> |
|
70 |
<hr> |
|
71 |
<b>Warning!</b> Some window managers allow users to change the window |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
72 |
Z-order in an arbitrary way — in that case the last requirement |
2 | 73 |
may not be met. |
74 |
<hr> |
|
75 |
</blockquote> |
|
76 |
<p> |
|
77 |
<u>Modal dialog</u> - a dialog that blocks some windows while it is |
|
78 |
visible. The blocked windows are determined according to the dialog's |
|
79 |
scope of blocking. |
|
80 |
</p><p> |
|
81 |
<u>Modal excluded window</u> - a window that stays unblocked |
|
82 |
while the modal dialog is visible. If a window is modal excluded |
|
83 |
then all its owned windows and child components are also excluded. |
|
84 |
</p><p> |
|
85 |
<u>Scope of blocking (SB)</u> - the set of windows (instances of |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
86 |
<code>java.awt.Window</code> and all derived classes) that are blocked by |
2 | 87 |
the modal dialog while it is visible. |
88 |
<blockquote><hr> |
|
89 |
<b>Note</b>: Everywhere in this document the notion of "window" is equal |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
90 |
to a top-level window in the Java programming language — in other words |
2 | 91 |
an instance of <code>java.awt.Window</code> or any descendant class. |
92 |
<hr></blockquote> |
|
93 |
||
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
94 |
<a id="ModalityTypes"></a> |
50358 | 95 |
<h2>Modality types</h2> |
2 | 96 |
|
97 |
<p> |
|
98 |
There are four supported modality types : |
|
99 |
</p><ul> |
|
100 |
<li>toolkit |
|
101 |
</li><li>application |
|
102 |
</li><li>document |
|
103 |
</li><li>modeless |
|
104 |
</li></ul> |
|
105 |
A dialog is, by default, modeless. A modal dialog is, by default, |
|
106 |
application-modal. |
|
29882 | 107 |
<ol> |
2 | 108 |
<li><u>Modeless dialogs</u><br> |
109 |
A modeless dialog doesn't block any windows while visible. |
|
110 |
</li><li><u>Document-modal dialogs</u><br> |
|
111 |
A document-modal dialog blocks all windows from the same |
|
112 |
document except those from its child hierarchy. The document root |
|
113 |
is determined as the closest ancestor window without an |
|
114 |
owner. |
|
115 |
</li><li><u>Application-modal dialogs</u><br> |
|
116 |
An application-modal dialog blocks all windows from the same |
|
117 |
application except for those from its child hierarchy. |
|
118 |
If there are several applets launched in a browser, they can be |
|
119 |
treated either as separate applications or a single application. |
|
120 |
This behavior is implementation-dependent. |
|
121 |
</li><li><u>Toolkit-modal dialogs</u><br> |
|
122 |
A toolkit-modal dialog blocks all windows that run in the same |
|
123 |
toolkit except those from its child hierarchy. If there |
|
124 |
are several applets launched all of them run with the same toolkit, |
|
125 |
so a toolkit-modal dialog shown from an applet may affect other |
|
126 |
applets and all windows of the browser instance which embeds the |
|
127 |
Java runtime environment for this toolkit. |
|
128 |
See the security section below. |
|
129 |
</li></ol> |
|
130 |
<p> |
|
131 |
Modality priority is arranged by the strength of blocking: modeless, |
|
132 |
document-modal, application-modal and toolkit-modal. This arrangement |
|
133 |
is used when determining what dialog should remain unblocked if two |
|
134 |
are visible and block each other. It naturally reflects the nesting |
|
135 |
of a dialog's scope of blocking (SB): a modeless dialog has an empty SB, |
|
136 |
a document-modal dialog's SB is complete in some applications, |
|
137 |
and all the applications are run in one toolkit. </p><p> |
|
138 |
Notes about owners: |
|
139 |
</p><ul> |
|
140 |
<li>Creating a document-modal dialog without an owner:<br> |
|
141 |
Since <code>Dialog</code> is a class derived from |
|
142 |
<code>Window</code>, a <code>Dialog</code> instance automatically |
|
143 |
becomes the root of the document if it has no owner. Thus, if |
|
144 |
such a dialog is document-modal, its scope of blocking is empty |
|
145 |
and it behaves the same way as a modeless dialog. |
|
146 |
</li><li>Creating an application-modal or toolkit-modal dialog with an |
|
147 |
owner:<br> |
|
148 |
The scope of blocking for an application- or toolkit-modal |
|
149 |
dialog, as opposed to a document-modal dialog, doesn't depend on |
|
150 |
its owner. Thus, in this case the only thing that the owner |
|
151 |
affects is the Z-order: the dialog always stays on top of its owner. |
|
152 |
</li></ul> |
|
153 |
<blockquote><hr> |
|
154 |
<b>Implementation note</b>: Changing the modality type for a visible |
|
155 |
dialog may have no effect until it is hidden and then shown again. |
|
156 |
<hr></blockquote> |
|
157 |
||
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
158 |
<a id="ShowHideBlocking"></a> |
50358 | 159 |
<h2>Show/hide blocking</h2> |
2 | 160 |
|
161 |
<p> |
|
162 |
<u>Showing the window or modeless dialog: "F"</u><br> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
163 |
All the visible modal dialogs are looked through — if F is from the SB |
2 | 164 |
of one of them, it becomes blocked by it. If there are several such |
165 |
dialogs, the first shown is used. If no such dialogs exist, F remains |
|
166 |
unblocked. |
|
167 |
</p><p> |
|
168 |
<u>Showing the modal dialog: "M"</u><br> |
|
169 |
When modal dialog M is shown, all the visible windows fall into one of |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
170 |
three distinct groups: |
2 | 171 |
<ul> |
172 |
<li>Blockers of M (modal dialogs that block M and |
|
173 |
either are in M's child hierarchy, or are not blocked by M, or have |
|
174 |
a greater mode of modality, or block some other blocker of M) |
|
175 |
<li>Blocked by M (windows from M's SB that are not blockers and are |
|
176 |
not in child hierarchy of any blocker) |
|
177 |
<li>All other windows (windows or modeless |
|
178 |
dialogs outside M's SB and modal dialogs outside M's SB that do not |
|
179 |
block M). |
|
180 |
</ul> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
181 |
<p> |
2 | 182 |
After the modal dialog M is shown, it becomes blocked by the first shown |
183 |
dialog from the first group (if there are any), all the windows from the |
|
184 |
second one become blocked by M, and all the windows from the third group |
|
185 |
remain untouched. |
|
186 |
</p><p> |
|
187 |
<u>In typical cases</u>, when no child dialogs are shown before their owners, |
|
188 |
this rule can be simplified. (The following, simplified case, may |
|
189 |
leave out some details). |
|
190 |
</p><p> |
|
191 |
<u>Showing the document-modal dialog: "M"</u><br> |
|
192 |
All the visible application- and toolkit-modal dialogs are looked |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
193 |
through — if M is from the SB of one of them, |
2 | 194 |
it becomes blocked by it. If there are several such dialogs, |
195 |
the first shown is used. If no such dialogs exist, M remains unblocked. |
|
196 |
</p><p> |
|
197 |
<u>Showing the application-modal dialog: "M"</u><br> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
198 |
All the visible toolkit-modal dialogs are looked through — |
2 | 199 |
if M is from the SB of one of them, it becomes blocked by it. |
200 |
If there are several such dialogs, the first shown is used. |
|
201 |
If no such dialogs exist, M remains unblocked. |
|
202 |
</p><p> |
|
203 |
<u>Showing the toolkit-modal dialog: "M"</u><br> |
|
204 |
M remains unblocked. |
|
205 |
</p><p> |
|
206 |
<!-- <center> --> |
|
207 |
</p> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
208 |
<table border="1"> |
2 | 209 |
<caption>The Standard Blocking Matrix</caption> |
210 |
<tbody><tr align="center"> |
|
211 |
<td align="center">current/shown</td> |
|
212 |
<td align="center">frame & modeless</td> |
|
213 |
<td align="center">document</td> |
|
214 |
<td align="center">application</td> |
|
215 |
<td align="center">toolkit</td> |
|
216 |
</tr> |
|
217 |
<tr align="center"> |
|
218 |
<td align="center">-</td> |
|
219 |
<td align="center">-</td> |
|
220 |
<td align="center">-</td> |
|
221 |
<td align="center">-</td> |
|
222 |
<td align="center">-</td> |
|
223 |
</tr> |
|
224 |
<tr align="center"> |
|
225 |
<td align="center">document</td> |
|
226 |
<td align="center">blocked</td> |
|
227 |
<td align="center">-</td> |
|
228 |
<td align="center">-</td> |
|
229 |
<td align="center">-</td> |
|
230 |
</tr> |
|
231 |
<tr align="center"> |
|
232 |
<td align="center">application</td> |
|
233 |
<td align="center">blocked</td> |
|
234 |
<td align="center">blocked</td> |
|
235 |
<td align="center">-</td> |
|
236 |
<td align="center">-</td> |
|
237 |
</tr> |
|
238 |
<tr align="center"> |
|
239 |
<td align="center">toolkit</td> |
|
240 |
<td align="center">blocked</td> |
|
241 |
<td align="center">blocked</td> |
|
242 |
<td align="center">blocked</td> |
|
243 |
<td align="center">-</td> |
|
244 |
</tr> |
|
245 |
</tbody></table> |
|
246 |
<!-- </center> --> |
|
247 |
<p> |
|
248 |
After the modal dialog is shown, all the windows from its SB are blocked, |
|
249 |
except those that block this modal dialog. |
|
250 |
</p><p> |
|
251 |
<u>Hiding the window or modeless dialog: "F"</u><br> |
|
252 |
If F was blocked by any modal dialog M, it becomes unblocked and is |
|
253 |
removed from M's blocked windows list. |
|
254 |
</p><p> |
|
255 |
<u>Hiding the modal dialog: "M"</u><br> |
|
256 |
If M was blocked by any other modal dialog, for example, "N", |
|
257 |
it becomes unblocked and |
|
258 |
is removed from N's blocked windows list. Then, all the windows and dialogs |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
259 |
blocked by M become unblocked, and after that the same checks |
2 | 260 |
(as in Showing the modal dialog: "M") |
261 |
are performed for each of them in the order they were initially shown. |
|
262 |
||
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
263 |
<a id="ModalExclusion"></a> |
50358 | 264 |
</p><h2>Modal exclusion</h2> |
2 | 265 |
|
266 |
<p> |
|
267 |
There are two modal exclusion types introduced as of JDK 6 |
|
268 |
</p><ul> |
|
269 |
<li>Exclusion from blocking of toolkit-modal dialogs |
|
270 |
</li><li>Exclusion from blocking of application-modal dialogs |
|
271 |
</li></ul> |
|
272 |
By default, a window's modal exclusion property is turned off. |
|
29882 | 273 |
<ol> |
2 | 274 |
<li><u>Application-modal exclusion</u><br> |
275 |
If a window is application-modal excluded, it is not blocked by any |
|
276 |
application-modal dialogs. Also, it is not blocked by document-modal |
|
277 |
dialogs from outside of its child hierarchy. |
|
278 |
</li><li><u>Toolkit-modal exclusion</u><br> |
|
279 |
If a window is toolkit-modal excluded, it is not blocked |
|
280 |
by any application- or toolkit-modal dialogs. Also, it is not |
|
281 |
blocked by document-modal dialogs from outside of their child hierarchy. |
|
282 |
</li></ol> |
|
283 |
<blockquote> |
|
284 |
<hr> |
|
285 |
<b>Implementation note</b>: Changing the modal exclusion type for a visible window |
|
286 |
may have no effect until it is hidden and then shown again. |
|
287 |
</blockquote> |
|
288 |
||
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
289 |
<a id="Related"></a> |
50358 | 290 |
<h2>Related AWT features</h2> |
2 | 291 |
|
292 |
<p> |
|
293 |
<u>Always-On-Top</u><br> |
|
294 |
When a modal dialog that is not always-on-top blocks an always-on-top window, |
|
295 |
their relative Z-order is unspecified and platform-dependent. |
|
296 |
</p> |
|
297 |
<p> |
|
298 |
<u>The <code>toFront()</code> and <code>toBack()</code> methods</u><br> |
|
299 |
A modal dialog should always be above all its blocked windows. Thus, if a blocked |
|
300 |
window is brought to the front, its blocking dialog, if any, is also brought to the |
|
301 |
front and remains above the blocked window. Likewise, if a modal dialog is sent to |
|
302 |
the back, all of its blocked windows are sent to the back to keep them below the |
|
303 |
blocking dialog. |
|
304 |
</p> |
|
305 |
<p> |
|
306 |
<u>Minimizing, maximizing and closing blocked windows</u><br> |
|
307 |
When a modal dialog blocks a window, the user may not be able to maximize or |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
308 |
minimize the blocked window— however, the actual behavior is unspecified |
2 | 309 |
and platform-dependent. In any case, the user can't close the blocked window |
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
310 |
interactively— but it can be closed programmatically by calling the |
2 | 311 |
<code>setVisible(false)</code> or <code>dispose()</code> methods on the blocked |
312 |
window. |
|
313 |
</p> |
|
314 |
<p> |
|
315 |
<u>Blocked windows activations</u><br> |
|
316 |
When the user selects a blocked window, it may be brought to the front, along |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
317 |
with the blocking modal dialog which would then become the active window— |
2 | 318 |
however, the actual behavior is unspecified and platform-dependent. |
319 |
</p> |
|
320 |
<p> |
|
321 |
<u>Hiding a modal dialog</u><br> |
|
322 |
When the modal dialog that currently has focus is hidden, it is unspecified |
|
323 |
and platform-dependent, which other window will become the active window. |
|
324 |
Any of the following may become the active window: |
|
325 |
<ol> |
|
326 |
<li>The owner of the modal dialog - if the owner is unblocked. |
|
327 |
</li><li>The <code>Window</code>, which was active before this modal dialog gained |
|
328 |
focus - if the owner of the modal dialog is absent or is blocked. |
|
329 |
</li></ol> |
|
330 |
If the modal dialog to be hidden does not have focus, the active window remains |
|
331 |
unchanged. |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
332 |
|
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
333 |
<a id="Security"></a> |
50358 | 334 |
<h2>Security</h2> |
2 | 335 |
|
336 |
<p> |
|
337 |
A special <code>AWTPermission</code>, <code>"toolkitModality"</code>, |
|
338 |
is required to show toolkit-modal |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
339 |
dialogs. This would prevent, for example, blocking a browser or |
2 | 340 |
Java Web Start (JWS) by modal dialogs shown from applets. |
341 |
</p><p> |
|
342 |
The same permission is required to exclude a window from toolkit modality. |
|
343 |
This would prevent, for example, a dialog shown from an applet not to be |
|
344 |
blocked by a browser's or JWS's modal dialog. |
|
345 |
||
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
346 |
<a id="PlatformSupport"></a> |
50358 | 347 |
</p><h2>Platform support</h2> |
2 | 348 |
|
349 |
<p> |
|
350 |
Two <code>java.awt.Toolkit</code> methods allow you to check whether |
|
351 |
the current platform supports specific modality features: |
|
352 |
</p><ul> |
|
353 |
<li><code>isModalityTypeSupported(modalityType)</code><br> |
|
354 |
Returns whether the specified modality type is supported on |
|
355 |
the current platform. |
|
356 |
If mode "M" is not supported and a dialog is set to M-modal, |
|
357 |
it behaves as modeless. |
|
358 |
</li> |
|
359 |
<li><code>isModalExclusionTypeSupported(modalExclusionType)</code><br> |
|
360 |
Returns whether the given modal exclusion type is supported on |
|
361 |
the current platform. If exclusion type "E" is not supported |
|
362 |
and a window is marked as E-excluded, this has no effect. |
|
363 |
</li></ul> |
|
364 |
||
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
365 |
<a id="Compatibility"></a> |
50358 | 366 |
<h2>Compatibility</h2> |
2 | 367 |
|
368 |
<p> |
|
369 |
The default modality type is application-modal. It is used by the API |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
370 |
calls: <code>Dialog.setModal(true)</code>, |
2 | 371 |
<code>Dialog(owner, true)</code>, etc. Prior to JDK 6 |
372 |
the default type was toolkit-modal, |
|
373 |
but the only distinction between application- and toolkit-modality is for |
|
374 |
applets and applications launched from Java Web Start. |
|
375 |
||
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
376 |
<a id="Examples"></a> |
50358 | 377 |
</p><h2>Examples</h2> |
2 | 378 |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
379 |
<table border="0"> |
2 | 380 |
<tbody><tr> |
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
381 |
<td align="left" > |
2 | 382 |
<ol> |
383 |
<li>Frame "F" is shown<br> |
|
384 |
<li>Document-modal dialog "D<sub>i</sub>" is shown<br> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
385 |
<li>F becomes blocked by D<sub>i</sub> — it's in the same document<br> |
2 | 386 |
<li>Document-modal dialog "D<sub>ii</sub>" is shown<br> |
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
387 |
<li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> — it's in the |
2 | 388 |
same document<br> |
389 |
</ol> |
|
390 |
<br> |
|
391 |
</td> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
392 |
<td align="center"> |
29882 | 393 |
<img src="modal-example1.gif" alt="Example 1"> |
2 | 394 |
<br> |
395 |
</td> |
|
396 |
</tr> |
|
397 |
<tr> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
398 |
<td align="left"> |
2 | 399 |
<ol> |
400 |
<li>Frame "F" is shown<br> |
|
401 |
<li>Document-modal dialog "D<sub>i</sub>" is shown<br> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
402 |
<li>F becomes blocked by D<sub>i</sub> — it's in the same document<br> |
2 | 403 |
<li>Document-modal dialog "D<sub>ii</sub>" is shown<br> |
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
404 |
<li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> — |
2 | 405 |
it's in the same document<br> |
406 |
<li>D<sub>i</sub> is hidden<br> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
407 |
<li>F becomes blocked by D<sub>ii</sub> — it's in the same document<br> |
2 | 408 |
</ol> |
409 |
<br> |
|
410 |
</td> |
|
411 |
<td align="center"> |
|
29882 | 412 |
<img src="modal-example2.gif" alt="Example 2"> |
2 | 413 |
<br> |
414 |
</td> |
|
415 |
</tr> |
|
416 |
<tr> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
417 |
<td align="left"> |
2 | 418 |
<ol> |
419 |
<li>Frame "F" is shown<br> |
|
420 |
<li>Toolkit-modal dialog "D<sub>i</sub>" is created, but not shown<br> |
|
421 |
<li>Document-modal dialog "D<sub>ii</sub>" is shown<br> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
422 |
<li>F becomes blocked by D<sub>ii</sub> — it's in the same document<br> |
2 | 423 |
<li>Application-modal dialog "D<sub>iii</sub>" is shown<br> |
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
424 |
<li>D<sub>ii</sub> becomes blocked by D<sub>iii</sub> — |
2 | 425 |
it's in the same application<br> |
426 |
<li>D<sub>i</sub> is shown<br> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
427 |
<li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> — it's its owner<br> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47216
diff
changeset
|
428 |
<li>D<sub>iii</sub> remains unblocked — it blocks D<sub>ii</sub> and |
2 | 429 |
D<sub>ii</sub> blocks D<sub>i</sub><br> |
430 |
</ol> |
|
431 |
<br> |
|
432 |
</td> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
433 |
<td align="center"> |
29882 | 434 |
<img src="modal-example3.gif" alt="Example 3"> |
2 | 435 |
<br> |
436 |
</td> |
|
437 |
</tr> |
|
438 |
<tr> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
439 |
<td align="left"> |
2 | 440 |
<ol> |
441 |
<li>Frame "F" is shown<br> |
|
442 |
<li>Toolkit-modal dialog "D<sub>i</sub>" is created, but not shown<br> |
|
443 |
<li>Document-modal dialog "D<sub>ii</sub>" is shown<br> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
444 |
<li>F becomes blocked by D<sub>ii</sub> — it's in the same document<br> |
2 | 445 |
<li>Application-modal dialog "D<sub>iii</sub>" is shown<br> |
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
446 |
<li>D<sub>ii</sub> becomes blocked by D<sub>iii</sub> — it's in the |
2 | 447 |
same application<br> |
448 |
<li>D<sub>i</sub> is shown<br> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
449 |
<li>D<sub>iii</sub> becomes blocked by D<sub>i</sub> — D<sub>i</sub> |
2 | 450 |
is not blocked<br> |
451 |
<li>D<sub>i</sub> remains unblocked<br> |
|
452 |
</ol> |
|
453 |
<br> |
|
454 |
</td> |
|
21254
f6d36ee3f269
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents:
5506
diff
changeset
|
455 |
<td align="center"> |
29882 | 456 |
<img src="modal-example4.gif" alt="Example 4"> |
2 | 457 |
<br> |
458 |
</td> |
|
459 |
</tr> |
|
460 |
</tbody></table> |
|
50358 | 461 |
</main> |
2 | 462 |
</body></html> |