public static enum Dialog.ModalityType extends Enum<Dialog.ModalityType>
ModalityType
枚举指定模态类型及其关联范围。
Enum Constant and Description |
---|
APPLICATION_MODAL
一个
APPLICATION_MODAL 对话框阻止所有顶层窗口从同一个java应用除自己的子层次结构。
|
DOCUMENT_MODAL
一块
DOCUMENT_MODAL 对话框输入所有顶层窗口从相同的文件除自己的子层次结构。
|
MODELESS
MODELESS 对话框无法阻止任何顶层窗口。
|
TOOLKIT_MODAL
一个
TOOLKIT_MODAL 对话框阻止所有顶层窗口跑同一工具除自己的子层次结构。
|
Modifier and Type | Method and Description |
---|---|
static Dialog.ModalityType |
valueOf(String name)
返回此类型具有指定名称的枚举常量。
|
static Dialog.ModalityType[] |
values()
返回一个数组包含该枚举类型的常量,它们的顺序声明。
|
public static final Dialog.ModalityType MODELESS
MODELESS
对话框无法阻止任何顶层窗口。
public static final Dialog.ModalityType DOCUMENT_MODAL
DOCUMENT_MODAL
对话框输入所有顶层窗口从相同的文件除自己的子层次结构。文档是一个没有所有者的顶层窗口。它可能包含子窗口,与顶层窗口一起被视为一个单一的固体文件。由于每一个顶层窗口都必须属于某个文档,它的根可以被发现是一个没有所有者的最接近的窗口。
public static final Dialog.ModalityType APPLICATION_MODAL
APPLICATION_MODAL
对话框阻止所有顶层窗口从同一个java应用除自己的子层次结构。如果有多个应用程序在浏览器中启动,也可以作为单独的应用程序或一个。这种行为是依赖于实现的。
public static final Dialog.ModalityType TOOLKIT_MODAL
TOOLKIT_MODAL
对话框阻止所有顶层窗口跑同一工具除自己的子层次结构。如果有多个应用程序在浏览器的推出,都运行同一工具;因此,一个工具包,模态对话框的applet显示可能会影响其他程序和Windows的浏览器实例中嵌入java运行环境这个工具包。特别
AWTPermission
”toolkitmodality”必须被授予使用工具箱模态对话框。如果一个
TOOLKIT_MODAL
对话框被创建,这个权限不允许一个
SecurityException
将抛出,没有对话框将被创建。如果一个形态类型不断
TOOLKIT_MODAL
和本许可不允许一个
SecurityException
将抛出,而情态类型将保持不变。
public static Dialog.ModalityType[] values()
对于(dialog.modalitytype C:对话框。modalitytype。values()) 系统,println(C);
public static Dialog.ModalityType valueOf(String name)
name
-定要返回的枚举的名称。
IllegalArgumentException
-如果这个枚举类型,也没有固定的具有指定名称
NullPointerException
-如果参数为空
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, 2014, Oracle and/or its affiliates. All rights reserved.