天天看点

RCP开发与应用:Perspective配置多视图(view),屏蔽视图的关闭和移动

public class Perspective implements IPerspectiveFactory {

public void createInitialLayout(IPageLayout layout) {

    String editorArea = layout.getEditorArea();

    layout.addView(MyViewPart.ID,

    IPageLayout.BOTTOM, 0.75f, editorArea);

    layout.addView(MyViewPart1.ID,

    IPageLayout.LEFT, 0.25f, editorArea);

    layout.addView(MyViewPart2.ID,

    IPageLayout.BOTTOM, 0.5f, MyViewPart.ID);

    layout.getViewLayout(MyViewPart.ID).setCloseable(false);

    layout.getViewLayout(MyViewPart1.ID).setCloseable(false);

    layout.getViewLayout(MyViewPart2.ID).setCloseable(false);

    layout.getViewLayout(MyViewPart2.ID).setMoveable(false);

}

}