在SWT FormEditor的formpages(制表符)之间切换

时间:2018-02-20 10:28:31

标签: java eclipse-plugin swt

我正在开发一个插件项目,我们正在使用不同FormEditor的SWT FormPage。第一个FormPage选项卡将充当摘要页面,从中我们需要导航到不同的其他FormPage。我确实搜索过,但没有有用的资源,所以请指导我如何在SWT FormEditor的不同表单页面之间切换。期待您的快速反应和感谢。

1 个答案:

答案 0 :(得分:2)

注意:FormEditorFormPage是Eclipse Forms而不是SWT。

FormEditor有多种setActivePage方法可供您调用:

public IFormPage setActivePage(String pageId)
  

使用唯一页面标识符设置活动页面。

public IFormPage setActivePage(String pageId, Object pageInput)
  

使用唯一页面标识符设置活动页面并设置它   输入到提供的对象。

protected void setActivePage(int pageIndex)
  

设置当前活动的页面。