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