[英]Is it possible to retrieve the HostServices interface within Drombler FX?
Is there some way to retrieve the HostServices implementation within a bundle?有什么方法可以在包中检索 HostServices 实现吗? I would like to open a link within an action.我想在一个动作中打开一个链接。 Maybe putting it into the osgi service registry would be a good idea so people can access it.也许将它放入 osgi 服务注册中心是个好主意,以便人们可以访问它。
Currently it's not possible to retrieve the HostServices as the Application instance is not accessible from any JavaFX component (Node, Scene, Window,...) AFAIK and it's not handled specially by Drombler FX either.当前无法检索 HostServices,因为应用程序实例无法从任何 JavaFX 组件(节点、场景、窗口等)AFAIK 访问,而且 Drombler FX 也没有专门处理它。
Depending on your use case, a work-around could be to use the Desktop class, though this will create a dependency on the AWT stack for the time being.根据您的用例,解决方法可能是使用Desktop类,尽管这将暂时创建对 AWT 堆栈的依赖关系。
I filed an issue to support HostServices in Drombler FX.我提交了一个问题来支持Drombler FX 中的 HostServices。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.