- java.lang.Object
-
- java.lang.Enum<Dialog.ModalityType>
-
- java.awt.Dialog.ModalityType
-
- All Implemented Interfaces:
- Serializable, Comparable<Dialog.ModalityType>
- Enclosing class:
- Dialog
public static enum Dialog.ModalityType extends Enum<Dialog.ModalityType>
Modal dialogs block all input to some top-level windows. Whether a particular window is blocked depends on dialog's type of modality; this is called the "scope of blocking". TheModalityType
enum specifies modal types and their associated scopes.
-
-
Enum Constant Summary
Enum Constants Enum Constant and Description APPLICATION_MODAL
AnAPPLICATION_MODAL
dialog blocks all top-level windows from the same Java application except those from its own child hierarchy.DOCUMENT_MODAL
ADOCUMENT_MODAL
dialog blocks input to all top-level windows from the same document except those from its own child hierarchy.MODELESS
MODELESS
dialog doesn't block any top-level windows.TOOLKIT_MODAL
ATOOLKIT_MODAL
dialog blocks all top-level windows run from the same toolkit except those from its own child hierarchy.
-
Method Summary
Methods Modifier and Type Method and Description static Dialog.ModalityType
valueOf(String name)
Returns the enum constant of this type with the specified name.static Dialog.ModalityType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MODELESS
public static final Dialog.ModalityType MODELESS
MODELESS
dialog doesn't block any top-level windows.
-
DOCUMENT_MODAL
public static final Dialog.ModalityType DOCUMENT_MODAL
ADOCUMENT_MODAL
dialog 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.
-
APPLICATION_MODAL
public static final Dialog.ModalityType APPLICATION_MODAL
AnAPPLICATION_MODAL
dialog 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.
-
TOOLKIT_MODAL
public static final Dialog.ModalityType TOOLKIT_MODAL
ATOOLKIT_MODAL
dialog 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. SpecialAWTPermission
"toolkitModality" must be granted to use toolkit-modal dialogs. If aTOOLKIT_MODAL
dialog is being created and this permission is not granted, aSecurityException
will be thrown, and no dialog will be created. If a modality type is being changed toTOOLKIT_MODAL
and this permission is not granted, aSecurityException
will be thrown, and the modality type will be left unchanged.
-
-
Method Detail
-
values
public static Dialog.ModalityType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Dialog.ModalityType c : Dialog.ModalityType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Dialog.ModalityType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
16/01/2025 10:08:42 Cette version de la page est en cache (à la date du 16/01/2025 10:08:42) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.Document créé le 11/06/2005, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-java/awt/dialog.modalitytype.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.