创建仅向导的 JFace 应用程序
我正在开发一个使用 JFace Wizard 作为其唯一 GUI 的应用程序,我有点不确定我是否走在正确的轨道上。
基本上我是这样启动 GUI 的:
Display.getDefault(); // Creates a Dialog (program crashes with a NullPointerException if this is skipped)
Wizard wizard = new SnapWizard();
WizardDialog dialog = new WizardDialog(null, wizard); // No Shell needed?
dialog.create();
dialog.open();
这似乎让一切都运行起来,但这是“正确”的做法吗?我不需要 SWT Shell 吗?
我依稀记得之前使用SWT时使用循环进行渲染,这是由Jface自动处理的吗?
I'm working on an application that uses a JFace Wizard as its only GUI and I'm a bit unsure as to whether I'm on the right track.
Basically I initiate the GUI like this:
Display.getDefault(); // Creates a Dialog (program crashes with a NullPointerException if this is skipped)
Wizard wizard = new SnapWizard();
WizardDialog dialog = new WizardDialog(null, wizard); // No Shell needed?
dialog.create();
dialog.open();
This seems to get everything running, but is it the "right" way of doing it? Don't I need an SWT Shell?
I vaguely remember using a loop for rendering when I used SWT earlier, is this handled automatically by Jface?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果未提供,将创建一个
Shell
。事件循环在dialog.open();
中运行。您可以查看 JFace 向导片段。
A
Shell
will be created if not provided. Event loop is run indialog.open();
.You can check out JFace Wizard snippet.