JavaFX / SWT WebView同步loadcontent() [英] JavaFX/SWT WebView synchronous loadcontent()

查看:450
本文介绍了JavaFX / SWT WebView同步loadcontent()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse SWT应用程序中嵌入了JavaFX的WebView,需要加载html内容。
我需要阻止当前线程的执行,直到webengine完成加载内容。任何熟悉这种情况的人都可以提供一些提示和/或最佳实践来实现这一目标吗?似乎SWT和JavaFX都在同一个UI线程中运行。

I have embedded JavaFX's WebView in an Eclipse SWT application and need to load html content. I need to block the execution of the current thread until the webengine has finished loading the contents. Anyone familiar with this scenario and can give some hints and/or best practices to achieve this? It seems that both SWT and JavaFX run in the same UI thread.

谢谢!

推荐答案

加载未完成时显示模态窗口。您无法阻止应用程序线程,因为SWT / JavaFX在相同的

Show a modal window while the loading is not finished. You can not block the application thread because SWT/JavaFX operate on the same

这篇关于JavaFX / SWT WebView同步loadcontent()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆