java - 在 SWT FormEditor 的表单页面(选项卡)之间切换

标签 java eclipse-plugin swt

我正在开发一个插件项目,其中我们将 SWT FormEditor 与不同的 FormPage 一起使用。第一个 FormPage 选项卡将充当摘要页面,我们需要从这里导航到不同的其他 FormPage。我确实对此进行了搜索,但没有可用的有用资源,因此请指导我如何在 SWT FormEditor 的不同表单页面之间切换。期待您的快速回复并表示感谢。

最佳答案

注意:FormEditorFormPage 是 Eclipse 表单而不是 SWT。

FormEditor 有几个可以调用的 setActivePage 方法:

public IFormPage setActivePage(String pageId)

Sets the active page using the unique page identifier.

public IFormPage setActivePage(String pageId, Object pageInput)

Sets the active page using the unique page identifier and sets its input to the provided object.

protected void setActivePage(int pageIndex)

Sets the currently active page.

关于java - 在 SWT FormEditor 的表单页面(选项卡)之间切换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48883081/

相关文章:

java - 多线程共享变量

eclipse - 在java中导入访问限制

java - 如何强制刷新 Project Explorer View ?

java - eclipse 用户界面 : Section heading in a TableWrapLayout

java - 如何验证 SWT 表单?

java - SWT 文件对话框 : Selecting directories instead of files

java - 在java中对一个巨大的String集合进行uniq和索引

java - wait() - java中的notify()机制以一种奇怪的方式发生故障

Eclipse 自动保存工作区

eclipse - 无法将 IBM WebSphere MQ Explorer 安装到 Eclipse Luna SR2 (4.4.2)