Java外接显示器连接回调?
我正在编写一个演示应用程序,该应用程序应该以扩展模式显示在第二个显示器上。
为此,我想要一个“开始演示”按钮,它反映外部显示器连接的实际状态:如果没有连接外部显示器,它应该是灰色且不可单击的。如果至少有一个连接,则应启用它。
我见过 GraphicsEnvironment 类,但它只有 getXXX 方法。这是低效的,因为我必须每隔几秒钟检查一次状态,并且状态不会立即更新。
显示连接上是否有回调方法或类似的方法用于此目的?
谢谢硕
I'm writing a presentation app which is supposed to present on the 2nd display in extended mode.
For that I want to have a "Start presentation" button which reflects the actual state of external display connections: it should be gray and non-clickable if no external displays are connected. And it should be enabled if there is at least one connected.
I have seen the GraphicsEnvironment class but it only has getXXX methods. It's inefficient because I will have to check the state every few seconds and the state updates not immediately.
Is there a callback method on display connection or something like that for this purpose?
Thanks
Shuo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论