public static enum Dialog.ModalityType extends Enum<Dialog.ModalityType>
ModalityTypeenum specifies modal types and their associated scopes.
|Enum Constant and Description|
|Modifier and Type||Method and Description|
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final Dialog.ModalityType MODELESS
MODELESSdialog doesn't block any top-level windows.
public static final Dialog.ModalityType DOCUMENT_MODAL
DOCUMENT_MODALdialog blocks input to all top-level windows from the same document except those from its own child hierarchy. A document is a top-level window without an owner. It may contain child windows that, together with the top-level window are treated as a single solid document. Since every top-level window must belong to some document, its root can be found as the top-nearest window without an owner.
public static final Dialog.ModalityType APPLICATION_MODAL
APPLICATION_MODALdialog blocks all top-level windows from the same Java application except those from its own child hierarchy. If there are several applets launched in a browser, they can be treated either as separate applications or a single one. This behavior is implementation-dependent.
public static final Dialog.ModalityType TOOLKIT_MODAL
TOOLKIT_MODALdialog blocks all top-level windows run from the same toolkit except those from its own child hierarchy. If there are several applets launched in a browser, all of them run with the same toolkit; thus, a toolkit-modal dialog displayed by an applet may affect other applets and all windows of the browser instance which embeds the Java runtime environment for this toolkit. Special
AWTPermission"toolkitModality" must be granted to use toolkit-modal dialogs. If a
TOOLKIT_MODALdialog is being created and this permission is not granted, a
SecurityExceptionwill be thrown, and no dialog will be created. If a modality type is being changed to
TOOLKIT_MODALand this permission is not granted, a
SecurityExceptionwill be thrown, and the modality type will be left unchanged.
public static Dialog.ModalityType values()
for (Dialog.ModalityType c : Dialog.ModalityType.values()) System.out.println(c);
public static Dialog.ModalityType valueOf(String name)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.