public final class AWTPermission extends BasicPermission
AWTPermission
包含目标名称,但没有操作列表;
你有指定的权限,或者你没有。
目标名称是AWT许可的名称(见下文)。 命名约定遵循层次化属性命名约定。 此外,星号可用于表示所有AWT权限。
下表列出了所有可能的AWTPermission
目标名称,每个都提供了许可允许的描述以及授权许可的风险的讨论。
fullScreenExclusive
permission has been granted to this application). Note that this behavior does not mean that the showWindowWithoutWarningBanner
permission will be automatically granted to the application which has the fullScreenExclusive
permission: non-full-screen windows will continue to be shown with the security warning. listenToAllAWTEvents Listen to all AWT events, system-wide After adding an AWT event listener, malicious code may scan all AWT events dispatched in the system, allowing it to read all user input (such as passwords). Each AWT event listener is called from within the context of that event queue's EventDispatchThread, so if the accessEventQueue permission is also enabled, malicious code could modify the contents of AWT event queues system-wide, causing the application or applet to misbehave in an insecure manner. readDisplayPixels Readback of pixels from the display screen Interfaces such as the java.awt.Composite interface or the java.awt.Robot class allow arbitrary code to examine pixels on the display enable malicious code to snoop on the activities of the user. replaceKeyboardFocusManager Sets the KeyboardFocusManager
for a particular thread. When SecurityManager
is installed, the invoking thread must be granted this permission in order to replace the current KeyboardFocusManager
. If permission is not granted, a SecurityException
will be thrown. setAppletStub Setting the stub which implements Applet container services Malicious code could set an applet's stub and result in unexpected behavior or denial of service to an applet. setWindowAlwaysOnTop Setting always-on-top property of the window: Window.setAlwaysOnTop(boolean)
The malicious window might make itself look and behave like a real full desktop, so that information entered by the unsuspecting user is captured and subsequently misused showWindowWithoutWarningBanner Display of a window without also displaying a banner warning that the window was created by an applet Without this warning, an applet may pop up windows without the user knowing that they belong to an applet. Since users may make security-sensitive decisions based on whether or not the window belongs to an applet (entering a username and password into a dialog box, for example), disabling this warning banner may allow applets to trick the user into entering such information. toolkitModality Creating TOOLKIT_MODAL
dialogs and setting the TOOLKIT_EXCLUDE
window property. When a toolkit-modal dialog is shown from an applet, it blocks all other applets in the browser. When launching applications from Java Web Start, its windows (such as the security dialog) may also be blocked by toolkit-modal dialogs, shown from these applications. watchMousePointer Getting the information about the mouse pointer position at any time Constantly watching the mouse pointer, an applet can make guesses about what the user is doing, i.e. moving the mouse to the lower left corner of the screen most likely means that the user is about to launch an application. If a virtual keypad is used so that keyboard is emulated using the mouse, an applet may guess what is being typed.
Constructor and Description |
---|
AWTPermission(String name)
创建一个新
AWTPermission 具有指定名称。
|
AWTPermission(String name, String actions)
用指定的名称创建一个新的
AWTPermission 对象。
|
equals, getActions, hashCode, implies, newPermissionCollection
checkGuard, getName, toString
public AWTPermission(String name)
AWTPermission
具有指定名称。
该名称是AWTPermission
的符号名称,例如“topLevelWindow”,“systemClipboard”等。星号可用于指示所有AWT权限。
name
-
name
的名称
NullPointerException
- 如果
name
是
null
。
IllegalArgumentException
- 如果
name
为空。
public AWTPermission(String name, String actions)
AWTPermission
对象。
名称是AWTPermission
的符号名称,并且操作字符串当前未使用,应为null
。
name
- 的名字是
AWTPermission
actions
- 应为
null
NullPointerException
- 如果
name
是
null
。
IllegalArgumentException
- 如果
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, 2014, Oracle and/or its affiliates. All rights reserved.