我有一个不同视角的RCP应用程序。在一个透视图中,定义了几个视图:
p_layout.addStandaloneView(View1.ID, true, IPageLayout.LEFT, lf_ratioView1, p_layout.getEditorArea());
p_layout.addStandaloneView(MyView.ID, false, IPageLayout.TOP, lf_ratioMyView, View1.ID);
final IFolderLayout lf_detailsFolder = p_layout.createFolder("Details", IPageLayout.RIGHT, lf_ratioDetailsView, View1.ID);
lf_detailsFolder.addPlaceholder(DetailsView.ID);
lf_detailsFolder.addPlaceholder(View2.ID);
lf_detailsFolder.addPlaceholder(View3.ID + ":*");
lf_detailsFolder.addView(View4.ID);
p_layout.addStandaloneView(View 5.ID, true, IPageLayout.BOTTOM, lf_ratioView5, "Details");
p_layout.addStandaloneView(View6.ID, false, IPageLayout.BOTTOM, lf_ratioView6, View5.ID);
按不同的按钮可以关闭和打开这些视图。
我想禁用FolderLayout中视图的关闭选项:DetailsView、View2、View3和View 4,以便用户只能使用这些按钮关闭它们。
p_layout.getViewLayout(DetailsView.ID).setCloseable(false);
p_layout.getViewLayout(View2.ID).setCloseable(false);
p_layout.getViewLayout(View3.ID).setCloseable(false);
p_layout.getViewLayout(View24.ID).setCloseable(false);
RCP应用程序是从Eclipse Mars构建的。