是否可以在布局的底部(1)放置一些视图,然后在剩余空间(2)的左侧放置另一个视图?
整个区域是3。
最佳答案
是的,请查看IPageLayout
JavaDoc。应该在透视图的IPerspectiveFactory.createInitialLayout(IPageLayout)
中进行设置。稍微修改此处给出的示例:
public void createInitialLayout(IPageLayout layout) {
// Get the editor area.
String editorArea = layout.getEditorArea();
// Bottom left: Outline view and Property Sheet view
IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM,
0.25f, editorArea);
bottom.addView(IPageLayout.ID_OUTLINE);
// Top left: Project Explorer view and Bookmarks view placeholder
IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, 0.25f,
editorArea);
topLeft.addView(IPageLayout.ID_PROJECT_EXPLORER);
topLeft.addPlaceholder(IPageLayout.ID_BOOKMARKS);
}