1 <!-- |
1 <!-- |
2 Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. |
2 Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. |
3 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
4 |
5 This code is free software; you can redistribute it and/or modify it |
5 This code is free software; you can redistribute it and/or modify it |
6 under the terms of the GNU General Public License version 2 only, as |
6 under the terms of the GNU General Public License version 2 only, as |
7 published by the Free Software Foundation. Oracle designates this |
7 published by the Free Software Foundation. Oracle designates this |
87 then all its owned windows and child components are also excluded. |
87 then all its owned windows and child components are also excluded. |
88 </p><p> |
88 </p><p> |
89 <u>Scope of blocking (SB)</u> - the set of windows (instances of |
89 <u>Scope of blocking (SB)</u> - the set of windows (instances of |
90 <code>java.awt.Window</code> and all derived classes) that are blocked by |
90 <code>java.awt.Window</code> and all derived classes) that are blocked by |
91 the modal dialog while it is visible. |
91 the modal dialog while it is visible. |
92 </p><p> |
|
93 <blockquote><hr> |
92 <blockquote><hr> |
94 <b>Note</b>: Everywhere in this document the notion of "window" is equal |
93 <b>Note</b>: Everywhere in this document the notion of "window" is equal |
95 to a top-level window in the Java programming language — in other words |
94 to a top-level window in the Java programming language — in other words |
96 an instance of <code>java.awt.Window</code> or any descendant class. |
95 an instance of <code>java.awt.Window</code> or any descendant class. |
97 <hr></blockquote> |
96 <hr></blockquote> |
107 </li><li>document |
106 </li><li>document |
108 </li><li>modeless |
107 </li><li>modeless |
109 </li></ul> |
108 </li></ul> |
110 A dialog is, by default, modeless. A modal dialog is, by default, |
109 A dialog is, by default, modeless. A modal dialog is, by default, |
111 application-modal. |
110 application-modal. |
112 <p> |
111 <ol> |
113 </p><ol> |
|
114 <li><u>Modeless dialogs</u><br> |
112 <li><u>Modeless dialogs</u><br> |
115 A modeless dialog doesn't block any windows while visible. |
113 A modeless dialog doesn't block any windows while visible. |
116 </li><li><u>Document-modal dialogs</u><br> |
114 </li><li><u>Document-modal dialogs</u><br> |
117 A document-modal dialog blocks all windows from the same |
115 A document-modal dialog blocks all windows from the same |
118 document except those from its child hierarchy. The document root |
116 document except those from its child hierarchy. The document root |
154 The scope of blocking for an application- or toolkit-modal |
152 The scope of blocking for an application- or toolkit-modal |
155 dialog, as opposed to a document-modal dialog, doesn't depend on |
153 dialog, as opposed to a document-modal dialog, doesn't depend on |
156 its owner. Thus, in this case the only thing that the owner |
154 its owner. Thus, in this case the only thing that the owner |
157 affects is the Z-order: the dialog always stays on top of its owner. |
155 affects is the Z-order: the dialog always stays on top of its owner. |
158 </li></ul> |
156 </li></ul> |
159 <p> |
|
160 <blockquote><hr> |
157 <blockquote><hr> |
161 <b>Implementation note</b>: Changing the modality type for a visible |
158 <b>Implementation note</b>: Changing the modality type for a visible |
162 dialog may have no effect until it is hidden and then shown again. |
159 dialog may have no effect until it is hidden and then shown again. |
163 <hr></blockquote> |
160 <hr></blockquote> |
164 |
161 |
275 </p><ul> |
272 </p><ul> |
276 <li>Exclusion from blocking of toolkit-modal dialogs |
273 <li>Exclusion from blocking of toolkit-modal dialogs |
277 </li><li>Exclusion from blocking of application-modal dialogs |
274 </li><li>Exclusion from blocking of application-modal dialogs |
278 </li></ul> |
275 </li></ul> |
279 By default, a window's modal exclusion property is turned off. |
276 By default, a window's modal exclusion property is turned off. |
280 <p> |
277 <ol> |
281 </p><ol> |
|
282 <li><u>Application-modal exclusion</u><br> |
278 <li><u>Application-modal exclusion</u><br> |
283 If a window is application-modal excluded, it is not blocked by any |
279 If a window is application-modal excluded, it is not blocked by any |
284 application-modal dialogs. Also, it is not blocked by document-modal |
280 application-modal dialogs. Also, it is not blocked by document-modal |
285 dialogs from outside of its child hierarchy. |
281 dialogs from outside of its child hierarchy. |
286 </li><li><u>Toolkit-modal exclusion</u><br> |
282 </li><li><u>Toolkit-modal exclusion</u><br> |
287 If a window is toolkit-modal excluded, it is not blocked |
283 If a window is toolkit-modal excluded, it is not blocked |
288 by any application- or toolkit-modal dialogs. Also, it is not |
284 by any application- or toolkit-modal dialogs. Also, it is not |
289 blocked by document-modal dialogs from outside of their child hierarchy. |
285 blocked by document-modal dialogs from outside of their child hierarchy. |
290 </li></ol> |
286 </li></ol> |
291 <p> |
|
292 <blockquote> |
287 <blockquote> |
293 <hr> |
288 <hr> |
294 <b>Implementation note</b>: Changing the modal exclusion type for a visible window |
289 <b>Implementation note</b>: Changing the modal exclusion type for a visible window |
295 may have no effect until it is hidden and then shown again. |
290 may have no effect until it is hidden and then shown again. |
296 </blockquote> |
291 </blockquote> |