沙漠中的魚

          欲上天堂,先下地獄
          posts - 0, comments - 56, trackbacks - 0, articles - 119
            BlogJava :: 首頁 ::  :: 聯(lián)系 :: 聚合  :: 管理

          RCP視圖顯示位置設置

          Posted on 2012-03-12 14:25 沙漠中的魚 閱讀(548) 評論(0)  編輯  收藏 所屬分類: RCP開發(fā)
          在RCP有時候需要將視圖放在一邊,分上下顯示,但是在RCP沒有RIGHT_TOP和RIGHT_BOTTOM這樣的方位設置,我們可以通過添加視圖的關聯(lián)ID設置相對位置。如下代碼addView方法,createFolder也相同
              /**
               * Adds a view with the given compound id to this page layout.
               * See the {
          @link IPageLayout} type documentation for more details about compound ids.
               * The primary id must name a view contributed to the workbench's view extension point 
               * (named <code>"org.eclipse.ui.views"</code>).
               *
               * 
          @param viewId the compound view id
               * 
          @param relationship the position relative to the reference part;
               *  one of <code>TOP</code>, <code>BOTTOM</code>, <code>LEFT</code>,
               *  or <code>RIGHT</code>
               * 
          @param ratio a ratio specifying how to divide the space currently occupied by the reference part,
               *    in the range <code>0.05f</code> to <code>0.95f</code>.
               *    Values outside this range will be clipped to facilitate direct manipulation.
               *    For a vertical split, the part on top gets the specified ratio of the current space
               *    and the part on bottom gets the rest.
               *    Likewise, for a horizontal split, the part at left gets the specified ratio of the current space
               *    and the part at right gets the rest.
               * 
          @param refId the id of the reference part; either a view id, a folder id,
               *   or the special editor area id returned by <code>getEditorArea</code>
               
          */
              
          public void addView(String viewId, int relationship, float ratio,
                      String refId);
          主站蜘蛛池模板: 开原市| 星座| 天全县| 马关县| 大方县| 南部县| 讷河市| 陆川县| 炉霍县| 黄骅市| 巴楚县| 东乌珠穆沁旗| 阿拉善盟| 沂水县| 清涧县| 金沙县| 汝阳县| 南江县| 平邑县| 太和县| 齐河县| 武邑县| 大石桥市| 南江县| 德安县| 黄大仙区| 色达县| 休宁县| 西乡县| 金溪县| 巧家县| 化州市| 巴彦淖尔市| 黔东| 商城县| 江安县| 称多县| 讷河市| 安吉县| 金坛市| 雷波县|