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