isFullScreenSupported对于监视器始终为true [英] isFullScreenSupported always true for monitors
问题描述
给出以下代码
GraphicsDevice screen = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()[0];
if (screen.isFullScreenSupported()) {
//is it always true for monitors?
}
screen.isFullScreenSupported()
是否始终适用于监视器?
Is screen.isFullScreenSupported()
always true for monitors?
推荐答案
否,可能不正确.
SecurityManager可能不允许您使用全屏控制.主要是因为人们可以轻易地伪造整个屏幕,以便从不怀疑的用户那里获取密码(您可以嘲笑银行网站).
The SecurityManager might disallow you the full screen control. Mainly because one could easily fake whole screen in order to grab a password from not-suspecting user (you could mock a bank website).
它可以是错误的:
- 在小程序中
- 在WebStart应用程序中
- 在无头模式下运行
JavaDOC:
JavaDOC of GraphicsDevice.isFullScreenSupported:
如果此GraphicsDevice支持全屏独占,则返回true 模式.如果安装了SecurityManager,则其checkPermission方法 将使用AWTPermission("fullScreenExclusive")进行调用. isFullScreenSupported仅在授予该权限的情况下返回true
Returns true if this GraphicsDevice supports full-screen exclusive mode. If a SecurityManager is installed, its checkPermission method will be called with AWTPermission("fullScreenExclusive"). isFullScreenSupported returns true only if that permission is granted
这篇关于isFullScreenSupported对于监视器始终为true的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!