简体   繁体   English

是否可以在 Drombler FX 中检索 HostServices 接口?

[英]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.

相关问题 如何在 JAVA FX 中从 Web 检索图像 - How to retrieve Image from Web in JAVA FX Java Fx Tableview 人口无法检索属性 - Java Fx Tableview population cannot retrieve property JavaFX:是否可以在“fx:define”中使用可变分辨率 - JavaFX: Is it possible to use variable resolution in “fx:define” 是否有可能在Android手机上安装java fx? - is it possible to install java fx on an android phone? 通过SQL查询检索列的总值,并通过Java fx显示 - Retrieve total value of column by SQL query and show by Java fx 可以将Afterburner.fx注入非演示者类吗? - Afterburner.fx injection into non-presenter classes possible? 是否可以在 openJRE 没有 Java FX 的环境中运行 JavaFX jar? - Is it possible to run a JavaFX jar in a enviroment where the openJRE has no java FX? 如何检索父接口的实现类/接口? - How to retrieve implementing class/interface of parent interface? 是否可以在Windows 2008服务器上使用Java FX启用硬件加速? - Is it possible to enable hardware acceleration with Java FX on Windows 2008 server? 是否可以在运行时检查 TYPE_USE 注释是否存在于实现声明中的接口上? - Is it possible to check at runtime whether or not a TYPE_USE annotation is present on an interface within a implements declaration?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM