2012-04-19 3 views
0

저는 RCP를 처음 접했고 질문은 기본이지만 : 두 가지보기가있는 관점에서 어떻게 응용 프로그램의 시작 부분에 하나만 표시 할 수 있습니까?보기 만 표시하는 방법

답변

1

는 빠른 응답이

public class Perspective implements IPerspectiveFactory { 

     /** Top folder's id. */ 
     public static final String FI_TOP = Bootstrap.PLUGIN_ID + ".topFolder"; 
     /** Top folder's id. */ 
     public static final String FI_BOTTOM = Bootstrap.PLUGIN_ID+ ".bottomFolder"; 

     float ratioTop = 0.35f; 
     float ratioBottom = 0.60f; 

     private IPageLayout layout; 

     public void createInitialLayout(IPageLayout layout) { 
      this.layout = layout; 

      String editorAreaId = layout.getEditorArea(); 
      layout.setEditorAreaVisible(false); 

      layout.createPlaceholderFolder(FI_TOP, IPageLayout.TOP, ratioTop, editorAreaId); 
      layout.createPlaceholderFolder(FI_BOTTOM, IPageLayout.BOTTOM, ratioBottom, editorAreaId); 

      //Opnen a view 
      layout.addView("MyViewId", IPageLayout.TOP, 0.9f, layout.getEditorArea()); 

     } 

     public IPageLayout getLayout() { 
      return layout; 
     } 
+0

감사 루이스를 시도하고 나의 무지를 용서하지만 그것은 부트 스트랩을 의미합니까? –

+0

오 죄송합니다. 부트 스트랩은 제 액티베이터 클래스입니다. 부트 스트랩은 AbstractUIPlugin 클래스를 확장합니다. –

+0

Luiz에게 감사드립니다. 완벽하게 작동합니다. –

관련 문제